Skip to content

Conversation

bannerflow-hassaan
Copy link
Contributor

Purpose of this PR is to migrate from .NET Framework 4.6 to .NET Standard 1.6. Here are some key takeaways from migration.

  • .NET Portability Analyzer is a neat VS plugin to run on existing projects and find out if its even worth trying to port.
  • Reverse Package Search is extremely useful when it comes to finding classes, namespaces and their target framework compatibilities.
  • .NET Core doesn't support Binary Serialization (yet), hence Serializable attributes were removed as described in this StackOverflow post.
  • ProcessStartInfo.WindowStyle as well as Process.MainWindowHandle are not supported.
  • MSpec has a known issue with Test Runner and VS IDE integration as described by the author here. dotnet test from cli works fine.
  • NuGet publish configs were left untouched. It would be nice to port them to dotnet pack sometime in future. That way there will be no need to bundle NuGet.exe

@JohannesHoppe
Copy link
Member

👍

Excellent work, I'm going to create a new repository / nuget package for it!
I will find some time during the weekend (or earlier :-)).

@ash23
Copy link

ash23 commented Dec 16, 2016

I am in urgent need of this PR to be merged and released.
Any update on when you think this will be done :) ?

Btw, this library is totally awesome, great work!

@JohannesHoppe
Copy link
Member

JohannesHoppe commented Dec 19, 2016

Ok, i merged this.
I'm wondering if it would be possible, to target old and new .NET framework in one Nuget package:
https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/libraries#how-to-multitarget

Right now the project.json is all about NETStandard.
As I'm short in time, we would need to find somebody who makes this multitarget-ready.

@JohannesHoppe
Copy link
Member

Ok, gentlemen. Here it is:
https://www.nuget.org/packages/Mongo2Go/2.0.0-alpha1
This package has support for .NET Standard 1.6 only (no 4.6.x is in the package).

I struggled a bit with the folder structure. As far as I know, dotnet pack is not smart enough to include the tools folder, and nuget.exe was not aware of .NET Standard 1.6 (error Description: The folder 'netstandard1.6' under 'lib' is not recognized as a valid framework name or a supported culture identifier.)
I did it a little hack by referencing the files via wildcard: https://github.com/Mongo2Go/Mongo2Go/blob/master/Mongo2Go.nuspec#L36 - which resolves to lib\netstandard1.6\Mongo2Go.dll and friends.

@bannerflow-hassaan
@ash23
Could you please confirm that it works for you?

@bannerflow-hassaan
Copy link
Contributor Author

@JohannesHoppe Thanks a lot! .. let me test it this evening

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.

3 participants