Creating new ASP.Net MVC project - Unit Test Dialog does not show up - asp.net-mvc

When I create a New Project of type ASP.Net MVC Web Application, I expect the dialog for unit test applications to show up, but it does not. I cannot find the Unit Test App among the product types I can create either. How do I set up my VS so that the dialog shows up?
I have installed Visual Studio 2008, .Net Framework 3.5 SP1 and ASP.Net MVC Framework (Beta).

As #MrJavaGuy says, you need to install at least the Professional, not Express, version of VS2008. Alternatively, you can install nUnit and/or TestDriven.Net and get unit testing capabilities. Info on nUnit can be found at http://www.nunit.org/ and TestDriven.Net at http://www.testdriven.net/. I recommend TestDriven.Net even if you have the testing capabilities of Visual Studio baked in.

Turns out one of the problems were that I hadn't installed Testing Capabilities with my VS installation - running the installer and adding the feature made everything roll smoothly =)

Had the same problem with Visual Web Developer Express, I found this blog.
http://blogs.msdn.com/webdevtools/archive/2008/05/30/asp-net-mvc-preview-3-tooling-updates.aspx
I downloaded
http://www.box.net/shared/zmp0cdxsss
and that worked for me.. Not sure if this will sort your issue though. Best of luck with it.

Related

Create and Run MVC 5 Project in VS 2012

For some reason my Visual Studio 2013 Preview cannot create MVC 5 Projects. Since the MVC project is now open source in CodePlex I was wondering if there's a simple way to develop MVC 5 projects in my Visual Studio 2012 Ultimate.
Microsoft has released updated Web Tools 2013.1 that provide the support:
Description
Direct download
Note that I had to install it manually from the second link, the tools did not install properly from Web Platform Installer. Also a colleague had to install both Update 4 and these tools to get proper support.
Original answer (not actual anymore):
I received this answer from Microsoft developer:
MVC 5/Razor 3 tooling support for VS 2012 has not shipped yet. We hope to ship this support in Mid November.
Recently ASP.NET Program Manager from Microsoft mentioned in a talk that this would be included in VS2012 Update 4. Edit: unfortunately the support is not in Update 4.
So the accepted answer is true for now but we can plan to soon have this support in VS2012 as well.
A new tutorial has been recently added to the ASP.NET website on how to upgrade an MVC4 project to MVC5.
I migrated a VS 2012 project using this tutorial without problems, but there is no design time support for Razor 3 in VS2012 due to changes in the way VS loads the razor engine.
You can edit razor pages in VS2012, but it will be a plain HTML editor.
Microsoft has released an update for this, Web Tools 2013.1 for VS2012.
http://blogs.msdn.com/b/webdev/archive/2013/11/18/announcing-release-of-asp-net-and-web-tools-2013-1-for-visual-studio-2012.aspx
I'm not sure MS will fix it.
The bug report says problem closed : by design
https://connect.microsoft.com/VisualStudio/feedback/details/806348/razor-intellisense-does-not-work-in-visual-studio-2012-after-upgrading-to-mvc-5-razor-3
and it is mid November
I have a tutorial that will not only get your empty MVC 5 project working with Bundling, a controller, jQuery, jQuery UI, Modernizr and more, but it will walk you through installing Zurb's Foundation 5, a responsive Framework which I have working with Sass in MVC 5. It's all here:
http://tinyurl.com/VS12-MVC5-F5
The problem many have ran into is that Visual Studio 2012 only allows you to start from a blank MVC 5 project, so I will help you get the NuGet installed which is pretty similar to the instructions in the NuGet package with a few minor changes; however, it does not take into consideration that you will be installing from Visual Studio 2012 using a Blank MVC 5 project. If you would like to use Foundation 5 with MVC 4 Web Application template just omit the Bootstrap uninstall and the NuGet package should work fine, but if you need to use MVC 5 and you don’t have Visual Studio 2013, you will need to build the Home Controller, Bundling class, modify the Global.asax.cs as well as other quirky little things. So lets get started.
I spent a good part of a few hours getting it all working.

Add xUnit test project to an existing Visual Web Developer 2010 express MVC application

Maybe it's very easy but I'm trying to add support for xUnit in Visual Web Developer 2010 Express. I followed this tutorial on how to install everything but the main problem is that this tutorial only show how to add a test project to a new project and not to an existing one. When I do "Add New Project", there is not "xunit" or "test project" anywhere...
Anybody know how or can point me to a good tutorial?
A standard Windows Library (.DLL) project will work fine and is the normal project type used for xUnit.net Tests - all the existing mechanism really added was the inclusion of some example tests to start you off.
This (not having templates) is the approach being taken with future xUnit versions. You'll find some discussion of the reasoning behind this on http://xunit.codeplex.com/discussions

MVC project on VS2010 error : The project type is not supported by this installation

