Directory.build.targets 1.9 KB

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