Visual Studio 2012 and Razor 1.0 (opening an older project in 2012)

VisualStudio 2012 assumes we are using the latest and greatest (version 2) when it comes to the Razer view engine. However when we are opening a project that was created using version 2010 then we were using 1.0 and that is the reason that 2012 is telling us about all the errors it believes we have with our project.

The solution is to edit the web.config file and under “appSettings” tell VisualStudio that this project is using version 1.0

<add key="webpages:Version" value="1.0" />

Specifying the JVM to run Eclipse with

Specifying the JVM Eclipse should use is both a nice way to make sure it is correct now and to know that future upgrades/updates won’t mess with this.

This is done by specifying the -vm option in the “eclipse.ini” file.

Important bits to know about this:

  • -vm option and the path must not be on the same line
  • You should give the Java excecutable here, not just the path where is is located
  • if you also have -vmargs the -vm must be before that in the ini file

Example eclipse.ini (for windows)

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\progra~1\Java\jdk1.6.0_26\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m