GithubHelp home page GithubHelp logo

Comments (6)

axunonb avatar axunonb commented on July 24, 2024

@prettyv Could you please have another look at these changes which seam to be the cause for this issue.
@Sten-V Did you try, whether reverting the changes resolves the issue?

from yaxlib.

Sten-V avatar Sten-V commented on July 24, 2024

Yes, reverting that commit resolves the issue.
Before that commit, in the affected method:
assemblyName = "mscorlib.dll"
and after
assemblyName = "mscorlib"

and the pattern searched for after does not match "mscorlib." (dot in the end differs).

from yaxlib.

Sten-V avatar Sten-V commented on July 24, 2024

Note that there's a differences between .NET (Core) and Framework.
My previous comment was executed in .NET Framework 4.8
In .NET 8
Before that commit, in the affected method:
assemblyName = "System.Private.CoreLib.dll"
and after
assemblyName = "System.Private.CoreLib"

from yaxlib.

axunonb avatar axunonb commented on July 24, 2024

The unit tests for the sample code above succeed. So it looks like your environment is different.

But still, the dot after "mscorlib." in

assemblyName.StartsWith("mscorlib.", StringComparison.OrdinalIgnoreCase) ||

should be removed, meaning the comparison should be the same as here:
return assemblyName.Equals("mscorlib", StringComparison.OrdinalIgnoreCase)

Although assembly names may contain dots, this does not apply for "mscorlib.dll".

Never mind your environment: Do I understand correctly that just removing the dot after "mscorlib" would fix the issue?

from yaxlib.

Sten-V avatar Sten-V commented on July 24, 2024

Yes, removing the dot should do the trick.

Given a bit of tweaking you'll probably see this error in a bunch of unit tests too.
I did a POC here Sten-V@8b03c1d

  • Starting the test suite in Visual Studio/ReSharper they flat out refused to run in the configured test-lib target net461 ("Inconclusive: Test has not run"), note that this does not fail the test run.
  • Upgrading NUnit3TestAdapter to latest version had the tests running the net461 test-lib, now with an actual success. I assume that's because the test-lib 4.6.1 will load the yax-lib 4.6.1, since it's a neat match
  • Removing all targets except netstandard2.0 in yax-lib force the 4.6.1 test-run to load the netstandard 2.0 yax-lib, now we see errors, but not the ones we're looking for. As you can read here https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0 NET Framework 4.6.1 is not a great match for NET Standard so I bumped test-lib to the recommended version 4.7.2

After this you'll most likely see tests failing in the same manner originally stated.

from yaxlib.

axunonb avatar axunonb commented on July 24, 2024

Okay, very good. There will be a new release in 1-2 days.
Yes, I noticed the NUnit packages must be updated. Not a big deal though. Migration to NUnit 4 will bring a bigger workload.
Thanks for your cooperation.

from yaxlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.