Tag Archive: visual studio 2010


If you get this message during compilation, right click on the solution and select Configuration Manager. For the build configuration you have selected, check the box of the project that compiler complained about.

Advertisements

SQLCMD Mode

Okay, so there is a SQLCMD Mode for the query window in Management Studio for SQL Server. However, what I didn’t know was that there is also a SQLCMD Mode for the Transact-SQL Editor in Visual Studio 2010. Apparently, in order to compile any SQLCMD syntax inside of a script, such as the post deployment script for a database project, you must have SQLCMD turned on to avoid any parser errors. Cheers!

When I was migrating our TFS build to .NET Framework 4.0 from 3.5 SP1, I got the following error.

error MSB4062: The “xxx” task could not be loaded from the assembly xxx.dll. Could not load file or assembly ‘file:///xxx.dll’ or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. Confirm that the declaration is correct, and that the assembly and all its dependencies are available.

To resolve this error, you’d have to change the full path to the directory of MSBuild.exe in the TFS build service configuration file.

  1. Stop the Visual Studio Team Foundation Build service.
  2. Open the file C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\tfsbuildservice.exe.config.
  3. Set the path for the new .NET Framework in the MSBuildPath setting: <add key="MSBuildPath" value="C:\Windows\Microsoft.NET\Framework\v4.0.30319" />
  4. Start the service.

Today I migrated our Visual Studio 2008 solution to Visual Studio 2010, and I started getting the following error when I kicked off a TFS build.

“The working folder [/source] is already in use by the workspace [workspace name];[owner] on computer [tfs server].”

After some research, it turned out that I just needed to run a command to clear the workspace cache.


tf workspace /delete /server:[tfs server] [workspace name];[owner]

Not too bad. 🙂