|
2 | 2 |
|
3 | 3 | <PropertyGroup> |
4 | 4 | <IsTestProject>$(MSBuildProjectName.EndsWith('Tests'))</IsTestProject> |
| 5 | + <IsBenchmarkProject>$(MSBuildProjectName.EndsWith('Benchmarks'))</IsBenchmarkProject> |
| 6 | + <IsSourceProject>$(MSBuildProjectDirectory.ToLower().StartsWith('$(MSBuildThisFileDirectory.ToLower())src'))</IsSourceProject> |
| 7 | + <IsToolingProject>$(MSBuildProjectDirectory.ToLower().StartsWith('$(MSBuildThisFileDirectory.ToLower())tooling'))</IsToolingProject> |
5 | 8 | <IsLinux>$([MSBuild]::IsOSPlatform('Linux'))</IsLinux> |
6 | 9 | <IsWindows>$([MSBuild]::IsOSPlatform('Windows'))</IsWindows> |
7 | 10 | <IsMainAuthor Condition="'$(EMAIL)' == 'classlibrary1@dot.net'">true</IsMainAuthor> |
|
14 | 17 | <Deterministic>true</Deterministic> |
15 | 18 | </PropertyGroup> |
16 | 19 |
|
17 | | - <PropertyGroup Condition="'$(IsTestProject)' == 'false'"> |
18 | | - <TargetFrameworks>net8.0</TargetFrameworks> |
19 | | - <Copyright>Copyright © ClassLibrary1 2024. All rights reserved.</Copyright> |
| 20 | + <PropertyGroup Condition="'$(IsSourceProject)' == 'true'"> |
| 21 | + <TargetFrameworks>net10.0</TargetFrameworks> |
| 22 | + <Copyright>Copyright © ClassLibrary1 2025. All rights reserved.</Copyright> |
20 | 23 | <Authors>ClassLibrary1</Authors> |
21 | 24 | <Company>ClassLibrary1</Company> |
22 | 25 | <Product>ClassLibrary1</Product> |
|
34 | 37 | <GenerateDocumentationFile>true</GenerateDocumentationFile> |
35 | 38 | <SignAssembly Condition="('$(CI)' == 'true' OR '$(IsMainAuthor)' == 'true') AND '$(SkipSignAssembly)' == 'false'">true</SignAssembly> |
36 | 39 | <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)ClassLibrary1.snk</AssemblyOriginatorKeyFile> |
37 | | - <NoWarn>7035,CA2260</NoWarn> |
| 40 | + <EnableNETAnalyzers>true</EnableNETAnalyzers> |
| 41 | + <AnalysisLevel>latest</AnalysisLevel> |
| 42 | + <AnalysisMode>Recommended</AnalysisMode> |
| 43 | + <NoWarn>7035,CA2260,S6618</NoWarn> |
| 44 | + <MinVerTagPrefix>v</MinVerTagPrefix> |
| 45 | + <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> |
38 | 46 | </PropertyGroup> |
39 | 47 |
|
40 | 48 | <ItemGroup Condition="'$(NuGetPackageRoot)' != ''"> |
41 | 49 | <SourceRoot Include="$(NuGetPackageRoot)" RepositoryUrl="https://github.com/classlibrary1/ClassLibrary1" /> |
42 | 50 | </ItemGroup> |
43 | 51 |
|
44 | | - <ItemGroup Condition="'$(IsTestProject)' == 'false'"> |
| 52 | + <ItemGroup Condition="'$(IsSourceProject)' == 'true'"> |
45 | 53 | <PackageReference Include="MinVer" PrivateAssets="all" /> |
46 | 54 | <None Include="..\..\.nuget\$(MSBuildProjectName)\icon.png" Pack="true" Visible="false" PackagePath="\" /> |
47 | 55 | <None Include="..\..\.nuget\$(MSBuildProjectName)\README.md" Pack="true" PackagePath="\" /> |
48 | 56 | </ItemGroup> |
49 | 57 |
|
50 | 58 | <PropertyGroup Condition="'$(IsTestProject)' == 'true' AND '$(IsLinux)' == 'true'"> |
51 | | - <TargetFrameworks>net8.0</TargetFrameworks> |
| 59 | + <TargetFrameworks>net10.0</TargetFrameworks> |
52 | 60 | </PropertyGroup> |
53 | 61 |
|
54 | 62 | <PropertyGroup Condition="'$(IsTestProject)' == 'true' AND '$(IsWindows)' == 'true'"> |
55 | | - <TargetFrameworks>net8.0</TargetFrameworks> |
| 63 | + <TargetFrameworks>net10.0</TargetFrameworks> |
56 | 64 | </PropertyGroup> |
57 | 65 |
|
58 | 66 | <PropertyGroup Condition="'$(IsTestProject)' == 'true'"> |
59 | 67 | <IsPackable>false</IsPackable> |
| 68 | + <OutputType>Exe</OutputType> |
60 | 69 | <RunAnalyzers>false</RunAnalyzers> |
61 | 70 | <RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild> |
62 | 71 | <RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis> |
63 | 72 | <SonarQubeExclude>true</SonarQubeExclude> |
64 | | - <WarningLevel>0</WarningLevel> |
65 | 73 | <AnalysisLevel>none</AnalysisLevel> |
66 | | - <NoWarn>NU1701,NETSDK1206</NoWarn> |
| 74 | + <NoWarn>NU1701,NU1902,NU1903</NoWarn> |
67 | 75 | <CheckEolTargetFramework>false</CheckEolTargetFramework> |
| 76 | + <NuGetAudit>false</NuGetAudit> |
| 77 | + <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner> |
| 78 | + </PropertyGroup> |
| 79 | + |
| 80 | + <PropertyGroup Condition="'$(IsTestProject)' == 'true' AND '$(BuildingInsideVisualStudio)' != 'true'"> |
| 81 | + <WarningLevel>0</WarningLevel> |
| 82 | + </PropertyGroup> |
| 83 | + |
| 84 | + <PropertyGroup Condition="'$(IsToolingProject)' == 'true'"> |
| 85 | + <IsPackable>false</IsPackable> |
| 86 | + <OutputType>Exe</OutputType> |
| 87 | + <SonarQubeExclude>true</SonarQubeExclude> |
68 | 88 | </PropertyGroup> |
69 | 89 |
|
70 | 90 | <ItemGroup Condition="'$(IsTestProject)' == 'true'"> |
71 | 91 | <PackageReference Include="Microsoft.NET.Test.Sdk" /> |
72 | | - <PackageReference Include="xunit" /> |
73 | | - <PackageReference Include="xunit.runner.console" /> |
| 92 | + <PackageReference Include="xunit.v3" /> |
| 93 | + <PackageReference Include="xunit.v3.runner.console" /> |
74 | 94 | <PackageReference Include="xunit.runner.visualstudio" /> |
75 | 95 | <PackageReference Include="coverlet.msbuild"> |
76 | 96 | <PrivateAssets>all</PrivateAssets> |
|
80 | 100 | <PrivateAssets>all</PrivateAssets> |
81 | 101 | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
82 | 102 | </PackageReference> |
83 | | - <PackageReference Include="Codebelt.Extensions.Xunit.App" PrivateAssets="all" /> |
| 103 | + </ItemGroup> |
| 104 | + |
| 105 | + <ItemGroup Condition="'$(IsTestProject)' == 'true'"> |
| 106 | + <PackageReference Include="Codebelt.Extensions.Xunit.App" /> |
| 107 | + </ItemGroup> |
| 108 | + |
| 109 | + <PropertyGroup Condition="'$(IsBenchmarkProject)' == 'true'"> |
| 110 | + <TargetFrameworks>net10.0</TargetFrameworks> |
| 111 | + </PropertyGroup> |
| 112 | + |
| 113 | + <ItemGroup Condition="'$(IsBenchmarkProject)' == 'true'"> |
| 114 | + <PackageReference Include="BenchmarkDotNet" /> |
| 115 | + <PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" /> |
84 | 116 | </ItemGroup> |
85 | 117 |
|
86 | 118 | </Project> |
0 commit comments