AskYous
AskYous

Reputation: 4740

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

Upvotes: 2

Views: 1016

Answers (1)

AskYous
AskYous

Reputation: 4740

This solved my issue: https://github.com/aspnet/Scaffolding/issues/586

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

<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration" Version="1.1.1" /> 

Upvotes: 3

Related Questions