You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a solution open in Visual Studio 2022 when I ran "dotnet workload update" on the command line, which upgraded the "aspire" workload from 8.0.1 to 8.0.2. After this, when I tried to build a project in Visual Studio, it failed with an error saying that Microsoft.NET.Sdk.ImportWorkloads.props was not able to import AutoImport.props from version 8.0.1 of Aspire.
Nothing in the solution references Aspire.
I tried to restore NuGet packages again in Visual Studio, and also with nuget restore -force -forceEvaluate, but it didn't help. I then restarted Visual Studio, and the build started working again.
The problem seems to be that Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver assumes Visual Studio will be restarted when workloads are updated. The "dotnet workload update" command did not restart Visual Studio and did not tell me to restart it.
To Reproduce
I can't reproduce it now, as I can't figure out how to reinstall version 8.0.1 of the "aspire" workload for .NET SDK 8.
This may be related to me having installed .NET SDK 8 and the "aspire" workload long before I installed Visual Studio 2022.
Exceptions (if any)
I lost the error message.
Further technical details
As I've uninstalled and reinstalled various SDK versions and workloads while trying to reproduce the error, the following output of dotnet --info no longer matches what it would have been when the error occurred. In particular, I don't think the "Installation Source" of "aspire" would have been VS.
Describe the bug
I had a solution open in Visual Studio 2022 when I ran "dotnet workload update" on the command line, which upgraded the "aspire" workload from 8.0.1 to 8.0.2. After this, when I tried to build a project in Visual Studio, it failed with an error saying that Microsoft.NET.Sdk.ImportWorkloads.props was not able to import AutoImport.props from version 8.0.1 of Aspire.
Nothing in the solution references Aspire.
I tried to restore NuGet packages again in Visual Studio, and also with
nuget restore -force -forceEvaluate
, but it didn't help. I then restarted Visual Studio, and the build started working again.The problem seems to be that Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver assumes Visual Studio will be restarted when workloads are updated. The "dotnet workload update" command did not restart Visual Studio and did not tell me to restart it.
To Reproduce
I can't reproduce it now, as I can't figure out how to reinstall version 8.0.1 of the "aspire" workload for .NET SDK 8.
This may be related to me having installed .NET SDK 8 and the "aspire" workload long before I installed Visual Studio 2022.
Exceptions (if any)
I lost the error message.
Further technical details
As I've uninstalled and reinstalled various SDK versions and workloads while trying to reproduce the error, the following output of
dotnet --info
no longer matches what it would have been when the error occurred. In particular, I don't think the "Installation Source" of "aspire" would have been VS.Visual Studio Professional 2022 LTSC 17.10 on Windows 10 x64.
The text was updated successfully, but these errors were encountered: