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
Closed

Migrate new sdk #527

wants to merge 14 commits into from

Conversation

bhugot
Copy link

@bhugot bhugot commented Jul 7, 2018

I duplicated .sln and .csproj with .LegacyProject in name
I upgraded to netstandard2.0

I know there was another PR on this but as you didn't merged it it's my proposal

@bhugot bhugot force-pushed the migrate-new-sdk branch from c26f41e to ec7b010 Compare July 9, 2018 05:29
@@ -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.

@bhugot bhugot changed the title [WIP]Migrate new sdk Migrate new sdk Jul 16, 2018
@bhugot
Copy link
Author

bhugot commented Jul 17, 2018

@jbevain ok I think I m done, If you wan't me to split the upgrade to netstandard 2.0 and sdk I can do it

@ViktorHofer
Copy link

ViktorHofer commented Jul 21, 2018

Why still keeping net35 and net40? According to this comment netstandard2.0 is desired by @jbevain: #507 (comment)

EDIT: Oh maybe I misunderstood that comment and it was only about netstandard1.3 vs netstandard2.0.

@bhugot
Copy link
Author

bhugot commented Jul 21, 2018

If it is the case but I don t think It would be easy to remove them

@bhugot
Copy link
Author

bhugot commented Jul 31, 2018

@jbevain Is that a problem that I added a dependency for netstandard? It would be great to add another one to use DependencyContext

@SimonCropp
Copy link
Contributor

@jbevain anything i can help with here?

@jbevain
Copy link
Owner

jbevain commented Sep 25, 2018

@bhugot thank you for your work. I'm considering moving to the new project files in master for the 0.11 version. I'm currently exploring the tooling. I don't know yet if I'll merge this branch of take inspiration from it, but thanks again for your contribution!

@bhugot
Copy link
Author

bhugot commented Sep 25, 2018

@jbevain no problem I understand can be big change if PR can help you to migrate, my job is done fill free to contact me if need some help

<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.

</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net35' ">
<DefineConstants>$(DefineConstants);LEGACY</DefineConstants>
<FrameworkPathOverride Condition="'$(FrameworkPathOverrideForMono)' != ''">$([System.IO.Path]::Combine($(FrameworkPathOverrideForMono),2.0-api))</FrameworkPathOverride>
Copy link
Owner

Choose a reason for hiding this comment

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

Why are the FrameworkPathOverride needed, on Mono and not on Mono?

Copy link
Author

Choose a reason for hiding this comment

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

It's because net35 is not compiled with dotnet build.

@@ -0,0 +1,5 @@
<Project>
Copy link
Owner

Choose a reason for hiding this comment

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

Could you explain the relation between this and Directory.Build.targets? I'm a bit confused at to what those do.

Copy link
Author

Choose a reason for hiding this comment

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

This is a tips to fix the dotnet test on a solution so that the non tests are not executed and failing microsoft/vstest#1129 (comment)

</ItemGroup>
<ItemGroup>
<Compile Include="Mono.Cecil.Tests\*.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\**\*" />
<None Include="Resources\**\*" >
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Copy link
Owner

Choose a reason for hiding this comment

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

Why do we need to copy the Resources to the output directory?

Copy link
Author

Choose a reason for hiding this comment

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

I don't remember but I think if I did it it's because it was needed.

@jbevain
Copy link
Owner

jbevain commented Nov 29, 2018

@bhugot I'm sorry it must seem forever for you, but I've started looking into this, and I added a few comments as there's a few things I don't understand :)

var getData = appContextType?.GetTypeInfo ().GetDeclaredMethod ("GetData");
paths = (string) getData?.Invoke (null, new [] { "TRUSTED_PLATFORM_ASSEMBLIES" });

paths = (string) AppDomain.CurrentDomain.GetData("TRUSTED_PLATFORM_ASSEMBLIES");
Copy link
Owner

Choose a reason for hiding this comment

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

@tmat that change is ok with you?

@bhugot
Copy link
Author

bhugot commented Nov 29, 2018

@jbevain no problem like I said happy to help

@jbevain
Copy link
Owner

jbevain commented Mar 5, 2019

@bhugot I've merged my branch to support .NET Standard 2.0 and the new SDK style projects. Thanks a lot for your work, it's been a great source of inspiration. Because I'll be maintaining this for the foreseeable future, I wanted to do the port manually to familiarize myself with all the differences, but your work has been a great source of inspiration. Thank you!

@jbevain jbevain closed this Mar 5, 2019
@bhugot
Copy link
Author

bhugot commented Mar 5, 2019

@jbevain happy you did it and that my work helped you on this. Waiting for the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants