Vc-build compress fail with 'The SDK resolver type WorkloadSdkResolver failed to load' exception

vc-build compress command might fail with an exception

InvalidProjectFileException: The SDK resolver type “WorkloadSdkResolver” failed to load. Could not load file or assembly ‘System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified. c:\Projects\VirtoCommerce\V3\Modules\vc-module-cart.git\src\VirtoCommerce.CartModule.Web\VirtoCommerce.CartModule.Web.csproj

The temporary workaround put the global.json file in the module solution folder with the following content:

{
  "sdk": {
    "version": "3.1.0",
	"rollForward": "latestMinor"
  }
}

or you can create a new global.json file in the current directory by executing the dotnet new command, similar to the following example:

dotnet new globaljson --sdk-version 3.1.0
1 Like

VC-Build problem on NET 5 - dev - Virto Commerce