I'm trying to open MVC project using VS2010.
I'm opening this project from TFS server but I'm failed to open it
and getting error :
The project type is not supported by this installation.
please help.
You basically don't have something installed. That's why you get this error. I am very sure that you need to install the VS MVC project type - either MVC 2 or MVC 3. Use The Web Plaform Installer to install. The web platform installer can be found here: http://www.microsoft.com/web/downloads/platform.aspx. Once you have installed it (it is only 2MB) you need to search for "MVC", install the MVC 2 and MVC 3 project templates.
I got this error when I forgot to select the Web Developer feature in the Visual Studio setup. Unfortunately, the error you mentioned is the only error you get when Visual Studio 2010 is installed without this feature. You can install the Web Developer feature using the Windows control panel.
By popular demand (7+ and counting), I'm placing part of CodingWithSpike's comment here. Specifically, the procedure to explicitly add Visual Web Designer to VS install.
open Control Panel
select Programs and Features (or Add/Remove Programs)
choose Visual Studio
click "Uninstall/Change"
this opens the VS installer in maintenance mode.
Click "Next" once
Click "Add or Remove Features"
Checkbox "Visual Web Designer"
click Update button.
Enjoy having a working product!
Edit the project.csproj file and look at the <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
The GUIDS above includes MVC 3 Tools Update. That's a good guess of what you are missing. You can get MVC 3/TU from http://www.asp.net/mvc/mvc3
BTW, that install includes VS2010 SP1 which is required for the TU edition.
If you've installed Visual Studio 2010 after Visual Studio Web Dev Express and MVC4, Visual Studio 2010 doesn't seem to pick up the MVC 4 templates. Running the MVC 4 installer again via the Web Platform Installer doesn't fix it. Repairing the MVC 4 installation fixed it in my case:
Under Control Panel, choose Programs/Uninstall a program.
Find Microsoft ASP.NET MVC 4 and double-click it.
The Microsoft ASP.NET MVC 4 Setup prompt will appear. Choose Repair.
Visual Studio 2010 Express to Pro, ASP.NET MVC 4 installed but not an option?
in my case, i had opened my VS2010 solution, in vs2012, i was getting the project type is not supported, tried re installing mvc3 as was suggested, cancelled re installation, then i had the issue i couldn't open the project in VS2010 anymore. then tried to re install mcv3 again. solution was, uninstall mcv3, uninstall mcv4, then reinstall mcv3, then i could reopen my project in VS2010 . hope this helps someone!

ASP .NET MVC Freezes Visual Studio during new Project Creation

I'm using VS 2008 with SP1, on WinXP Pro, and I successfully installed the MVC package from Microsoft. I start a new project, select the MVC web project type, and give it a name and folder. When I press go it hangs forever.
The "ProjectName" folder is created, but nothing else is there.
I can create and open all my other projects without any issues.
Any ideas what's causing this issue? I can't try the MVC framework if I can't create a project!
If you use Process Monitor & Process Explorer, you can probably find out what VS is waiting for.
PM: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
PE: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
I had a similar issue: Instead of uninstalling Visual Studio add-ons I tried the fix.
I found this blog post form the VS team:
http://blogs.msdn.com/webdevtools/archive/2009/03/03/hotfix-available-for-asp-net-mvc-crashes-with-azure-power-commands-resharper.aspx
that points to a fix:
https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827&wa=wsignin1.0
It Worked!
Give a try to ASP.NET MVC 2 Preview 2.

ASP.net MVC RTM - "project type is not supported"

After installing ASP.net MVC, when I attempt to load a existing or a new MVC application (straight from New Project - A project for creating an application using the ASP.NET MVC framework (1.0) (.NET Framework 3.5)) I get the following error:
Microsoft Visual Studio
The project file 'path' cannot be opened.
The project type is not supported by this installation.
OK Help
Tried reinstalling which didn't help. Tried devenv /setup which also didn't help.
Any ideas?
The reason was because I didn't have the Visual Web Development part of VS installed. I only had the C# language. As such, MVC didn't check and installed successfully but couldn't use the underlying part.
After installing the Web Dev bit everything worked as expected...
You could also try to run the following command:
devenv /ResetSkipPkgs
This will try to load any Visual Studio packages that failed previously at some point, such as the WPF project flavor package, which would cause the error message you're seeing.
Not sure if this is the same issue but going through the uninstall and re-install of beta and RC versions and finally the RTW I ended up with two ASP.NET MVC Web Application icons in my "File/New/Project" dialog.
If I click the first link, my project does not load correctly. But if I click the second one everythign works great.
I haven't dug into the templates folder to see if there is a remnant from a previous version or what.
Brian
Did you install SP1 for .Net and VS2008?
The way I corrected this issue of not being able to open a ASP.NET MVC 1.0 for myself goes like this when I was using VS 2008
Install SP1 for VS 2008
Install MVC 2.0 framework
I realized I had an MVC 1.0 project and I used this tool to change the project to MVC 2.0.
The tool works great, props to Eilon Lipton never met the guy but I'm down with anyone that will make my life easier.
http://weblogs.asp.net/leftslipper/archive/2009/10/19/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx

Resources