开发者

How is writing the MSBuild for a Silverlight project different?

开发者 https://www.devze.com 2023-03-29 08:48 出处:网络
I have the Import: <Import Project=\"$(MSBuildExtensionsPath)\\Microsoft\\Silverlight\\v4.0\\Microsoft.Silverlight.CSharp.tar ets\" />

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消