Skip to content

Commit

Permalink
Improve multi-target csproj.
Browse files Browse the repository at this point in the history
1. Added a reference to Microsoft.NETFramework.ReferenceAssemblies so that the project can be built hassle-free on .NET Core.
2. Use the AssemblyInfo.cs from the existing code and disable automatic AssemblyInfo generation (to avoid clash).
3. Dropped target for net40. The regular Framework project file didn't support it either and it doesn't build due to a missing API (MapToIPv6).
  • Loading branch information
PJB3005 committed Feb 14, 2020
1 parent 78df229 commit e77fa44
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Lidgren.Network.MultiTarget/Lidgren.Network.MultiTarget.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net40;net45;net46;net461;net462;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net45;net46;net461;net462;netstandard2.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Lidgren.Network\Properties\AssemblyInfo.cs" Link="Properties\AssemblyInfo.cs" />
<Compile Include="..\Lidgren.Network\Encryption\NetAESEncryption.cs" Link="Encryption\NetAESEncryption.cs" />
<Compile Include="..\Lidgren.Network\Encryption\NetBlockEncryptionBase.cs" Link="Encryption\NetBlockEncryptionBase.cs" />
<Compile Include="..\Lidgren.Network\Encryption\NetCryptoProviderBase.cs" Link="Encryption\NetCryptoProviderBase.cs" />
Expand Down Expand Up @@ -82,4 +84,11 @@
<Folder Include="Platform\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>

0 comments on commit e77fa44

Please sign in to comment.