Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
145 lines (132 loc) · 7.89 KB
/
Copy pathDirectory.Build.props
File metadata and controls
145 lines (132 loc) · 7.89 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<!-- Every target-framework literal of the repository lives here (ADR-0002). The tools, the
service fixture, the sandbox, and the performance project build on the default, the LTS
release; the newest supported release joins at its first go-live release candidate. -->
<DefaultTargetFramework>net10.0</DefaultTargetFramework>
<LatestTargetFramework>net11.0</LatestTargetFramework>
<AllTargetFrameworks>netstandard2.0;net472;$(DefaultTargetFramework);$(LatestTargetFramework)</AllTargetFrameworks>
<TestTargetFrameworks>$(DefaultTargetFramework);$(LatestTargetFramework)</TestTargetFrameworks>
<!-- Pinned: 'latest' resolves differently per machine and SDK. C# 14 on net472 is
unsupported-but-standard practice via polyfills (Polly/Serilog do the same). -->
<LangVersion>14.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!-- The single source of the package version. Prereleases add their suffix at pack time
(the pack command's version-suffix option); nothing else declares Version or PackageVersion. -->
<VersionPrefix>0.9.0</VersionPrefix>
<Authors>Deniz İrgin</Authors>
<Company>Deniz İrgin</Company>
<Owners>Deniz İrgin</Owners>
<Copyright>Copyright (c) 2026 Deniz İrgin</Copyright>
<RepositoryUrl>https://github.com/opencode-dotnet/opencode-sdk-dotnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/opencode-dotnet/opencode-sdk-dotnet</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<CheckEolTargetFramework>true</CheckEolTargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Also required for IDE0005 (unused usings) to fire in CLI builds - do not remove -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<ReportAnalyzer>true</ReportAnalyzer>
<AnalysisLevel>10.0</AnalysisLevel>
<AnalysisMode>All</AnalysisMode>
<Features>strict</Features>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'OpenCode.Sdk' Or '$(MSBuildProjectName)' == 'OpenCode.Sdk.Extensions'">
<EnablePackageValidation>true</EnablePackageValidation>
<!-- No baseline for previews or 1.0.0-rc.1. From rc.2, use the previous published release;
the release cut moves this baseline. Without it, validation still compares package assets. -->
<PackageValidationBaselineVersion></PackageValidationBaselineVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)LICENSE" Visible="False" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.md" Visible="False" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)README.md" Visible="False" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)assets/icon.png" Visible="False" Pack="true" PackagePath=""/>
</ItemGroup>
<PropertyGroup>
<BuildOs Condition="$([MSBuild]::IsOsPlatform('Linux'))">linux</BuildOs>
<BuildOs Condition="$([MSBuild]::IsOsPlatform('OSX'))">darwin</BuildOs>
<BuildOs Condition=" '$(BuildOs)' == '' ">windows</BuildOs>
<BuildArch Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X86' ">386</BuildArch>
<BuildArch Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64' ">arm64</BuildArch>
<BuildArch Condition=" '$(BuildArch)' == '' ">amd64</BuildArch>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All"/>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Formatting.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="TestableIO.System.IO.Abstractions.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)BannedSymbols.txt" Link="Properties/BannedSymbols.txt"/>
</ItemGroup>
<!-- Downlevel support: Polyfill (source-only, internal) supplies the compiler attributes
C# 14 needs on netstandard2.0/net472 plus BCL API polyfills (Stream Memory overloads,
Task.WaitAsync, ...). Upstream guidance: reference it on ALL TFMs, not just downlevel. -->
<PropertyGroup>
<PolyArgumentExceptions>true</PolyArgumentExceptions>
</PropertyGroup>
<!-- The one project that goes without it: the runner BenchmarkDotNet 0.16 generates under the
performance project for a .NET Framework job defines CompilerFeatureRequiredAttribute itself,
and Polyfill's copy in the same compilation fails it (CS0101). The runner needs no polyfill.
Remove the condition when BenchmarkDotNet stops emitting that attribute
(dotnet/BenchmarkDotNet#3296). -->
<ItemGroup Condition="'$(StartupObject)' != 'BenchmarkDotNet.Autogenerated.UniqueProgramName'">
<PackageReference Include="Polyfill">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- Lets net472 build without an installed targeting pack (required on Linux/macOS,
hermetic everywhere). -->
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="all"/>
</ItemGroup>
</Project>