Skip to content

Commit d1f3a59

Browse files
committed
Use Directory.Build.props
1 parent aab58f4 commit d1f3a59

File tree

10 files changed

+106
-69
lines changed

10 files changed

+106
-69
lines changed

build.cake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ var WindowsFormsResult = new ExpectedResult("Passed")
4040
};
4141

4242
var PackageTests = new PackageTest[] {
43-
new PackageTest(
44-
1, "NetCore11PackageTest", "Run mock-assembly.dll targeting .NET Core 1.1",
45-
"tests/netcoreapp1.1/mock-assembly.dll", MockAssemblyResult1),
4643
new PackageTest(
4744
1, "NetCore21PackageTest", "Run mock-assembly.dll targeting .NET Core 2.1",
4845
"tests/netcoreapp2.1/mock-assembly.dll", MockAssemblyResult2),

nunit.snk

-596 Bytes
Binary file not shown.

src/Directory.Build.props

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!-- Top level Directory.Build.props -->
2+
<Project>
3+
4+
<PropertyGroup>
5+
<!-- Compile and Build Settings -->
6+
<LangVersion>12</LangVersion>
7+
<Features>strict</Features>
8+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<!--<EnableNETAnalyzers>true</EnableNETAnalyzers>
10+
<AnalysisMode>Minimum</AnalysisMode>
11+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>-->
12+
<Version Condition="'$(Version)'==''">2.0.0.0</Version>
13+
<OutputPath>$(MSBuildThisFileDirectory)\..\bin\$(Configuration)\</OutputPath>
14+
<PlatformTarget>AnyCPU</PlatformTarget>
15+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
16+
<RollForward>Major</RollForward>
17+
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
18+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
19+
<!-- Signing Assemblies -->
20+
<SignAssembly>true</SignAssembly>
21+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)testcentric.snk</AssemblyOriginatorKeyFile>
22+
<!-- Debugging -->
23+
<DebugType>portable</DebugType>
24+
<DebugSymbols>true</DebugSymbols>
25+
<!-- Commonly Used Package Versions -->
26+
<AgentCoreVersion>2.2.0-dev00015</AgentCoreVersion>
27+
<EngineVersion>2.0.0-dev01659</EngineVersion>
28+
<ExtensibilityVersion>4.0.0-dev00004</ExtensibilityVersion>
29+
<MetadataVersion>3.0.4</MetadataVersion>
30+
<InternalTraceVersion>1.2.1</InternalTraceVersion>
31+
<!-- Informational Settings -->
32+
<Company>TestCentric</Company>
33+
<Product>TestCentric Gui Runner and Engine</Product>
34+
<Trademark>TestCentric is a trademark of the TestCentric Project</Trademark>
35+
<!-- Keys for Friend Assemblies -->
36+
<NUnitPublicKey>002400000480000094000000060200000024000052534131000400000100010031eea370b1984bfa6d1ea760e1ca6065cee41a1a279ca234933fe977a096222c0e14f9e5a17d5689305c6d7f1206a85a53c48ca010080799d6eeef61c98abd18767827dc05daea6b6fbd2e868410d9bee5e972a004ddd692dec8fa404ba4591e847a8cf35de21c2d3723bc8d775a66b594adeb967537729fe2a446b548cd57a6</NUnitPublicKey>
37+
<NSubstitutePublicKey>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</NSubstitutePublicKey>
38+
</PropertyGroup>
39+
40+
<!-- Version of NUnit and NSubstitute used depends on the target framework -->
41+
<PropertyGroup Condition="'$(TargetFramework)'=='net35'
42+
OR '$(TargetFramework)'=='netcoreapp2.1' OR '$(TargetFramework)'=='netcoreapp3.1'
43+
OR '$(TargetFramework)'=='net5.0' Or '$(TargetFramework)'=='net5.0-windows'" >
44+
<NUnitVersion>3.14.0</NUnitVersion>
45+
<NSubstituteVersion>2.0.3</NSubstituteVersion>
46+
</PropertyGroup>
47+
48+
<!-- Default versions for targets not listed above -->
49+
<PropertyGroup>
50+
<NUnitVersion Condition="'$(NUnitVersion)'==''">4.1.0</NUnitVersion>
51+
<NSubstituteVersion Condition="'$(NSubstituteVersion)'==''">5.3.0</NSubstituteVersion>
52+
</PropertyGroup>
53+
54+
<!-- Common package metadata, may be overridden in individual projects -->
55+
<!-- Each project should supply properties for PackageId, Title and Description -->
56+
<PropertyGroup>
57+
<PackageOutputPath>$(MSBuildThisFileDirectory)..\package</PackageOutputPath>
58+
<IncludeSymbols>true</IncludeSymbols>
59+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
60+
<Authors>CharliePoole</Authors>
61+
<Owners>CharliePoole</Owners>
62+
<Copyright>Charlie Poole and TestCentric Contributors. MIT License.</Copyright>
63+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
64+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
65+
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
66+
<PackageProjectUrl>>https://test-centric.org</PackageProjectUrl>
67+
<!--<PackageIcon>testcentric.png</PackageIcon>
68+
<PackageIconUrl>https://cdn.rawgit.com/nunit/resources/master/images/icon/nunit_256.png</PackageIconUrl>
69+
<PackageReleaseNotes>https://docs.nunit.org/articles/nunit/release-notes/console-and-engine.html</PackageReleaseNotes>-->
70+
<RepositoryUrl>https://github.com/TestCentric/testcentric-gui</RepositoryUrl>
71+
<!--<ReleaseNotes>https://docs.nunit.org/articles/nunit/release-notes/console-and-engine.html</ReleaseNotes>-->
72+
</PropertyGroup>
73+
74+
<ItemGroup>
75+
<None Include="$(MSBuildThisFileDirectory)..\LICENSE.txt" Pack="true" PackagePath="\" />
76+
<None Include="$(MSBuildThisFileDirectory)..\testcentric.png" Pack="true" PackagePath="\" />
77+
</ItemGroup>
78+
79+
<!-- Code Style Analyzers -->
80+
<!--<ItemGroup>
81+
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" PrivateAssets="all" />
82+
<GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)/StyleCop.Analyzers.globalconfig" />
83+
<PackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" PrivateAssets="all" />
84+
</ItemGroup>-->
85+
86+
</Project>

