Ivan-Mark Debono
Ivan-Mark Debono

Reputation: 16280

Error after upgrading to latest version of Visual Studio 2022 and project is not being loaded

I have upgraded Visual Studio 2022 from 17.1.4 to 17.1.5.

When I open the solution, the main project (ASP.NET Core) remains unloaded. When I try to load the project I get the following error:

The expression "[System.IO.Path]::Combine(C:\pathtoproject, \net6.0)" cannot be evaluated. Illegal characters in path. C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets

How can I solve this problem?

Upvotes: 3

Views: 7162

Answers (3)

Abdul Mohiz
Abdul Mohiz

Reputation: 1

Right click on Solution, there you will find an option for "Load All Projects", click on that option and it will load all the projects, you can also unload the project by clicking on "Unload the projects"

Upvotes: 0

David Sharp
David Sharp

Reputation: 1

Download .NET SDK (6.0) and make repair. After restart your PC

.NET SDK LINK

Upvotes: 0

Andrii
Andrii

Reputation: 31

Try to delete all files in "/Bin" and "/Оbj" folders across Solution. Also do a "Clean solution" before build.

Upvotes: 2

Related Questions