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

Migrate new sdk #527

Closed
wants to merge 14 commits into from
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<DefineConstants Condition="'$(TargetFramework)'=='netstandard2.0' OR '$(TargetFramework)'=='netcoreapp2.1'">$(DefineConstants);NET_CORE;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" $(Configuration.Contains('ReadOnly')) ">
<DefineConstants>$(DefineConstants);READ_ONLY;</DefineConstants>
<DefineConstants>$(DefineConstants);READ_ONLY</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net35' ">
<DefineConstants>$(DefineConstants);LEGACY</DefineConstants>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the LEGACY define used? A quick search in the code doesn't find anything.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I put this at a moment where I was using it but it's no more needed. Could be removed.

Expand Down
4 changes: 2 additions & 2 deletions Test/Mono.Cecil.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.1'">

<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>2.3.2</Version>
<Version>2.8.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic">
<Version>2.3.2</Version>
<Version>2.8.2</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions Test/Mono.Cecil.Tests/CompilationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ public CompilationResult (DateTime write_time, string result_file)
}

public static class Platform {

#if NET_CORE
public static bool OnMono => Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#else
public static bool OnMono {
get { return TryGetType ("Mono.Runtime") != null; }
}

#endif
public static bool OnCoreClr {
get { return TryGetType ("System.Runtime.Loader.AssemblyLoadContext, System.Runtime.Loader, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") != null; }
}
Expand Down