-
-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
112 lines (97 loc) · 5.24 KB
/
Directory.Build.props
File metadata and controls
112 lines (97 loc) · 5.24 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup Condition="'$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'TUnit.Pipeline'">
<TargetFrameworks>net10.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<LibraryTargetFramework Condition="$(TargetFramework.StartsWith('net4'))">netstandard2.0</LibraryTargetFramework>
<LibraryTargetFramework Condition="!$(TargetFramework.StartsWith('net4'))">$(TargetFramework)</LibraryTargetFramework>
</PropertyGroup>
<PropertyGroup>
<!-- Disable GitVersion MSBuild task by default - CI computes version once and passes properties explicitly.
This prevents GitVersion from spawning a process per project×TFM (153+ invocations). -->
<DisableGitVersionTask>true</DisableGitVersionTask>
<GenerateGitVersionInformation>false</GenerateGitVersionInformation>
<!-- Re-enable GitVersion for core library projects when building locally, so that
strong-named assembly versions match what NuGet packages (e.g. Verify.TUnit) expect. -->
<_EnableLocalGitVersion Condition="'$(GITHUB_ACTIONS)' != 'true' and (
'$(MSBuildProjectName)' == 'TUnit.Core' or
'$(MSBuildProjectName)' == 'TUnit.Engine' or
'$(MSBuildProjectName)' == 'TUnit.Mocks' or
'$(MSBuildProjectName)' == 'TUnit.Assertions'
)">true</_EnableLocalGitVersion>
<DisableGitVersionTask Condition="'$(_EnableLocalGitVersion)' == 'true'">false</DisableGitVersionTask>
<GenerateGitVersionInformation Condition="'$(_EnableLocalGitVersion)' == 'true'">true</GenerateGitVersionInformation>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<NoWarn>NU1507;NU1903;CS9107</NoWarn>
<BuildTransitivePath>buildTransitive/$(TargetFramework)/</BuildTransitivePath>
<BuildPath>build/netstandard2.0</BuildPath>
</PropertyGroup>
<!-- Shared properties for all Roslyn-versioned variant projects (e.g. TUnit.Analyzers.Roslyn44) -->
<PropertyGroup Condition="$(MSBuildProjectName.Contains('.Roslyn'))">
<_BaseProjectName>$([System.Text.RegularExpressions.Regex]::Replace($(MSBuildProjectName), '\.Roslyn\d+$', ''))</_BaseProjectName>
<_RoslynDigits>$([System.Text.RegularExpressions.Regex]::Match($(MSBuildProjectName), 'Roslyn(\d+)$').Groups[1].Value)</_RoslynDigits>
<RoslynVersion>$([System.Text.RegularExpressions.Regex]::Replace($(_RoslynDigits), '^(\d)', '$1.'))</RoslynVersion>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>$(_BaseProjectName)</AssemblyName>
<RootNamespace>$(_BaseProjectName)</RootNamespace>
<IsPackable>false</IsPackable>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>
<PropertyGroup>
<CurrentYear>$([System.DateTime]::Now.ToString("yyyy"))</CurrentYear>
</PropertyGroup>
<PropertyGroup>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>Copyright (c) Tom Longhurst $(CurrentYear)</Copyright>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/thomhurst/TUnit</PackageProjectUrl>
<Description>A .NET Testing Framework</Description>
<Authors>Tom Longhurst</Authors>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageIcon>logo.jpg</PackageIcon>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PackageTags>testing;unit;integration;component;test;assert;tester;framework</PackageTags>
</PropertyGroup>
<PropertyGroup>
<RoslynVersion Condition="'$(RoslynVersion)' == ''">4.7</RoslynVersion>
</PropertyGroup>
<PropertyGroup>
<IsTestingPlatformApplication Condition="'$(IsTestingPlatformApplication)' == ''">false</IsTestingPlatformApplication>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)assets/logo.jpg" Pack="true" PackagePath="\" />
</ItemGroup>
<PropertyGroup>
<PolyUseEmbeddedAttribute>true</PolyUseEmbeddedAttribute>
</PropertyGroup>
<!-- Include Polyfill for all target frameworks in internal projects -->
<ItemGroup>
<PackageReference Include="Polyfill">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- GitVersion only needed by the 4 core library projects that produce versioned NuGet packages -->
<ItemGroup Condition="
'$(MSBuildProjectName)' == 'TUnit.Core' or
'$(MSBuildProjectName)' == 'TUnit.Engine' or
'$(MSBuildProjectName)' == 'TUnit.Mocks' or
'$(MSBuildProjectName)' == 'TUnit.Assertions'">
<PackageReference Include="GitVersion.MsBuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>