forked from dotnet/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
47 lines (38 loc) · 3.16 KB
/
Directory.Build.targets
File metadata and controls
47 lines (38 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<Project>
<!-- Properties which should be set after the project has been evaluated -->
<PropertyGroup>
<PackageOutputPath Condition="'$(IsProductComponent)' == 'true' ">$(ProductPackageOutputPath)</PackageOutputPath>
<PackageOutputPath Condition="'$(IsProductComponent)' != 'true' ">$(InternalPackageOutputPath)</PackageOutputPath>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
</PropertyGroup>
<!-- Properties which should be set after the project has been evaluated -->
<PropertyGroup Condition=" '$(MSBuildProjectExtension)' == '.csproj' ">
<PackageId Condition=" '$(PackageId)' == '' ">$(AssemblyName)</PackageId>
<IsPackable Condition="'$(IsPackable)' == '' AND ( '$(IsTestProject)' == 'true' OR '$(IsTestAssetProject)' == 'true' OR '$(IsBenchmarkProject)' == 'true' OR '$(IsSampleProject)' == 'true' ) ">false</IsPackable>
<IsPackable Condition="'$(IsPackable)' == '' ">true</IsPackable>
</PropertyGroup>
<Import Project="eng\Baseline.Designer.props" />
<PropertyGroup Condition=" '$(IsPackable)' != 'false' AND '$(IsServicingBuild)' == 'true' ">
<IsPackable>$(PackagesInPatch.Contains(' $(PackageId);'))</IsPackable>
</PropertyGroup>
<PropertyGroup Condition=" '$(IsPackable)' == 'true' AND '$(BaselinePackageVersion)' != '' AND '$(IsServicingBuild)' == 'true' ">
<!-- This keeps assembly versions consistent across patches. If a package is not included in a patch, its assembly version should stay at the baseline. -->
<AssemblyVersion>$(BaselinePackageVersion).0</AssemblyVersion>
<!--
Ideally, we would also set the project version to match the baseline in case NuGet turns a ProjectReference into a nuspec depenendency, but
NuGet does not currently handle conflicts between packages and projects which have the same package id/version.
See https://github.com/NuGet/Home/issues/6795
-->
<!-- <Version>$(BaselinePackageVersion)</Version> -->
<!-- <PackageVersion>$(BaselinePackageVersion)</PackageVersion> -->
</PropertyGroup>
<PropertyGroup>
<!-- Implementation projects are the projects which produce nuget packages or shipping assemblies. -->
<IsImplementationProject Condition=" '$(IsImplementationProject)' == '' AND '$(IsTestAssetProject)' != 'true' AND '$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true' AND '$(IsSampleProject)' != 'true' ">true</IsImplementationProject>
<!-- Suppress KoreBuild warnings about the mismatch of repo version and local project version. The versioning in this mega repo is sufficiently complicated that KoreBuild's validation isn't helpful. -->
<VerifyVersion>false</VerifyVersion>
</PropertyGroup>
<Import Project="eng\targets\Packaging.targets" Condition=" '$(MSBuildProjectExtension)' == '.csproj' " />
<Import Project="eng\targets\ResolveReferences.targets" Condition=" '$(DisableReferenceRestrictions)' != 'true' AND '$(MSBuildProjectExtension)' == '.csproj' " />
</Project>