Skip to content

Commit 822a448

Browse files
transition from Fody to .net embedding
1 parent 767de73 commit 822a448

File tree

5 files changed

+52
-195
lines changed

5 files changed

+52
-195
lines changed

FodyWeavers.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

FodyWeavers.xsd

Lines changed: 0 additions & 176 deletions
This file was deleted.

SER.csproj

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
<PlatformTarget>x64</PlatformTarget>
1212
<ImplicitUsings>enable</ImplicitUsings>
1313
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
1416
</PropertyGroup>
15-
17+
1618
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
1719
<DebugSymbols>true</DebugSymbols>
1820
<DebugType>embedded</DebugType>
@@ -29,7 +31,7 @@
2931
<OutputPath>bin\Release\</OutputPath>
3032
<WarningLevel>4</WarningLevel>
3133
</PropertyGroup>
32-
34+
3335
<ItemGroup>
3436
<Reference Include="0Harmony">
3537
<HintPath>$(SL_DEV_REFERENCES)\0Harmony.dll</HintPath>
@@ -64,31 +66,41 @@
6466
</Reference>
6567
</ItemGroup>
6668

69+
<!-- QoL moving the dll -->
6770
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
6871
<Copy SourceFiles="$(TargetDir)SER.dll" DestinationFolder="$(LABAPI_PLUGINS)" />
6972
<Copy SourceFiles="$(TargetDir)SER.dll" DestinationFolder="$(SL_DEV_REFERENCES)" />
7073
</Target>
71-
74+
7275
<ItemGroup>
7376
<None Include="App.config" />
7477
<None Include="packages.config" />
7578
<None Include="SER.sln.DotSettings.user" />
7679
<Content Include=".gitignore" />
7780
<Content Include="README.md" />
81+
<None Include="THIRD_PARTY_LICENSES.txt" CopyToOutputDirectory="Always" />
7882
</ItemGroup>
79-
80-
<ItemGroup>
81-
<PackageReference Include="AudioPlayerApi" Version="1.1.2" />
82-
<PackageReference Include="Costura.Fody" Version="6.0.0" PrivateAssets="All" />
83-
<PackageReference Include="Fody" Version="6.9.3" />
84-
<PackageReference Include="ncalc" Version="1.3.8" />
85-
</ItemGroup>
8683

87-
<!-- older versions of packages use different versions of these -->
88-
<!-- this forces them to use the newest, silencing the warnings -->
84+
<!-- ignore warnings about mismatch between versions of core libs -->
85+
<PropertyGroup>
86+
<NoWarn>$(NoWarn);MSB3277</NoWarn>
87+
</PropertyGroup>
88+
89+
<!-- nuget refs -->
8990
<ItemGroup>
90-
<PackageReference Include="System.Memory" Version="4.6.0" />
91-
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
92-
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.0" />
91+
<PackageReference Include="AudioPlayerApi" Version="1.1.2" />
92+
<PackageReference Include="NCalc" Version="1.3.8" />
93+
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
9394
</ItemGroup>
95+
96+
<Target Name="EmbedSelectedDependencies" AfterTargets="ResolveReferences">
97+
<ItemGroup>
98+
<EmbeddedResource Include="@(ReferenceCopyLocalPaths)"
99+
Condition="'%(Extension)' == '.dll' and
100+
( '%(ReferenceCopyLocalPaths.NuGetPackageId)' == 'NCalc' or
101+
'%(ReferenceCopyLocalPaths.NuGetPackageId)' == 'AudioPlayerApi' or
102+
'%(ReferenceCopyLocalPaths.NuGetPackageId)' == 'Newtonsoft.Json' )" />
103+
</ItemGroup>
104+
</Target>
105+
94106
</Project>

0 commit comments

Comments
 (0)