The famously unhelpful Visual Studio error message ‘
The project type is not supported by this installation‘ usually means that there is something you don’t have installed. But it doesn’t tell you what.
You can work out what you’re missing if you know the
Guids to look for in the project file. Look for a line near the top of the file something like this:
After which you can decode the Guid using either the table here:
||Tools Needed to Open Project
||Asp.Net MVC 3
||Asp.Net MVC 4
Or the more extensive list at http://www.mztools.com/articles/2008/mz2008017.aspx. If you’re stuck try http://google.com/search?q=visual+studio+project+type+guid+list
You try to open an MVC2 project that worked on a previous machine but won’t open on your new machine? The error message you get when you try to open the project is:
error MSB4019: The imported project “C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets” was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Possibly your new machine has never had Visual Studio 2008 on it, whereas your old machine did. In which case the solutions is:
- Find a machine on which VS2008 has been installed
- Copy the contents of C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications to your new machine
With thanks to http://stackoverflow.com/users/603670/ben-barreth
public void SetUpHttpSessionMock()
HttpWorkerRequest _wr = new SimpleWorkerRequest("/dummyWorkerRequest", @"c:\inetpub\wwwroot\dummy", "default.aspx", null, new StringWriter());
HttpContext.Current = new HttpContext(_wr);
HttpSessionStateContainer sessionContainer = new HttpSessionStateContainer("id", new SessionStateItemCollection(), new HttpStaticObjectsCollection(), 10, true, HttpCookieMode.AutoDetect, SessionStateMode.InProc, false);
You have something like this:
Server Error in ‘/Vendorapplication’ Application.
Could not load file or assembly ‘Oracle.DataAccess’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly ‘Oracle.DataAccess’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
|An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
It’s because you are trying to run 32 bit dlls on a 64 bit system.
Fix it in IIS manager by changing the advanced settings on you application pool to enable 32 bit applications. Or create a new app pool specifically for them.
Alex James Brown has a nice picture: change app pool to 32 bit