Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Framework 2.0 Service Pack 1 types are missing #16

Open
WamWooWam opened this issue Apr 13, 2024 · 3 comments
Open

.NET Framework 2.0 Service Pack 1 types are missing #16

WamWooWam opened this issue Apr 13, 2024 · 3 comments

Comments

@WamWooWam
Copy link
Contributor

Very odd one here, mscorlib.dll as installed by dotnet9x seems to be missing the System.DateTimeOffset type?

(Left, dotnet9x mscorlib, right, .NET 2.0 mscorlib as present on Windows 11)
image

Loading the binaries in JustAssembly versus a known good mscorlib.dll shows the following APIs are also missing:

  • System.GCCollectionMode
  • System.GCNotificationStatus
  • some APIs in System.GC
  • System.Collections.Generic.ArraySortHelper<T> (and friends)
  • System.Reflection.Emit.DynamicAssemblyFlags
  • System.Reflection.Emit.GenericFieldInfo
  • System.Runtime.GCLatencyMode
  • System.Runtime.CompilerServices.JitHelpers
  • System.Runtime.InteropServices.AllowReversePInvokeCallsAttribute
  • System.Runtime.InteropServices.SafePointer
  • System.Runtime.Serialization.SurrogateForCyclicalReference
  • System.Security.SecuritySafeCriticalAttribute
  • System.Security.SecuritySafe
  • System.Security.Policy.IDelayEvaluatedEvidence
  • System.Security.Policy.IReportMatchMembershipCondition
  • System.Threading.ThreadPoolGlobals
  • System.Threading.ThreadPoolRequestQueue

I'm honestly not sure where these APIs went? Sorta wondering where the mscorlib.dll you're using here came from, it could be a .NET 3.5 thing? But then DateTimeOffset was added in .NET 2.0? It's very strange.

@WamWooWam
Copy link
Contributor Author

Digging a bit more, it seems these were mostly added in .NET Framework 2.0 Service Pack 1 whereas this package seems to be based on the RTM, SP1 is a requirement for .NET 3.5 to be properly functional so it might be worth updating these binaries to their SP1 (or better, SP2) equivalents?

More info:
https://www.hanselman.com/blog/catching-redbits-differences-in-net-20-and-net-20sp1
https://hanselmanblogcontent.azureedge.net/RedBitsChangesv2.html

@WamWooWam WamWooWam changed the title DateTimeOffset & others missing from mscorlib .NET Framework 2.0 Service Pack 1 types are missing Apr 13, 2024
@Ximonite
Copy link

Ximonite commented Apr 19, 2024

I looked at the file version of mscorlib.dll and I can confirm this is using RTM files.
image
I also wonder if newer versions of mscorlib.dll have fixed SSE2 checks that won't require file patches, I think this is something that should be looked into.

@itsmattkc
Copy link
Owner

Yeah it's based on RTM because SP1 (technically) dropped support for 98SE, but that's probably not relevant anymore with our backported runtime. The SP1 MSIL DLLs can probably be patched and added here.

I also wonder if newer versions of mscorlib.dll have fixed SSE2 checks that won't require file patches, I think this is something that should be looked into.

Nah the SSE2 check was in the JIT compiler in mscorwks.dll, shouldn't be an issue from now on in any MSIL code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants