-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Microsoft.Net.Sdk.Compilers.Toolset download check fails because NuGetPackageRoot is unset in some scenarios #43016
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Hello! I am getting the same error trying to build one of our solutions on a <Exec Command='$(MSBuild17ExePath) $(WinFormsNetCoreSolutionPath) /p:Configuration=$(NetCoreBuildConfiguration);Platform="$(WinFormsBuildPlatform)";WarningLevel=0;TreatWarningsAsErrors=false /t:Rebuild'/> Is there a workaround, I see that one is mentioned above but could not figure out how to use it? Also, some of the related issues are now closed. Will a fix be available with a future preview version of .NET 9? |
It seems that |
Doing |
this basically breaks the build for all WPF desktop projects, let's make sure we fix this before the release if at all possible |
#43119 is a workaround for this - with that no builds should be broken except for a warning |
hmm a warning is still a regression for all legacy WPF, this is concerning |
only if you are in a torn SDK state (i.e., a new SDK and an old MSBuild) |
Related to #41791 and #42087.
The error is:
It happens because
$(NuGetPackageRoot)
is unset, hence<RoslynTargetsPath>$(NuGetPackageRoot)\microsoft.net.sdk.compilers.toolset\$(NETCoreSdkVersion)</RoslynTargetsPath>
points to an invalid location, hence the download check fails.For example,
$(NuGetPackageRoot)
is unset in these scenarios:msbuild.exe '/t:Restore;Build'
(but it's fine when running with/restore /t:Build
)GenerateTemporaryTargetAssembly
when building WPF on .NET FrameworkIn the following, the toolset package download was completely disabled likely because it was failing due to this bug:
Similar issue:
A workaround for this issue is being added in #42860.
The text was updated successfully, but these errors were encountered: