0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.Custom/Aki.Custom.csproj

46 lines
2.7 KiB
XML
Raw Normal View History

2023-03-03 18:52:31 +00:00
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
[critical] Fix .NET Framework version (!42) ## Preface The current version of Aki uses .NET Framework 4.7.2, C# 7.3. However, this is not correct. Unity 2019.4.31f uses .NET Framework 4.7.1, C# 7.0 (you can see this when creating a new blank project in this unity version, then check the Assembly-CSharp.csproj). You can load netstandard2.0 assemblies into EFT, which support C# 7.3. ## The issue .NET Core 2.1 support types like `Span<T>` and `ReadOnlySpan<T>` which previous versions of .NET (.NET Core 2.0 / .NET Framework 4.8.1 and below, C# 7.1 and below) need to support through the `System.Memory` nuget package. Right now, this conflicts. If you attempt to load an assembly like this, EFT will simply crash because `Span<T>` and `ReadOnlySpan<T>` do not exist inside mono's `mscorlib`. ## Why fix this This is important for a variety of reasons: - Prevent modders from accessing not available APIs leading to unexpected crashes - Prevent possible compatability issues with EFT later - Support for `Span<T>` and `ReadOnlySpan<T>` through `System.Memory` which is important for high-performance code and client mods (one of which I'm working on). I really want to stress that this is an important issue to fix and should be merged ASAP. Unity 2019.4 being lax doesn't mean the next LTS version won't prevent loading. ## Why was the wrong version in the first place? It was a best guess made by me 2 years ago. There were more pressing issues back then and it didn't crash on me. It started becoming an issue 1 year ago when I tried to port Aki to C#, because self-signed certificate generation is supported only within 4.7.2 and newer. For reference: https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.certificaterequest.createselfsigned?view=netframework-4.7.2 ## What's affected? All the `.csproj` files in this repo. Merging this means that some mods might need to retarget from .NET Framework 4.7.2 to 4.7.1. Co-authored-by: Dev <dev@dev.sp-tarkov.com> Co-authored-by: Terkoiz <terkoiz@spt.dev> Co-authored-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com> Co-authored-by: DanW <danw@noreply.dev.sp-tarkov.com> Co-authored-by: Merijn Hendriks <merijn.d.hendriks@gmail.com> Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Modules/pulls/42 Co-authored-by: Merijn Hendriks <senko-san@noreply.dev.sp-tarkov.com> Co-committed-by: Merijn Hendriks <senko-san@noreply.dev.sp-tarkov.com>
2023-12-09 16:32:45 +00:00
<TargetFramework>net471</TargetFramework>
2023-03-03 18:52:31 +00:00
<AssemblyName>aki-custom</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<Company>Aki</Company>
<Copyright>Copyright @ Aki 2022</Copyright>
</PropertyGroup>
<ItemGroup>
2023-03-04 09:40:06 +00:00
<Reference Include="Assembly-CSharp" HintPath="..\Shared\Hollowed\hollowed.dll" Private="False" />
2023-03-03 18:52:31 +00:00
<Reference Include="Comfort" HintPath="..\Shared\Managed\Comfort.dll" Private="False" />
2024-01-15 20:39:43 +02:00
<Reference Include="DissonanceVoip" HintPath="..\Shared\Managed\DissonanceVoip.dll" Private="False" />
2023-03-03 18:52:31 +00:00
<Reference Include="Sirenix.Serialization" HintPath="..\Shared\Managed\Sirenix.Serialization.dll" Private="False" />
<Reference Include="UnityEngine" HintPath="..\Shared\Managed\UnityEngine.dll" Private="False" />
<Reference Include="UnityEngine.AIModule" HintPath="..\Shared\Managed\UnityEngine.AIModule.dll" Private="False" />
2023-03-03 18:52:31 +00:00
<Reference Include="UnityEngine.AnimationModule" HintPath="..\Shared\Managed\UnityEngine.AnimationModule.dll" Private="False" />
<Reference Include="UnityEngine.AssetBundleModule" HintPath="..\Shared\Managed\UnityEngine.AssetBundleModule.dll" Private="False" />
<Reference Include="UnityEngine.AudioModule" HintPath="..\Shared\Managed\UnityEngine.AudioModule.dll" Private="False" />
<Reference Include="UnityEngine.CoreModule" HintPath="..\Shared\Managed\UnityEngine.CoreModule.dll" Private="False" />
<Reference Include="UnityEngine.ParticleSystemModule" HintPath="..\Shared\Managed\UnityEngine.ParticleSystemModule.dll" Private="false" />
<Reference Include="UnityEngine.PhysicsModule" HintPath="..\Shared\Managed\UnityEngine.PhysicsModule.dll" Private="False" />
<Reference Include="UnityEngine.UI" HintPath="..\Shared\Managed\UnityEngine.UI.dll" Private="False" />
<Reference Include="UnityEngine.UIModule" HintPath="..\Shared\Managed\UnityEngine.UIModule.dll" Private="False" />
<Reference Include="Unity.ScriptableBuildPipeline" HintPath="..\Shared\Managed\Unity.ScriptableBuildPipeline.dll" Private="False" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" ExcludeAssets="runtime" PrivateAssets="all">
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aki.PrePatch\Aki.PrePatch.csproj" />
<ProjectReference Include="..\Aki.Common\Aki.Common.csproj" />
<ProjectReference Include="..\Aki.Reflection\Aki.Reflection.csproj" />
<ProjectReference Include="..\Aki.SinglePlayer\Aki.SinglePlayer.csproj" />
2023-03-03 18:52:31 +00:00
</ItemGroup>
</Project>