I have Visual Studio 2015 Community Edition Update 3 running on Windows 8.1. I also have the latest .NET Core 1.1 installed.
I couldn't scaffold a new Controller so found this thread on github, this one on SO and after adding these 2 -
- Microsoft.VisualStudio.Web.CodeGenerators.Mvc
- Microsoft.VisualStudio.Web.CodeGeneration.Tools
in project.json it worked fine. Before adding the above 2 the Microsoft.NETCore.App version was 1.0.1 but the above Tools package requires version to be 1.1.0 so I modified the Microsoft.NETCore.App to be 1.1.0. I had to also upgrade/restore all Nuget packages to target this update. After this I was able to scaffold Controllers in the project.
Now, I am trying to add a new View to my project, I see this scaffolding error -
Any workarounds/ideas that I can try to get it to work? Or could this be a bug with ASP.NET Core tooling in VS 2015?
I could probably go ahead by adding files manually and use Visual Studio Code, but I want to see if this issue can be resolved and I can stick to Visual Studio.
EDIT: Adding a section of my project.json file
{
"dependencies": {
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
"Microsoft.AspNetCore.Routing": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Logging": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
"Microsoft.NETCore.App": "1.1.0",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0",
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
"version": "1.1.0-preview4-final",
"type": "build"
},
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.1.0-preview4-final",
"type": "build"
}
},
"tools": {
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.1.0-preview4-final",
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"runtimes": {
"win81-x64": {}
}
}