Skip to content
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

VS version selected does not contain required workloads #723

Closed
maheshsabnis opened this issue Jul 19, 2021 · 4 comments
Closed

VS version selected does not contain required workloads #723

maheshsabnis opened this issue Jul 19, 2021 · 4 comments
Labels
community reported Triaged Label to show that UA team has triaged this issue.

Comments

@maheshsabnis
Copy link

I am trying to upgrade ASP.NET MVC Project targeted to .NET Framework 4.8 to .NET 5 using the .NET Upgrade Assistant tool. I am using VS2019 with update 16.10.3. I have followed steps from "https://docs.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-aspnetmvc" but I am getting the following error:

  • Microsoft .NET Upgrade Assistant v0.2.236301+ab7048ed405e48f681c02ce16f691fc473a2d96a -

[18:19:12 INF] Loaded 3 extensions
[18:19:13 INF] MSBuild registered from C:\Program Files\dotnet\sdk\5.0.302
[18:19:15 INF] Initializing upgrade step Select an entrypoint
[18:19:15 INF] Setting entrypoint to only project in solution: C:\DXC\july21\MUV5_NewApp\MUV5_NewApp\MUV5_NewApp.csproj
[18:19:15 INF] Initializing upgrade step Select project to upgrade
[18:19:15 ERR] Project C:\DXC\july21\MUV5_NewApp\MUV5_NewApp\MUV5_NewApp.csproj cannot be loaded: The imported project "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk. C:\DXC\july21\MUV5_NewApp\MUV5_NewApp\MUV5_NewApp.csproj
[18:19:15 INF] No projects need upgraded for selected entrypoint
[18:19:15 INF] Initializing upgrade step Finalize upgrade

Upgrade Steps

I am seeking help on this.
Thanks in advance
Regards
Mahesh Sabnis

@twsouthwick
Copy link
Member

twsouthwick commented Jul 19, 2021

Looks like you don't have the web application workload in VS 2022. For now, try installing the workloads needed to build successfully in VS 2022 (or remove it from your system). We'll work on providing a way to select a VS version when multiple are installed.

@twsouthwick twsouthwick changed the title The .NET Upgrade Assistant Issue VS version selected does not contain required workloads Jul 20, 2021
@sunandabalu sunandabalu added the Triaged Label to show that UA team has triaged this issue. label Jul 20, 2021
@twsouthwick
Copy link
Member

I've opened a design proposal that we'll keep open in lieu of this issue. Please reopen if the workaround does not work for you

@KSchlobohm
Copy link
Contributor

@twsouthwick
I don't think this is a selected workloads issue. The path itself appears to be incorrect. The correct path for the templates should either include v17.0 or 2019. I ran into the same issue when I installed Dev17 and I have the Web application workload installed.

One way to hack around this issue is to copy the v16.0 templates into the path where the application is looking for these files.

@maheshsabnis
Copy link
Author

Hi @twsouthwick
I have the workload installed but still the problem persist.

Thanks
Regards
Mahesh Sabnis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community reported Triaged Label to show that UA team has triaged this issue.
Projects
None yet
Development

No branches or pull requests

4 participants