Wednesday, November 13, 2013

“Unable to locate tools.jar” when running ant

You need to set your JAVA_HOME environment variable.

Try this before the ant command

set JAVA_HOME=JDK LOCATION HERE

JDK Location is the root of the JDK installed, such as on mine.

C:\Program Files\Java\jdk1.7.0_45

set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45

then type SET to check if it worked, and now try your ant command. I also changed my PATH to point to the JDK\bin folder before my JRE\bin folder, but I think Java check JAVA_HOME first.

Thursday, March 21, 2013

XYZ.sln(1, 1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.

If you are getting this error

XYZ.sln(1, 1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.


Look inside the file for invalid Project or EndProject. Usually it is missing an EndProject, because it works in Visual Studio but fails on our Build Server.