Building VC++ Projects without Visual Studio

Sunday, July 14, 2013

Building VC++ projects (.vcxproj) without Visual Studio isn't as easy as building C# projects. Today a new build machine setup was failed on CL error: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(147): "CL.exe" exited with code -1073741515. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. Solution 1. Install Windows SDK 7.1 on the build agent. 2. Open C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.props and add to the default PropertyGroup: <PlatformToolset>Windows7.1SDK</PlatformToolset It should look similar to: <PropertyGroup> <TargetExt /> ...
tags: , ,
no comments

No Silverlight project specified for Silverlight output

Sunday, March 18, 2012

When building a mixed solution with C# 4.0 and Silverlight projects, the following error may mislead you to believe something is wrong with the Silverlight project:MSBUILD : error : Copying file C:\Dev\Sources\MyProject\MyProject.Web\debug\bin\MyProject.xap failed. No Silverlight project specified for Silverlight output In fact, what the error means is that the building of a XAP file cannot be done since there are no assemblies in the given output folder. The solution, is changing the Output path in the Silverlight project properties under the Build tab to the main web project instead of “\bin\Debug” and \bin\Release”. Alternatively you can edit the Silverlight’s .csproj file under...
no comments

WPFToolkit: MarkupCompilePass1 failed with error MC1000: Unknown build error, ‘Cannot resolve dependency to assembly’

Wednesday, February 22, 2012

MSBuild has grown to quite a robust level since its introduction on 2003 and its inclusion in .NET Framework 2.0 in 2005. While its core engine and targets are rock-solid consistent, sometimes there are cases where the later additions introduced in .NET 3.5 and 4.0 just don't keep up with same level of stability. Today I had one of these cases. It came from WPF's Microsoft.WinFX.targets: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFX.targets(269,9): error MC1000: Unknown build error, 'Cannot resolve dependency to assembly 'bar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded...
no comments