Add Deployable Dependencies - missing MVC checkbox - asp.net-mvc-3

I am trying to use the new Add Deployable Dependencies feature of VS 2010 SP1 to help with deploying an MVC3 site to a shared hosting environment. However, when I select the option after right-clicking on the project, the resulting dialog box does not show the ASP.NET MVC checkbox. It only shows Asp.Net Web Pages with Razor Syntax and SQL Server Compact.
Another thing I noticed is the capitalization of Asp.Net does not match screenshots I've seen online. In the "About Microsoft Visual Studio" dialog box, my version is shown as 10.0.31118.1 SP1Rel.
I'm stumped. Any help would be greatly appreciated. Thanks!
Solution
I re-installed VS 2010 SP1 (via the Web Platform Installer) and I now have the ASP.NET MVC checkbox and the capitalization seems correct. In the "About Microsoft Visual Studio" dialog box, my version now shows as 10.0.40219.1 SP1Rel... I must've still had the beta. Thanks!

Was the project actually created as an Mvc project? If not you will have to add the Mvc project type GUID to the csproj file. Also make sure you actually have Mvc installed on your machine.

Related

Convert Website Project to Web Application Project via Visual Studio 2013 [duplicate]

I am managing an old web application which still has legacy code from Framework 1 (would you believe it), currently on Framework 4.0.
As and when I need to fix or upgrade a web page, I convert it to a web application web page by clicking "Convert to Web Application".
VS 2013 doesn't appear to have the same menu item. Am I missing something?
It's been moved to the 'Project' menu towards the bottom after selecting the project or folder:
Sources: http://connect.microsoft.com/VisualStudio/feedback/details/806246/visual-studio-2013-web-forms-conver-to-web-applications
Open your .sln file i.e. solution file
change the below lines
1) From ,Microsoft Visual Studio Solution File, Format Version 12.00
to, Microsoft Visual Studio Solution File, Format Version 10.00
2) From, TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.5"
To, TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
MSDN has a walkthrough on converting manually.

"Bogus" Web project requires missing web component message for razor

Using Visual Studio 2010, MVC 3 (release version) I'm getting this error when opening a specific project which was a traditional web forms project to which I've added MVC:
"The Web project '' requires missing web components to run with Visual Studio. Would you like to download and install the using the Web Platform Installer now?
ASP.NET Web pages with Razor syntax."
I have MVC installed and fully running. Other pure MVC and another mixed Web Forms/MVC project open without any issue.
Clicking "Yes" appears to go through downloading and installing, but the error remains.
Clicking "No" opens the project, where I have intellisense and syntax highlighting for Razor, all my MVC context items (Add View, Add Controller, etc.). In short, everything appears to be working just fine except for what appears to be a bogus error message.
I've done a file compare of the sln, csproj and web.config files and added everything that appears relevant. Prior to doing that I was missing some entries in ProjectTypeGuids the addition of which got the MVC context menus and Razor intellisense working. I tried resetting the ProjectGuid but I still get the error.
I have also previously gone through uninstalling MVC3, MVC2, ASP.NET Web Pages, repairing Visual Studio, installing MVC 3 from the stand-alone installer, and probably a couple more things. I have not yet tried a full system reinstall. I am working from a relatively clean Windows 7 installation. It was a fresh setup about 2 weeks ago and only VS 2010 has been installed (no older versions or betas).
I'm out of ideas at this point. Anyone got any suggestions? I'm a bit confused since this is project-specific, yet the error message indicates that the problem is with Visual Studio.
Update: it gets a little more interesting. Another developer was able to open the same project on his machine without any errors or warnings. So it's something specific to this project on my workstation. At this point I'm willing to write it off as some obscure edge-case bug.
Update 2: And now after rebooting for a system update it's working on my workstation. Definitely some sort of edge-case, and definitely not something I can reproduce.
You can see from the updates, that the problem has gone away after a system-update prompted reboot. So if anyone else has ended up here with a similar problem and you've gone through all the other possibilities, try rebooting.

VS 2010 Error: ...csproj Cannot Be Opened

I'm trying to launch a project created by someone else in my local environment. I'm currently using the following products:
Visual Studio 2010 Ultimate version 10.0.40219.1 SP1 Rel
MVC 2
Windows 7 Ultimate
But when I double click on the .sln file I get the following error:
C:\Users...\Desktop\ContactManager\ContactManager\ContactManager.csproj : error : The project file 'C:\Users...\Desktop\ContactManager\ContactManager\ContactManager.csproj' cannot be opened.
The project type is not supported by this installation.
Please help me load my project. :)
Thank you,
Aaron
Turns out that I just needed to install MVC version 3. I guess the project that I was trying to open is using MVC3 and my machine only had 2 as you can see in my environment list above. I'm glad I was able to fix this BUT give me a better error message for crying out loud. Sheesh. ;)
Aaron
I've come across this before. In my case, I had installed Microsoft SQL Server and, more importantly, BIDS. Whenever I would open a project that was created in VS2008, the VS version selector would identify this as a 2008 project and BIDS would try to open it (and this error would occur). What I did as a work-around is I would right-click on the .sln file and use the "Open With" to select VS2010. If that also works for you, you can change your defaults for what opens .sln files.
Another way to test this is to open VS2010 and then use the "Open Solution" menu option to open your solution. If this method works, you know the issue is the default program that is opening your .sln files.
In my case project needs to have MVC3 so at first i checked i have MVC3 template in Visual Studio 2010 (service pack 1 installed). I downloaded MVC3 installer frowm following link:
https://www.microsoft.com/en-pk/download/details.aspx?id=4211
After installing my issue get resolved.

ext.net mvc demo build under Visual Studio 2010

I'm trying to use Ext.Net with a MVC project in VS2010 but having problems getting the controls to show up (works fine on a regular web project).
There is a Ext.Net demo application here that demonstrates how to build a ext.net MVC application but I'm having trouble building it under Visual Studio 2010.
Does anyone know if it is possible to build the demo under Visual Studio 2010?
The error is:
No overload for method "Build" takes 5 arguments on this line in PartialViewRendered.cs:
string wScript = DefaultScriptBuilder.Create(p).Build(RenderMode.RenderTo, ct, null, true, true);
Ext.Net.Mvc works with latest version of Ext.Net are available in SVN only
You have to wait Ext.Net RC2
Faced that issue couple of months back, basically there is some route that you need to disable in MVC so that the controls can work i guess, not at work today, but will post it tomorrow.

How to Manually Start Visual Studio Conversion Wizard

I want to convert my .NET Website that is currently in .NET Framework version 3.5 SP 1 to 4.0. Now you get a conversion wizard when you open a VS 2008 solution in VS 2010. The wizard will convert the solution to 2010 and at the same time can convert the projects to .NET 4.0. I already converted my solution to VS 2010 but did not at the time convert to .NET 4.0. Does anyone know how to start the VS Conversion Wizard manually? According to this article it should start when you open the solution, that is not the case for me.
Thanks for your help!
The wizard converts solutions and projects from previous VS versions to the current one. It will not open again, because you already converted it to VS2010.
To change to .NET 4.0:
Right-click on the project in your Solution Explorer, and click "Properties".
Switch to the "Compile" tab.
Click the "Advanced Compile Options..." button.
Change the Target Framework to ".NET Framework 4."
AFAIK, The wizard doesn't do anything that switching target type in the project won't do. You might not get the option to back up, but you're already doing versioning, right?
To amend the Framework target, i went to the property pages of the site > build tab > updated the target framework. It re-built the web site successfully for me.

Resources