-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
Related issue and repro: dotnet/msbuild#5600
When targeting netcore3.1 and loading an assembly that depends on a net5.0 assembly (in this case Microsoft.Build.NuGetSdkResolver depending on System.Runtime version 5.0), it can fail to load.
It fails on line 118 of SdkResolverService
result = (SdkResult)sdkResolver.Resolve(sdk, context, resultFactory);
"System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive)
"
We should consider changing MSBuildLocator to NOT return .NET Core SDK's that are newer than the current .NET Core runtime.
AArnott, ltrzesniewski, bettinaheim and ladipro
Metadata
Metadata
Assignees
Labels
No labels