Repository navigation
Expand file tree
/
Copy pathThinkMeta.Net.Build.props
More file actions
128 lines (112 loc) · 7.21 KB
/
Copy pathThinkMeta.Net.Build.props
File metadata and controls
128 lines (112 loc) · 7.21 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<Project InitialTargets="CopyFilesToRoot">
<PropertyGroup>
<SolutionDir Condition="'$(SolutionDir)' == ''">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\'))</SolutionDir>
<!--
The .NET version supported by this repository. Solutions that need an older version pin the submodule
to an older commit.
Used for projects that set neither TargetFramework nor TargetFrameworks. Project files use it for
platform-specific target frameworks, e.g. <TargetFramework>$(TM_TargetFramework)-windows</TargetFramework>.
-->
<TM_TargetFramework>net11.0</TM_TargetFramework>
<!--
The SDK defaults Configuration to Debug only after this file. Without a global Configuration (building a
project directly or "dotnet run") the paths below would otherwise miss the configuration folder.
-->
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
</PropertyGroup>
<ItemGroup>
<EditorConfigFile Include="$(SolutionDir)ThinkMeta.SolutionFiles\.editorconfig" />
</ItemGroup>
<!-- Copy .editorconfig to solution's directory -->
<Target Name="CopyFilesToRoot">
<Copy SourceFiles="@(EditorConfigFile)" DestinationFolder="$(SolutionDir)" SkipUnchangedFiles="true" />
</Target>
<!-- Import solution-specific .props files -->
<Import Condition="Exists('$(SolutionDir)SolutionFiles/$(SolutionName).Net.props')" Project="$(SolutionDir)SolutionFiles/$(SolutionName).Net.props"/>
<Import Project="$(SolutionDir)ThinkMeta.SolutionFiles/ThinkMeta.CsWarnings.props"/>
<!-- Import project-specific .props files -->
<Import Condition="Exists('$(MSBuildProjectDirectory)\$(MSBuildProjectName).props')" Project="$(MSBuildProjectDirectory)\$(MSBuildProjectName).props"/>
<!--
Default target framework. It is applied in ThinkMeta.Net.DefaultTargetFramework.targets, which the SDK imports
after the project file (BeforeMicrosoftNETSdkTargets): setting it here would also apply to projects that declare
<TargetFrameworks> in the project file and turn them into single-target builds.
-->
<PropertyGroup>
<TM_BeforeMicrosoftNETSdkTargets>$(BeforeMicrosoftNETSdkTargets)</TM_BeforeMicrosoftNETSdkTargets>
<BeforeMicrosoftNETSdkTargets>$(MSBuildThisFileDirectory)ThinkMeta.Net.DefaultTargetFramework.targets</BeforeMicrosoftNETSdkTargets>
</PropertyGroup>
<!-- Paths -->
<PropertyGroup>
<TM_BuildPath Condition="'$(TM_BuildPath)' == ''">$(SolutionDir)build\</TM_BuildPath>
<BaseOutputPath>$(TM_BuildPath)$(Configuration)\bin\</BaseOutputPath>
<OutputPath>$(TM_BuildPath)$(Configuration)\bin\</OutputPath>
<BaseIntermediateOutputPath>$(TM_BuildPath)$(Configuration)\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(TM_BuildPath)$(Configuration)\obj\$(MSBuildProjectName)\</IntermediateOutputPath>
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
</PropertyGroup>
<!-- GitHub -->
<PropertyGroup>
<TM_GitHubBaseUrl>https://github.com/ThinkMeta-com/</TM_GitHubBaseUrl>
<TM_GitHubProjectName Condition="'$(TM_GitHubProjectName)' == ''">$(SolutionName)</TM_GitHubProjectName>
</PropertyGroup>
<!-- Packaging -->
<PropertyGroup>
<Authors Condition="'$(Authors)' == ''">ThinkMeta Software GmbH</Authors>
<Company Condition="'$(Company)' == ''">ThinkMeta Software GmbH</Company>
<Copyright Condition="'$(Copyright)' == ''">Copyright (c) 2026 ThinkMeta Software GmbH</Copyright>
<RepositoryType Condition="'$(RepositoryType)' == ''">git</RepositoryType>
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == ''">$(TM_GitHubBaseUrl)$(TM_GitHubProjectName)</PackageProjectUrl>
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">$(TM_GitHubBaseUrl)$(TM_GitHubProjectName).git</RepositoryUrl>
<PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(TM_BuildPath)publish\</PackageOutputPath>
<IncludeSymbols Condition="'$(IncludeSymbols)' == ''">True</IncludeSymbols>
<SymbolPackageFormat Condition="'$(SymbolPackageFormat)' == ''">snupkg</SymbolPackageFormat>
</PropertyGroup>
<!-- Global build settings -->
<PropertyGroup>
<Nullable Condition="'$(Nullable)' == ''">enable</Nullable>
<ImplicitUsings Condition="'$(ImplicitUsings)' == ''">true</ImplicitUsings>
<GenerateAssemblyInfo Condition="'$(GenerateAssemblyInfo)' == ''">false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute Condition="'$(GenerateTargetFrameworkAttribute)' == ''">false</GenerateTargetFrameworkAttribute>
<GenerateDocumentationFile Condition="'$(GenerateDocumentationFile)' == ''">true</GenerateDocumentationFile>
</PropertyGroup>
<!--
Runtime async (.NET 11, preview): the runtime suspends and resumes async methods instead of compiler-generated
state machines (less overhead, cleaner stack traces). Opt out per project with <UseRuntimeAsync>false</UseRuntimeAsync>.
Applied in a target, because only the final target framework decides whether the runtime supports it
(a project that targets e.g. netstandard2.0 keeps the state machines).
-->
<Target Name="TM_EnableRuntimeAsync" BeforeTargets="CoreCompile"
Condition="'$(UseRuntimeAsync)' != 'false' AND '$(Language)' == 'C#' AND '$(TargetFramework)' != '' AND $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net11.0'))">
<PropertyGroup>
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>
</Target>
<!-- Analyzers -->
<PropertyGroup Condition="'$(TM_NoAnalyzers)' != 'True'">
<AnalysisLevel>latest</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<!-- Static code analyzers -->
<ItemGroup Condition="'$(TM_NoAnalyzers)' != 'True'">
<PackageReference Include="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ThinkMeta.CodeAnalysis.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- Test project references -->
<ItemGroup Condition="'$(TM_IsTestProject)' == 'True'">
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>