I'm currently facing an ugly Problem while trying to scaffold from Control class. I get the following error:
The error text is:
There was an error running the selected Code Generator: 'Unhandled Exception: System.TypeLoadException: Could not load typa 'Microsoft.VisualStudio.Web.CodeGeneration.ConsoleLogger' from assembly Microsoft.VisualStudio.Web.CodeGeneration.Core, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. at Microsoft.VisualStudio.Web.CodeGeneration.Tools.Program.Main(String [] args)'
My project.json file is:
"Microsoft.EntityFrameworkCore.Design": "1.1.2",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.2",
"Microsoft.EntityFrameworkCore.SqlServer.Design": {
"version": "1.1.1",
"type": "build"
},
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.2",
"Microsoft.Extensions.Configuration.Json": "1.1.2",
"Microsoft.Extensions.Configuration.UserSecrets": "1.1.1",
"Microsoft.Extensions.Logging": "1.1.2",
"Microsoft.Extensions.Logging.Console": "1.1.2",
"Microsoft.Extensions.Logging.Debug": "1.1.1",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.2",
"Microsoft.NETCore.App": {
"version": "1.1.1",
"type": "platform"
},
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.1.0-preview4-final",
"type": "build"
},
"Microsoft.VisualStudio.Web.CodeGeneration.Core": "1.1.1",
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
"version": "1.1.1",
"type": "build"
},
"Microsoft.VisualStudio.Web.CodeGeneration.Design": "1.0.1"
"tools": {
"BundlerMinifier.Core": "2.4.337",
"Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final",
"Microsoft.Extensions.SecretManager.Tools": "1.1.0-preview4-final",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.1.0-preview4-final",
"imports": [
"portable-net45+win8"
]
}
},
Any idea where I'm doing wrong?
I've already read some other Posts on SO, but I've found no help.
-preview2-final
. Try these or switch to VS2017, migrate to csproj and use the RTM tools – Tsengtools
section, like"Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
. The last version of these tools (all of it with1.1.0-preview4-final
as version) are for VS2017. Newer versions of these tools won't run anymore on VS2015 (only1.1.0-preview2-final
or older). There won't be any further updates for VS2015 so you should switch to VS2017 sooner than later – Tsengdependencies
andtools
? Any nuget restore errors? I.e.Microsoft.EntityFrameworkCore.Tools.DotNet
isn't there in preview2-final iirc, it was split out in preview 3 iirc. so instead you need to useMicrosoft.EntityFrameworkCore.Tools
and1.0.0-preview2-final
– Tseng