I have the Import:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.tar ets" />
and a bunch 开发者_StackOverflow社区of Silverlight specific PropertyGroups such as:
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SchemaVersion>2.0</SchemaVersion>
<NoStdLib>true</NoStdLib>
<NoStdCfg>true</NoStdCfg>
-----etc.
How do I write targets that use the above?
EDIT
I also have these references:
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="system" />
<Reference Include="System.Windows" />
</ItemGroup>
Simply pass all properties to MSBuild task:
<Target Name="....">
<MSBuild Projects="$(ProjectsToBuild)"
Properties="TargetFrameworkVersion=$(TargetFrameworkVersion); ... "/>
</Target>
精彩评论