-
Notifications
You must be signed in to change notification settings - Fork 2
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
Dependency Issue #4
Comments
Thanks for raising this @ADCJustinH . Is it possible to share a repro so I can debug it? Are you running this within Visual Studio? Does it work through the CLI (like This package is shipped with 2 targets, one for Core and one for Framework. Both of which depend on |
I suspect the problem is you are in a shared appdomain that you dont own. if any other task loads a diff version of Metadata before you, then it will break. u should probably ilmerge or spawn a new appdomain |
actually you dont bundle System.Reflection.Metadata in the package. so how is it meant to find it? |
It's defined as a package reference: unoptimized-assembly-detector/src/UnoptimizedAssemblyDetector/UnoptimizedAssemblyDetector.csproj Line 57 in 6e75ec3
Are you saying this isn't being loaded like this and it just works by coincidence? :) |
i didnt think package references worked for msbuild tasks. at least that was my experience when building Fody. that might have changed. and for me this project never works. for my contributions to sentry i had to comment it out and avoid checking that file in |
It might then be working by coincidence.
This is odd. It works for me and other contributors. I've also used in other projects. |
No dice first time I tried this. Build works fine without this package referenced. .Net Core 3.1 Windows 10
9>Failed checking if assembly is optimized: D:.nuget\packages\amazon.aspnetcore.dataprotection.ssm\2.1.0\lib\netstandard2.0\Amazon.AspNetCore.DataProtection.SSM.dll
9>D:.nuget\packages\unoptimizedassemblydetector\0.1.1\build\UnoptimizedAssemblyDetector.targets(14,5): error MSB4018: The "DetectUnoptimizedAssembly" task failed unexpectedly.
9>D:.nuget\packages\unoptimizedassemblydetector\0.1.1\build\UnoptimizedAssemblyDetector.targets(14,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
9>D:.nuget\packages\unoptimizedassemblydetector\0.1.1\build\UnoptimizedAssemblyDetector.targets(14,5): error MSB4018: File name: 'System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
9>D:.nuget\packages\unoptimizedassemblydetector\0.1.1\build\UnoptimizedAssemblyDetector.targets(14,5): error MSB4018: at UnoptimizedAssemblyDetector.DetectUnoptimizedAssembly.CheckAssemblyIsOptimized(String assemblyPath, String file)
9>D:.nuget\packages\unoptimizedassemblydetector\0.1.1\build\UnoptimizedAssemblyDetector.targets(14,5): error MSB4018: at UnoptimizedAssemblyDetector.DetectUnoptimizedAssembly.Execute() in /_/src/UnoptimizedAssemblyDetector/DetectUnoptimizedAssembly.cs:line 81
9>D:.nuget\packages\unoptimizedassemblydetector\0.1.1\build\UnoptimizedAssemblyDetector.targets(14,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
9>D:.nuget\packages\unoptimizedassemblydetector\0.1.1\build\UnoptimizedAssemblyDetector.targets(14,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
The text was updated successfully, but these errors were encountered: