由于MSBuild 未能直接提供编译.NET framework 1.1的功能, 不能直接在VS2005下使用.NET framework 1.1 编译
幸运的是 MSBuild有强大的扩展性,可以使我们去找到一种办法去解决这个问题。
让我们来看看应该怎么做:
首先把下面这个XML 保存为C:/program files/msbuild/CrossCompile.CSharp.targets, 一定要是这个路径
<!--
Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm
Written by Jomo Fisher
-->
<Project
DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
These two property groups inform VS that there is a Platform called .NET 1.1.
-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|.NET 1.1' ">
<DebugSymbols Condition="'$(DebugSymbols)'==''">true</DebugSymbols>
<DebugType Condition="'$(DebugType)'==''">full</DebugType>
<Optimize Condition="'$(Optimize)'==''">false</Optimize>
<OutputPath Condition="'$(OutputPath)'==''">bin/.NET 1.1/Debug/</OutputPath>
<DefineConstants Condition="'$(DefineConstants)'==''">DEBUG;TRACE</DefineConstants>
<DefineConstants>$(DefineConstants);TARGETTING_FX_1_1</DefineConstants>
<ErrorReport></ErrorReport>
<WarningLevel Condition="'$(WarningLevel)'==''">4</WarningLevel&