|
1 | 1 | <Project>
|
2 |
| - |
3 |
| - <PropertyGroup> |
4 |
| - <Authors>MyCSharp.de, Benjamin Abt, Günther Foidl and Contributors</Authors> |
| 2 | + <PropertyGroup Label="Project"> |
5 | 3 | <Product>MyCSharp.HttpClientHints</Product>
|
6 |
| - <DefaultLanguage>en-US</DefaultLanguage> |
7 |
| - <NoPackageAnalysis>true</NoPackageAnalysis> |
8 |
| - <DebugType>embedded</DebugType> |
9 |
| - </PropertyGroup> |
10 |
| - |
11 |
| - <PropertyGroup Label="Env"> |
12 |
| - |
13 |
| - <IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject> |
14 |
| - <IsBenchmarkProject>$(MsBuildProjectName.Contains('Benchmark'))</IsBenchmarkProject> |
15 |
| - </PropertyGroup> |
16 |
| - |
17 |
| - <PropertyGroup Label="Package"> |
18 |
| - <PackageProjectUrl>https://github.com/mycsharp/HttpClientHints</PackageProjectUrl> |
19 |
| - <PublishRepositoryUrl>true</PublishRepositoryUrl> |
20 |
| - <Description>HTTP Client Hints for .NET</Description> |
21 |
| - <MinClientVersion>2.12</MinClientVersion> |
22 |
| - <IsPackable>false</IsPackable> |
23 |
| - <PackageTags>UserAgent, User Agent, Client Hints, Browser, Client, Detector, Detection, Console, ASP, Desktop, Mobile</PackageTags> |
24 |
| - <EmbedUntrackedSources>true</EmbedUntrackedSources> |
| 4 | + <Authors>MyCSharp.de, Benjamin Abt, Günther Foidl and Contributors</Authors> |
| 5 | + <Company>MyCSharp.de</Company> |
25 | 6 | </PropertyGroup>
|
26 | 7 |
|
27 |
| - <PropertyGroup Label="Project Defaults"> |
28 |
| - <TargetFrameworks>net8.0;net9.0</TargetFrameworks> |
29 |
| - </PropertyGroup> |
| 8 | + <PropertyGroup Label="Vars"> |
| 9 | + <IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows> |
| 10 | + <IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX> |
| 11 | + <IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux> |
30 | 12 |
|
31 |
| - <PropertyGroup Label="C#"> |
32 |
| - <LangVersion>12.0</LangVersion> |
33 |
| - <Nullable>enable</Nullable> |
34 |
| - <ImplicitUsings>enable</ImplicitUsings> |
35 |
| - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
| 13 | + <IsTestProject>$(MSBuildProjectName.EndsWith('Tests'))</IsTestProject> |
| 14 | + <IsUnitTestProject>$(MSBuildProjectName.EndsWith('UnitTests'))</IsUnitTestProject> |
| 15 | + <IsIntegrationTestProject>$(MSBuildProjectName.EndsWith('IntegrationTests'))</IsIntegrationTestProject> |
| 16 | + <IsBenchmarkProject>$(MsBuildProjectName.EndsWith('Benchmarks'))</IsBenchmarkProject> |
36 | 17 | </PropertyGroup>
|
37 | 18 |
|
38 |
| - <PropertyGroup Condition="'$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true'"> |
39 |
| - <GenerateDocumentationFile Condition="'$(Configuration)' == 'Release'">true</GenerateDocumentationFile> |
| 19 | + <PropertyGroup Label="Assembly"> |
| 20 | + <TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks> |
| 21 | + <RootNamespace>MyCSharp.$(MSBuildProjectName)</RootNamespace> |
| 22 | + <AssemblyName>MyCSharp.$(MSBuildProjectName)</AssemblyName> |
40 | 23 | </PropertyGroup>
|
41 | 24 |
|
42 | 25 | <PropertyGroup>
|
|
52 | 35 | </PublicKey>
|
53 | 36 | </PropertyGroup>
|
54 | 37 |
|
55 |
| - <!-- Block Projects with Privacy/Security Concerns --> |
| 38 | + <PropertyGroup Label="Compiler"> |
| 39 | + <LangVersion>preview</LangVersion> |
| 40 | + <DebugType>embedded</DebugType> |
| 41 | + <Nullable>enable</Nullable> |
| 42 | + <DefaultLanguage>en-US</DefaultLanguage> |
| 43 | + <ImplicitUsings>enable</ImplicitUsings> |
| 44 | + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
| 45 | + </PropertyGroup> |
| 46 | + |
| 47 | + <PropertyGroup Label="Package"> |
| 48 | + <IsPackable>false</IsPackable> |
| 49 | + <NoPackageAnalysis>true</NoPackageAnalysis> |
| 50 | + <MinClientVersion>2.12</MinClientVersion> |
| 51 | + <EmbedUntrackedSources>true</EmbedUntrackedSources> |
| 52 | + |
| 53 | + <Description>HTTP Client Hints for .NET</Description> |
| 54 | + <PackageProjectUrl>https://github.com/mycsharp/HttpClientHints</PackageProjectUrl> |
| 55 | + <RepositoryUrl>https://github.com/mycsharp/HttpClientHints</RepositoryUrl> |
| 56 | + <PackageTags>UserAgent, User Agent, Client Hints, Browser, Client, Detector, Detection, Console, ASP, Desktop, Mobile</PackageTags> |
| 57 | + </PropertyGroup> |
| 58 | + |
| 59 | + <PropertyGroup Condition="'$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true'"> |
| 60 | + <GenerateDocumentationFile>true</GenerateDocumentationFile> |
| 61 | + </PropertyGroup> |
| 62 | + |
| 63 | + <PropertyGroup Label="Visual Studio"> |
| 64 | + <!-- https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-5-performance-enhancements/ --> |
| 65 | + <AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio> |
| 66 | + </PropertyGroup> |
| 67 | + |
| 68 | + <PropertyGroup Label="NuGet Audit"> |
| 69 | + <NuGetAudit>true</NuGetAudit> |
| 70 | + <NuGetAuditMode>all</NuGetAuditMode> |
| 71 | + <NuGetAuditLevel>low</NuGetAuditLevel> |
| 72 | + </PropertyGroup> |
| 73 | + |
| 74 | + <ItemGroup Label="Default Test Dependencies" Condition="'$(IsTestProject)' == 'true'"> |
| 75 | + <PackageReference Include="Microsoft.NET.Test.Sdk" /> |
| 76 | + <PackageReference Include="Microsoft.Extensions.Diagnostics.Testing" /> |
| 77 | + <PackageReference Include="NSubstitute" /> |
| 78 | + <PackageReference Include="NSubstitute.Analyzers.CSharp"> |
| 79 | + <PrivateAssets>all</PrivateAssets> |
| 80 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| 81 | + </PackageReference> |
| 82 | + <PackageReference Include="xunit.v3" /> |
| 83 | + <PackageReference Include="xunit.v3.extensibility.core"/> |
| 84 | + <PackageReference Include="xunit.v3.assert" /> |
| 85 | + <PackageReference Include="xunit.runner.console"> |
| 86 | + <PrivateAssets>all</PrivateAssets> |
| 87 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
| 88 | + </PackageReference> |
| 89 | + <PackageReference Include="xunit.runner.visualstudio"> |
| 90 | + <PrivateAssets>all</PrivateAssets> |
| 91 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
| 92 | + </PackageReference> |
| 93 | + </ItemGroup> |
| 94 | + |
| 95 | + <ItemGroup Label="Default Analyzers"> |
| 96 | + <PackageReference Include="Roslynator.Analyzers"> |
| 97 | + <PrivateAssets>all</PrivateAssets> |
| 98 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| 99 | + </PackageReference> |
| 100 | + <PackageReference Include="Roslynator.Formatting.Analyzers"> |
| 101 | + <PrivateAssets>all</PrivateAssets> |
| 102 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| 103 | + </PackageReference> |
| 104 | + <PackageReference Include="Roslynator.CodeAnalysis.Analyzers"> |
| 105 | + <PrivateAssets>all</PrivateAssets> |
| 106 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| 107 | + </PackageReference> |
| 108 | + <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> |
| 109 | + <PackageReference Include="Microsoft.CodeAnalysis.Common" /> |
| 110 | + <PackageReference Include="Microsoft.CodeAnalysis.CSharp" /> |
| 111 | + <PackageReference Include="Meziantou.Analyzer"> |
| 112 | + <PrivateAssets>all</PrivateAssets> |
| 113 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| 114 | + </PackageReference> |
| 115 | + </ItemGroup> |
| 116 | + |
| 117 | + <!-- Block Projects with Privacy/Security/License Concerns --> |
56 | 118 | <Target Name="CheckBlockedPackages" AfterTargets="ResolvePackageDependenciesForBuild">
|
57 | 119 | <Error Code="420" Text="Blocked package dependency detected: %(PackageDependencies.Identity)"
|
58 | 120 | Condition="'%(PackageDependencies.Identity)' == 'Devlooped.SponsorLink'" />
|
| 121 | + <Error Code="420" Text="Blocked package dependency detected: %(PackageDependencies.Identity)" |
| 122 | + Condition="'%(PackageDependencies.Identity)' == 'FluentAssertions'" /> |
59 | 123 | </Target>
|
60 | 124 |
|
61 | 125 | </Project>
|
0 commit comments