I have an aspnet core v1.0.1 application and I have extracted the models/migrations into a separate assembly. I have added a new model, but when I try to create a controller with scaffold I get this error:
Finding the generator 'controller'...
Running the generator 'controller'...
Attempting to compile the application in memory
There was an error creating/modifying a DbContext, there was no type returned after compiling the new assembly successfully
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.<BuildCommandLine>b__6_0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
It would be helpful to know which type wasn't being returned.
The dotnet command is:
"C:\Program Files\dotnet\dotnet.exe" aspnet-codegenerator --project "C:\Projects\CompetitionScores\src\CSWebSite" controller --force --controllerName ClubsController --model CompetitionScores.Data.Models.Club --dataContext CompetitionScores.Data.CompetitionScoresDbContext --relativeFolderPath Controllers --controllerNamespace CSWebSite.Controllers --referenceScriptLibraries --useDefaultLayout
Any ideas how I can fix this?