Skip to content

Commit

Permalink
Add known issue for workload restore and workload sets
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpopMSFT authored Sep 6, 2024
1 parent d8142b0 commit 88922cc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions release-notes/8.0/known-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ You may encounter the following known issues, which may include workarounds, mit

## .NET SDK

### 8.0.2xx SDK is not compatible with 17.8 for some scenarios
Some analyzers and source generators that ship with the SDK took a dependency on a new version of the Roslyn compiler. In Visual Studio and msbuild.exe, .NET projects use the Roslyn version that comes with Visual Studio by default.
### [8.0.4xx] `dotnet workload restore` with a workload set configured in the global.json will not work

**Example error messages**
`Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'`
`Microsoft.Codeanalysis.CodeStyle.dll references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'`
8.0.4xx doesn't support restoring a workload set listed in a global.json file. See the [documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-workload-sets#use-globaljson-for-the-workload-set-version) for more details on the scenario of pinning a workload version.

**Error**
`Unhandled exception: Microsoft.Build.Exceptions.InvalidProjectFileException: SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator". Exception: "System.IO.FileNotFoundException: Workload version 8.0.401, which was specified in <path>\global.json, was not found. Run "dotnet workload restore" to install this workload version.`

**Workaround**
1. Use 17.10 which matches the 8.0.2xx SDK
2. Install the 8.0.1xx SDK and use global.json to pin to it if you have multiple SDKs installed
3. Set BuildWithNetFrameworkHostedCompiler=true in your build. This configures the build to use a matching version of the compiler to your SDK version rather than to your VS version so in this case, it'll use a 4.10 version of Roslyn.
Run `dotnet workload update` first to get the workload set instaleld and then run `dotnet workload restore` after to install the required workloads.

0 comments on commit 88922cc

Please sign in to comment.