Comments (6)
@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.
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.
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.
The unit tests for the sample code above succeed. So it looks like your environment is different.
But still, the dot after "mscorlib." in
YAXLib/YAXLib/ReflectionUtils.cs
Line 836 in c757b6b
should be removed, meaning the comparison should be the same as here:
YAXLib/YAXLib/ReflectionUtils.cs
Line 839 in c757b6b
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.
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.
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)
- Generic deserialization methods should not hide base methods with 'new', e.g. with a generic base class HOT 1
- Possible regression caused by PR #183 HOT 9
- Extend tests to cover YAXSerializer and YAXSerializer<T> HOT 2
- Extend caching and pooling for better performance HOT 10
- Split IYAXSerializer<T> to IYAXSerializer<T> and IYAXDeserializer<T> HOT 7
- Make Exception a KnownType HOT 4
- All public members of YAXSerializer (generic/non-generic) should be fully covered by unit tests HOT 1
- How serialize a list as an attribute HOT 7
- Extend SerializationContext for pre-processing in ICustomSerializer and IKnownType
- Add unit tests for YAXCollectionItemTypeAttribute and YAXElementForAttribute
- Add YAXSerializationOptions.StripInvalidXmlChars HOT 3
- Structs are not serialized correctly HOT 3
- Update docs for new v4 features
- Multiple Elements with Same Name? How to Deserialize?
- Add support for DateOnly and TimeOnly types
- Is it possible deserialize to property by attribute name and inner xml with YAXLib?
- Serializing/Deserializing ValueTuples HOT 1
- Serialized strings that use the stringbuilder pool throw when the string's length is > 1024 (DefaultStringBuilderCapacity).
- Collection Deserialization with RecursiveWithNoContainingElement HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yaxlib.