Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up old and unsupported TFMs from the project files #153

Merged
merged 1 commit into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ internal static void FromSystemType(this SignatureTypeEncoder typeEncoder, Type
}
}

#if NETSTANDARD || NET46
internal static bool IsGenericMethodParameter(this Type type) => type.IsGenericParameter && type.DeclaringMethod != null;

internal static bool IsConstructedGenericMethod(this MethodBase method) => method.IsGenericMethod && !method.IsGenericMethodDefinition;
Expand Down Expand Up @@ -315,15 +314,10 @@ internal static unsafe bool TryGetRawMetadata(this Assembly assembly, out byte*
blob = (byte*)pointer;

return true;
} catch (Exception ex)
} catch
{
return false;
}
}
#else
internal static bool IsGenericMethodParameter( this Type type ) => type.IsGenericMethodParameter;

internal static bool IsConstructedGenericMethod( this MethodBase method ) => method.IsConstructedGenericMethod;
#endif
}
}
22 changes: 9 additions & 13 deletions src/Lokad.ILPack.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netstandard2.0;net46</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<LangVersion>8.0</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>

<Company>Lokad</Company>
<Copyright>Copyright © Lokad 2020</Copyright>

Expand All @@ -17,27 +20,20 @@
<Authors>Lokad</Authors>
<Description>A library for serializing dynamic assemblies under .NET Core.</Description>
<PackageProjectUrl>https://github.com/Lokad/ILPack</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/Lokad/ILPack/master/lokad.png</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<Version>0.1.6</Version>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.3.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<ItemGroup>
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.3.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
</ItemGroup>

<ItemGroup>
<None Include="..\LICENSE.txt">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\lokad.png" Pack="true" PackagePath="icon.png" />
<None Include="..\LICENSE.txt" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
4 changes: 3 additions & 1 deletion test/Lokad.ILPack.Tests/Lokad.ILPack.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net46</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WarningLevel>5</WarningLevel>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/Sandbox/Sandbox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion test/SandboxSubject/SandboxSubject.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion test/TestSubject/TestSubject.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netstandard2.0;net46</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;netstandard2.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down