Import.targets 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <!-- Non-Portable Library build -->
  4. <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v11.0\Microsoft.Windows.UI.Xaml.CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' " />
  5. <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And ('$(BuildPlatform)' == 'DESKTOPCLR' Or '$(BuildPlatform)' == 'XNA') " />
  6. <!-- Silverlight ONLY (i.e., not phone) -->
  7. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildPlatform)' == 'SILVERLIGHT' AND !('$(BuildFlavor)' == 'SILVERLIGHTM7') " />
  8. <!-- Windows Phone 7.1 (Silverlight for Phone) -->
  9. <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildFlavor)' == 'SILVERLIGHTM7' " />
  10. <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildFlavor)' == 'SILVERLIGHTM7' " />
  11. <!-- Windows Phone 8 -->
  12. <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildFlavor)' == 'WINDOWS_PHONE8' "/>
  13. <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildFlavor)' == 'WINDOWS_PHONE8' "/>
  14. <!-- Portable Library Build -->
  15. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' == '.NETPortable' " />
  16. <!-- If "Sign" is set and assembly should be signed, generate a .sign file-->
  17. <Target Name="AfterBuild">
  18. <WriteLinesToFile Condition=" '$(ProductSignAssembly)' == 'true' AND '$(Sign)' == 'Sign' "
  19. File="$(OutDir)\$(TargetFileName).sign"
  20. Overwrite="true"
  21. Lines="Auto-generated file, indicates the corresponding binary file needs to be signed.">
  22. </WriteLinesToFile>
  23. <!-- Hack for Metro; for some reason the XAML build creates intermediary folders, so we flatten the hierarchy for consumption by the setup build at a later stage -->
  24. <!-- For some reason, using a plain <ItemGroup> does not fill in the list correctly, so we must use <CreateItem> -->
  25. <CreateItem Include="$(OutDir)\*.sign;$(OutDir)\*.xml" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' ">
  26. <Output TaskParameter="Include" ItemName="CanaryFiles" />
  27. </CreateItem>
  28. <Message Text="-- Canary files: @(CanaryFiles)" Importance="high"/>
  29. <Move
  30. SourceFiles="@(CanaryFiles)"
  31. DestinationFolder="$(OutDir)\.."
  32. Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' " />
  33. <!-- For some reason, using a plain <ItemGroup> does not fill in the list correctly, so we must use <CreateItem> -->
  34. <CreateItem Include="$(OutDir)\*.*" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' ">
  35. <Output TaskParameter="Include" ItemName="BuiltFilesInOutDir" />
  36. </CreateItem>
  37. <Message Text="-- Built files: @(BuiltFilesInOutDir)" Importance="high"/>
  38. <Copy
  39. SourceFiles="@(BuiltFilesInOutDir)"
  40. DestinationFolder="$(OutDir)\.."
  41. Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' " />
  42. </Target>
  43. <!-- MICROSOFT BCL ASYNC CONFIGURATION -->
  44. <!-- TODO: Add acondition to only load it when required? -->
  45. <!-- Skip validation of packages.config since we are manageing the packages manuallt -->
  46. <PropertyGroup>
  47. <SkipValidatePackageReferences>true</SkipValidatePackageReferences>
  48. </PropertyGroup>
  49. <Import Project="packages\Microsoft.Bcl.Build.1.0.4\tools\Microsoft.Bcl.Build.targets" Condition=" '$(BuildTarget)' == 'PLLITE' Or '$(BuildTarget)' == '40' " />
  50. </Project>