src/aspnetcore-test/aspnetcore-test.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
<PropertyGroup>
44
<TargetFrameworks>net8.0</TargetFrameworks>
55
<OutputPath>..\..\bin\$(Configuration)\tests\</OutputPath>
6-
<OutputType>Library</OutputType>
7-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
6+
<OutputType>Library</OutputType>
87
</PropertyGroup>
98

109
<ItemGroup>
11-
<PackageReference Include="NUnit" Version="4.1.0" />
10+
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<Folder Include="Properties\" />
1215
</ItemGroup>
1316

1417
</Project>

src/mock-assembly/mock-assembly.csproj

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,13 @@
22

33
<PropertyGroup>
44
<RootNamespace>NUnit.Tests</RootNamespace>
5-
<TargetFrameworks>netcoreapp1.1;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
66
<OutputPath>..\..\bin\$(Configuration)\tests\</OutputPath>
7-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
8-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
97
<NuGetAudit>false</NuGetAudit>
108
</PropertyGroup>
119

12-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.1'">
13-
<PackageReference Include="NUnit" Version="3.12.0" />
14-
</ItemGroup>
15-
16-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
17-
<PackageReference Include="NUnit" Version="3.14.0" />
18-
</ItemGroup>
19-
20-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
21-
<PackageReference Include="NUnit" Version="3.14.0" />
22-
</ItemGroup>
23-
24-
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
25-
<PackageReference Include="NUnit" Version="3.14.0" />
26-
</ItemGroup>
27-
28-
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
29-
<PackageReference Include="NUnit" Version="4.1.0" />
30-
</ItemGroup>
31-
32-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
33-
<PackageReference Include="NUnit" Version="4.1.0" />
34-
</ItemGroup>
35-
36-
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
37-
<PackageReference Include="NUnit" Version="4.1.0" />
10+
<ItemGroup>
11+
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
3812
</ItemGroup>
3913

4014
</Project>

src/net80-agent/net80-agent.csproj

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,21 @@
44
<OutputType>Exe</OutputType>
55
<RootNamespace>TestCentric.Agent</RootNamespace>
66
<TargetFramework>net8.0</TargetFramework>
7-
<GenerateSupportedRuntime>false</GenerateSupportedRuntime>
87
<OutputPath>..\..\bin\$(Configuration)\agent\</OutputPath>
98
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
109
<AssemblyName>testcentric-net80-agent</AssemblyName>
1110
<ApplicationManifest>app.manifest</ApplicationManifest>
1211
<ApplicationIcon>..\testcentric.ico</ApplicationIcon>
13-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
14-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
15-
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
1612
<AssemblyTitle>Net70 Pluggable Agent</AssemblyTitle>
1713
<Description>Pluggable Agent for running tests under .NET 7.0</Description>
18-
<Copyright>Copyright (c) 2023 Charlie Poole</Copyright>
1914
</PropertyGroup>
2015

