Tim Van Wassenhove

Passionate geek, interested in Technology. Proud father of two

07 Nov 2010

Build your solution with Visual Studio from MSBuild

Unfortunately MSBuild and BIDS Helper are not able to build an .asdatabase from our Analysis Services project (.dwproj). Here is a task which invokes Visual Studio to build such a solution:

<Target Name="DevEnvBuild">
	<Error Condition="'$(SolutionFile)'=="" Text="Missing SolutionFile" />
	<PropertyGroup>
		<DevEnvTool Condition="'$(DevEnvTool)'=="">C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</DevEnvTool>
		<DevEnvSwitch Condition="'$(DevEnvSwitch)'=="">Build</DevEnvSwitch>
		<DevEnvBuildCommand>"$(DevEnvTool)" "$(SolutionFile)" /$(DevEnvSwitch)</DevEnvBuildCommand>
	</PropertyGroup>
	<Exec Command="$(DevEnvBuildCommand)" />
</Target>