-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
101 lines (83 loc) · 6.35 KB
/
Copy pathDirectory.Build.props
File metadata and controls
101 lines (83 loc) · 6.35 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
<Project>
<PropertyGroup>
<!-- THE Rider/ReSharper version. Everything else is derived from it: WaveVersion below, and Gradle's ProductVersion
(build.gradle.kts reads this line). Exact NuGet form, e.g. 2026.1.5.2 / 2026.2.0-rc01 / 2026.3.0-eap02.
See docs/rider-version.md. -->
<SdkVersion>2026.1.5.2</SdkVersion>
<Title>Rimworld Development Environment</Title>
<Description>Bring the intelligence of your IDE to Rimworld XML files. Use information backed by Rimworlds DLL file to autocomplete your XML, Ctrl+Click into the C# that your XML gets translated into and see what options you have when adding items in your mods!</Description>
<Authors>Garethp</Authors>
<Copyright>Copyright $([System.DateTime]::Now.Year) Maintainers of Rimworld Development Environment</Copyright>
<PackageTags>rimworld</PackageTags>
<PackageProjectUrl>https://github.com/Garethp/Rider-RimworldDevelopment</PackageProjectUrl>
<PackageLicenseUrl>https://opensource.org/license/mit/</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
</PropertyGroup>
<PropertyGroup>
<NoPackageAnalysis>true</NoPackageAnalysis>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<BaseIntermediateOutputPath>obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<DefaultItemExcludes>$(DefaultItemExcludes);obj\**</DefaultItemExcludes>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<OutputPath>bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>TRACE;DEBUG;JET_MODE_ASSERT</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<!-- 2026.1.5.2 / 2026.3.0-eap02 -> 261 / 263. The Wave package only publishes <wave>.0.0 (no EAP builds). -->
<WaveVersionBase>$([System.Text.RegularExpressions.Regex]::Replace($(SdkVersion), '^\d\d(\d\d)\.(\d+)\..*$', '$1$2'))</WaveVersionBase>
<WaveVersion>$(WaveVersionBase).0.0</WaveVersion>
</PropertyGroup>
<!--
The Harmony project compiles nothing and only exists to fetch 0Harmony.dll, so it doesn't need the SDK.
The SDK's IncludeAssets deliberately omits `compile`, and that flows to its dependencies, so Annotations/Lifetimes/
RdFramework aren't compile references by default. ReferenceSdkCoreLibraries (below) adds the versions the SDK's own
graph resolved, instead of us pinning them: ~150 SDK packages require one exact version of each, which changes with
every SDK line and used to have to be matched by hand.
NU1608: our System.Diagnostics.TraceSource 4.3.0 (net8.0 build) is newer than the exact 4.0.0 one SDK package pins.
NU1701/NU1603 come from JetBrains' own packages inside the SDK graph (.NET Framework-only packages, missing native
package versions) and aren't actionable from here. Package-level NoWarn doesn't reach transitive packages, hence
the project-level NoWarn.
MSB3277: TargetFramework must not lag behind the runtime the SDK is compiled against (net8.0 for 2026.1; Rider
itself runs on .NET 10, which the Rider build targets) - if it does, every System.* assembly conflicts and the build log
grows by tens of thousands of lines. One conflict remains that can't be fixed from here (the SDK is built against
WPF's WindowsBase 5.0, the reference pack has 4.0.0.0), plus System.Text.Json 8.0.0.5 in the net8.0 ReSharper
build, so MSB3277 is logged as a message. The host supplies the actual runtime assemblies.
-->
<PropertyGroup Condition="'$(MSBuildProjectName)' != 'ReSharperPlugin.RimworldDev.Harmony'">
<NoWarn>$(NoWarn);NU1608;NU1701;NU1603</NoWarn>
<MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);MSB3277</MSBuildWarningsAsMessages>
</PropertyGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' != 'ReSharperPlugin.RimworldDev.Harmony'">
<!-- Resolves an NU1107 version conflict between SDK packages. On net10.0 it's part of the framework and gets pruned
(NU1510 if referenced), so it's only needed for the net8.0 ReSharper build. -->
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.3.0" Condition="'$(TargetFramework)' != 'net10.0'" />
<PackageReference Include="JetBrains.Rider.SDK" Version="$(SdkVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- Microsoft.Bcl.Memory 9.0.0 is pinned exactly by JetBrains.Rider.BrowserHotReload inside the SDK. We don't
compile against it (compile asset is empty) or ship it, so this advisory doesn't apply to the plugin. -->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-73j8-2gch-69rq" />
</ItemGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' != 'ReSharperPlugin.RimworldDev.Harmony'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<!--
Compile against exactly the JetBrains.Lifetimes/RdFramework/Annotations the SDK resolved (their runtime assets, which
IncludeAssets keeps). They are the rd/annotations the SDK was built against, so the versions follow SdkVersion
automatically. Private=false: Rider/ReSharper supply these at runtime; this is only for the compiler.
-->
<Target Name="ReferenceSdkCoreLibraries" AfterTargets="ResolvePackageAssets"
Condition="'$(MSBuildProjectName)' != 'ReSharperPlugin.RimworldDev.Harmony'">
<ItemGroup>
<_SdkCoreLibrary Include="@(RuntimeCopyLocalItems)"
Condition="'%(RuntimeCopyLocalItems.Extension)' == '.dll' And ('%(RuntimeCopyLocalItems.NuGetPackageId)' == 'JetBrains.Lifetimes' Or '%(RuntimeCopyLocalItems.NuGetPackageId)' == 'JetBrains.RdFramework' Or '%(RuntimeCopyLocalItems.NuGetPackageId)' == 'JetBrains.Annotations')" />
<Reference Include="@(_SdkCoreLibrary->'%(Filename)')" HintPath="%(_SdkCoreLibrary.FullPath)" Private="false" />
</ItemGroup>
<Error Condition="'@(_SdkCoreLibrary->Count())' != '3'"
Text="Expected JetBrains.Lifetimes, JetBrains.RdFramework and JetBrains.Annotations in the SDK's resolved packages, found: @(_SdkCoreLibrary->'%(NuGetPackageId) %(NuGetPackageVersion)')" />
</Target>
</Project>