Sdk: 'Migrating' from .NET Framework to .NET Standard

Created on 30 Nov 2016  路  9Comments  路  Source: dotnet/sdk

What would be best practice when trying to convert a whole bunch of '.NET Framework' csproj-projects to '.NET Standard'/'.NET Core' csproj-projects, optionally targeting multiple frameworks?

The projects are mostly libraries that should be simple enough to compile targeting .NET Standard, but is there any (planned) tool support to convert the traditional csproj files into the new ones?

Most helpful comment

@mpoettgen I don't think we have a doc yet. I've done the process a few times manually, though. Perhaps I can help with comments?

In general, I've had the most luck by:

  1. dotnet new a core template
  2. Add stuff to it until it builds your project
  3. delete the old csproj file

All 9 comments

@srivatsn thoughts?

/cc @terrajobst as well.

@mpoettgen I don't think we have a doc yet. I've done the process a few times manually, though. Perhaps I can help with comments?

In general, I've had the most luck by:

  1. dotnet new a core template
  2. Add stuff to it until it builds your project
  3. delete the old csproj file

Any update on this?

Added a link to the article, how it can be done manually now http://www.natemcmaster.com/blog/2017/03/09/vs2015-to-vs2017-upgrade/

MNF, that seems to be about Visual Studio 2017, not about .NET Standard at all.

The general porting docs are at: Porting to .NET Core from .NET Framework. There are a couple of sub-topics under that which will hopefully be of assistance.

@GuardRex there's some useful info in there but they need updating, see dotnet/docs#2255

@stijnherreman Yes, since I wrote that :point_up: a few weeks ago, it's in the bullpen at the review stage with https://github.com/dotnet/docs/pull/2467. It's subject to changes (usually not major changes tho). We don't have a built version of that one that can be seen, but the raw GH version is at: https://github.com/GuardRex/docs-1/blob/85e025b022b2f37263f2dbfbd0ea59fbd04d49f3/docs/core/porting/libraries.md

WRT .NET Standard specifically in that porting topic: One of the changes was to rip out the content that can be cross-linked because it can't be adequately covered there and it's a duplication of content, so the .NET Standard info is going to stay in the .NET Standard topic (at least until we get into review and finalize that decision).

Was this page helpful?
0 / 5 - 0 ratings