Directory.build.targets 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <Project>
  2. <!-- This props all need to be set in targets as they depend on the values set earlier -->
  3. <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.0'">
  4. <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_CODE_COVERAGE_ATTRIBUTE;CRIPPLED_REFLECTION</DefineConstants>
  5. </PropertyGroup>
  6. <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
  7. <DefineConstants>$(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE;CRIPPLED_REFLECTION</DefineConstants>
  8. </PropertyGroup>
  9. <PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
  10. <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY</DefineConstants>
  11. </PropertyGroup>
  12. <PropertyGroup>
  13. <Product>$(AssemblyName) ($(TargetFramework))</Product>
  14. </PropertyGroup>
  15. <Target Name="GetRefsForPackage" BeforeTargets="_GetPackageFiles"
  16. Condition=" Exists('$(MSBuildThisFileDirectory)refs\$(MSBuildProjectName)\$(MSBuildProjectName).csproj') ">
  17. <MSBuild Projects="$(MSBuildThisFileDirectory)refs\$(MSBuildProjectName)\$(MSBuildProjectName).csproj"
  18. Targets="_GetTargetFrameworksOutput">
  19. <Output TaskParameter="TargetOutputs"
  20. ItemName="_RefTargetFrameworks" />
  21. </MSBuild>
  22. <MSBuild Projects="$(MSBuildThisFileDirectory)refs\$(MSBuildProjectName)\$(MSBuildProjectName).csproj"
  23. Targets="_GetReferenceAssemblies"
  24. Properties="TargetFramework=%(_RefTargetFrameworks.Identity)">
  25. <Output TaskParameter="TargetOutputs"
  26. ItemName="_refAssms" />
  27. </MSBuild>
  28. <ItemGroup>
  29. <None Include="@(_refAssms)" PackagePath="ref/%(_refAssms.TargetFramework)" Pack="true" />
  30. </ItemGroup>
  31. </Target>
  32. </Project>