Directory.build.targets 2.0 KB

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