
Learn about conditional sections in your csproj file, so that you can declare different dependencies for each target.A first-migrate-to-core approach is much simpler and faster than trying to make an old-style project file handle dotnetcore (if it were even possible). The new csproj file is a fraction of the complexity of the old-style projects, and it handles both NetFramework and NetCore very simply.

The simplest way to do the reverse-to make an older netframework project multi-target-is to first migrate it to a netcore project then carry on from here. We will take a netcore csproj file as the start, and make it also build for a netframework target. Net Core.įor when that doesn't just work, this page goes through the complications and the further steps you may need. There is a massive and impressive compatibility between. Seriously though, for a project with no dependencies this one step may be all you need to do.

Step 1: Open the csproj file and replace the line: netcoreapp2.0

Net Core project, whether a netstandard library, or a netcore app, and you'd like it to be available for consumption by a net40 or net45 application? A 15-second guide and 15-minute walk through
