Finding the generator 'identity'... The given assembly name or codebase was invalid


My App builds and runs just fine. But when I try to run dotnet aspnet-codegenerator identity --useDefaultUI, it errors:

Building project ...

Finding the generator 'identity'...

The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

at System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean raiseResolveEvent) at System.Reflection.AssemblyName..ctor(String assemblyName) at Microsoft.VisualStudio.Web.CodeGeneration.DefaultCodeGeneratorAssemblyProvider.b__6_0(DependencyDescription lib) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at Microsoft.VisualStudio.Web.CodeGeneration.CodeGeneratorsLocator.get_CodeGenerators() at Microsoft.VisualStudio.Web.CodeGeneration.CodeGeneratorsLocator.GetCodeGenerator(String codeGeneratorName) at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args) RunTime 00:00:05.76

asked on Stack Overflow Sep 29, 2019 by AskYous

1 Answer


This solved my issue:

In short: I had to remove this from my .csproj file:

<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration" Version="1.1.1" /> 
answered on Stack Overflow Oct 19, 2019 by AskYous

User contributions licensed under CC BY-SA 3.0