2116
<ItemGroup>
22-
<PackageReference Include="TestCentric.Agent.Core" Version="2.2.0-dev00013" />
23-
<PackageReference Include="TestCentric.Engine.Api" Version="2.0.0-dev01657" />
24-
<PackageReference Include="TestCentric.Extensibility" Version="4.0.0-dev00004" />
25-
<PackageReference Include="TestCentric.Metadata" Version="3.0.4" />
26-
<PackageReference Include="TestCentric.InternalTrace" Version="1.2.1" />
17+
<PackageReference Include="TestCentric.Agent.Core" Version="$(AgentCoreVersion)" />
18+
<PackageReference Include="TestCentric.Engine.Api" Version="$(EngineVersion)" />
19+
<PackageReference Include="TestCentric.Extensibility" Version="$(ExtensibilityVersion)" />
20+
<PackageReference Include="TestCentric.Metadata" Version="$(MetadataVersion)" />
21+
<PackageReference Include="TestCentric.InternalTrace" Version="$(InternalTraceVersion)" />
2722
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
2823
</ItemGroup>
2924

src/net80-launcher-tests/net80-agent-launcher.tests.csproj

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,19 @@
44
<OutputType>Exe</OutputType>
55
<RootNamespace>TestCentric.Agent</RootNamespace>
66
<TargetFramework>net462</TargetFramework>
7-
<GenerateSupportedRuntime>false</GenerateSupportedRuntime>
8-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
97
<OutputPath>..\..\bin\$(Configuration)\</OutputPath>
108
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
119
<ApplicationIcon>..\testcentric.ico</ApplicationIcon>
12-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
13-
<PlatformTarget>AnyCPU</PlatformTarget>
1410
</PropertyGroup>
1511

16-
<ItemGroup>
17-
<Reference Include="System.Runtime.Remoting" />
18-
</ItemGroup>
19-
2012
<ItemGroup>
2113
<ProjectReference Include="..\net80-launcher\net80-agent-launcher.csproj" />
2214
</ItemGroup>
2315

2416
<ItemGroup>
25-
<PackageReference Include="NUnit" Version="4.1.0" />
26-
<PackageReference Include="NUnitLite" Version="4.1.0" />
27-
<PackageReference Include="TestCentric.Engine.Api" Version="2.0.0-dev01657" />
17+
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
18+
<PackageReference Include="NUnitLite" Version="$(NUnitVersion)" />
19+
<PackageReference Include="TestCentric.Engine.Api" Version="$(EngineVersion)" />
2820
</ItemGroup>
2921

3022
<ItemGroup>

src/net80-launcher/net80-agent-launcher.csproj

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,12 @@
33
<PropertyGroup>
44
<RootNamespace>TestCentric.Engine</RootNamespace>
55
<TargetFramework>net462</TargetFramework>
6-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
76
<OutputPath>..\..\bin\$(Configuration)\</OutputPath>
8-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
9-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
10-
<SignAssembly>true</SignAssembly>
11-
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
127
</PropertyGroup>
138

149
<ItemGroup>
15-
<Reference Include="System.Runtime.Remoting" />
16-
</ItemGroup>
17-
18-
<ItemGroup>
19-
<PackageReference Include="TestCentric.Engine.Api" Version="2.0.0-dev01657" />
20-
<PackageReference Include="TestCentric.Extensibility.Api" Version="4.0.0-dev00004" />
10+
<PackageReference Include="TestCentric.Engine.Api" Version="$(EngineVersion)" />
11+
<PackageReference Include="TestCentric.Extensibility" Version="$(ExtensibilityVersion)" />
2112
</ItemGroup>
2213

2314
</Project>
File renamed without changes.

src/windows-forms-test/windows-forms-test.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
<TargetFrameworks>net8.0-windows</TargetFrameworks>
55
<UseWindowsForms>true</UseWindowsForms>
66
<OutputPath>..\..\bin\$(Configuration)\tests\</OutputPath>
7-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
87
</PropertyGroup>
98

109
<ItemGroup>
11-
<PackageReference Include="NUnit" Version="4.1.0" />
10+
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
1211
</ItemGroup>
1312

1413
</Project>

0 commit comments

Comments
 (0)