Import.targets 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildPlatform)' == 'SILVERLIGHT' AND !('$(BuildFlavor)' == 'SILVERLIGHTM7') " />
  7. <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildFlavor)' == 'SILVERLIGHTM7' " />
  8. <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildFlavor)' == 'SILVERLIGHTM7' " />
  9. <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildFlavor)' == 'WINDOWS_PHONE8' "/>
  10. <Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' != '.NETPortable' And '$(BuildFlavor)' == 'WINDOWS_PHONE8' "/>
  11. <!-- Portable Library Build -->
  12. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" Condition=" '$(TargetFrameworkIdentifier)' == '.NETPortable' " />
  13. <!-- If "Sign" is set and assembly should be signed, generate a .sign file-->
  14. <Target Name="AfterBuild">
  15. <WriteLinesToFile Condition=" '$(ProductSignAssembly)' == 'true' AND '$(Sign)' == 'Sign' "
  16. File="$(OutDir)\$(TargetFileName).sign"
  17. Overwrite="true"
  18. Lines="Auto-generated file, indicates the corresponding binary file needs to be signed.">
  19. </WriteLinesToFile>
  20. <!-- 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 -->
  21. <!-- For some reason, using a plain <ItemGroup> does not fill in the list correctly, so we must use <CreateItem> -->
  22. <CreateItem Include="$(OutDir)\*.sign;$(OutDir)\*.xml" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' ">
  23. <Output TaskParameter="Include" ItemName="CanaryFiles" />
  24. </CreateItem>
  25. <Message Text="-- Canary files: @(CanaryFiles)" Importance="high"/>
  26. <Move
  27. SourceFiles="@(CanaryFiles)"
  28. DestinationFolder="$(OutDir)\.."
  29. Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' " />
  30. <!-- For some reason, using a plain <ItemGroup> does not fill in the list correctly, so we must use <CreateItem> -->
  31. <CreateItem Include="$(OutDir)\*.*" Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' ">
  32. <Output TaskParameter="Include" ItemName="BuiltFilesInOutDir" />
  33. </CreateItem>
  34. <Message Text="-- Built files: @(BuiltFilesInOutDir)" Importance="high"/>
  35. <Copy
  36. SourceFiles="@(BuiltFilesInOutDir)"
  37. DestinationFolder="$(OutDir)\.."
  38. Condition=" '$(TargetFrameworkIdentifier)' == '.NETCore' " />
  39. </Target>
  40. <!-- MICROSOFT BCL ASYNC CONFIGURATION -->
  41. <!-- TODO: Add acondition to only load it when required? -->
  42. <!-- Skip validation of packages.config since we are manageing the packages manuallt -->
  43. <PropertyGroup>
  44. <SkipValidatePackageReferences>true</SkipValidatePackageReferences>
  45. </PropertyGroup>
  46. <Import Project="packages\Microsoft.Bcl.Build.1.0.4\tools\Microsoft.Bcl.Build.targets" Condition=" '$(BuildTarget)' == 'PLLITE' Or '$(BuildTarget)' == '40' " />
  47. </Project>