VS error message while scaffolding identity

Can someone help me understand this Visual Studio error message and suggest a fix? I am getting the error message while scaffolding Identity.

This is the error message I get:

There was an error running the selected code generator: 'Error: An assembly specified in the applciation dependencies manifest (Intacct.deps.json) has already been found but with a different file extension: package: 'Microsoft.VisualStudio.Web.CodeGeneration.Design', version: '3.1.0' path: 'lib/net461/dotnet-aspnet-codegenerator-design.exe' previously found assembly: 'C:\MyPath\Users\MyUser.nuget\packages\microsoft.visualstudio.web.codegeneration.design\3.1.0\lib\netcoreapp3.1\dotnet-aspnet-codegenerator-design.dll

Upvotes: 2

Views: 1921

Answers (2)

César Salazar
César Salazar

Reputation: 1

Only reinstall package.

  1. open Tools-> NuGet package Manager-> Package Manager Console
  2. Update-Package -reinstall

Upvotes: 0

Ajit
Ajit

Reputation: 31

The issue was occurred due to the NuGet manager already has a reference for Microsoft.VisualStudio.Web.CodeGeneration.Design. in the C:\Users\Lenovo\.nuget\packages\microsoft.visualstudio.web.codegeneration.design\3.1.1\ folder in C drive. As well as the reference was also available in the Project package

Follow the below steps to resolve the error,

  1. Goto your project and Expand Dependencies tab
  2. Expand packages and search for Microsoft.visualstudio.web.codegeneration.design(3.1.1) package
  3. Right-click on the package name and Remove the package.
  4. Build the project and try.

Upvotes: 3

Related Questions