Unable to upgrade MVC framework to .net6.0

Viewed 114

While upgrading mvc project to .net6.0 getting below error:

Problem loading file in MSBuild workspace Msbuild failed when processing the file 'D:\CDT\CommonLibraries\ReferenceDataAPIClient\ReferenceDataAPIClient.csproj' with message: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.ConflictResolution.targets: (30, 5): The "ResolvePackageFileConflicts" task could not be loaded from the assembly C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\tools\net6.0\Microsoft.NET.Build.Extensions.Tasks.dll. Could not load file or assembly 'C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\tools\net6.0\Microsoft.NET.Build.Extensions.Tasks.dll'. The system cannot find the path specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

It is trying to find net6.0 inside tools folder which does not exist. Can someone help here?

1 Answers

I had the same issue, not sure why this folder is not here anymore, however, what I would suggest:

Go to the net472 folder in the tools folder, here you can find this dll, you can copy all of the contents of this folder and then, create another folder in tools called net6.0 and paste the copied files here, hopefully this works.

Related