I'm trying to add a view to an ASP.NET MVC 5 project in Visual Studio 2013, but the Add button is greyed out.
相关问题
- Custom controls disabled. There was an internal is
- How to generate URL for the action with attribute
- Websphere MQ C++ client crashes in VS2013- library
- How to retrieve multiple columns from non-entity t
- Export test results from Test Explorer visual stud
相关文章
- Web Test recorder does not allow me to record a te
- Why do I need a ToList() to avoid disposed context
- The program '[4432] iisexpress.exe' has ex
- Cannot implicitly convert Web.Http.Results.JsonRes
- How to disable CodeLens' references display in
- Breakpoint in ASP.NET MVC Razor view will not be h
- Why doesn't my .tfignore file ignore my packag
- Cannot add a Data Source in web project using the
I got this for ages, all I did was upgrade the nuget packages for Mvc and it fixed it. I suspect that I had a mismatch of versions in the solution.
The version part is optional, but it should mean that all projects get the same version.
You should create a controller first, then it will create a View folder automatically. Try to right click that file then click create new view. Also Copy might be a specific name, you may need to change that name.
Different from the OP issue (as I'm on VS2017) but in case anyone else comes to this question when they've made the same (basic) error as me...
It took me a few minutes to realise that if you type in a new Model class (as seen below) then this is not what the UI wants; it requires you to select an existing Model from the dropdown. Once I created the model and then selected it 'Add' was enabled.