-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Don't cross compile GetAssemblyVersion #1215
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
Conversation
Previously we cross-compiled the GetAssemblyVersion method to avoid a dependency on MetadataReader on desktop. This had the downside of causing first chance exceptions when run on desktop. This has the tradeoff of introducing a Reflection.Metadata dependency on desktop which will increase the layout by ~700KB (for SRM and SCI).
I have a feeling that SRM will be used more and more in the future so might as well start taking advantage of it earlier. |
Nevermind, I see we are trying to fix the first chance exception problem on desktop. |
Tests are failing because S.C.I is missing: |
This is failing because of lack of bindingRedirects in SDK:
|
FWIW this is exactly why I was trying to avoid dependencies in the desktop build. |
I'm inclined to close this until msbuild provides a simple mechanism for binding redirects in tasks. I don't think 800kb + a custom assembly resolve implementation is worth it in the meantime. |
Agreed. I suppose another alternative would be to implement our own early check for managed assembly using the code sample @KirillOsenkov shared: https://github.com/KirillOsenkov/MetadataTools/blob/master/PEFile/IsManagedAssembly.cs But then I'd question if a second file open/read is worth getting rid of the first chance exception. |
…115.5 (dotnet#1215) - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20065.5
Previously we cross-compiled the GetAssemblyVersion method to avoid
a dependency on MetadataReader on desktop. This had the downside of
causing first chance exceptions when run on desktop.
This has the tradeoff of introducing a Reflection.Metadata dependency on
desktop which will increase the layout by ~700KB (for SRM and SCI).
What are folks thoughts on that tradeoff? /cc @dsplaisted @KirillOsenkov @eerhardt