Change TargetFramework to TargetFrameworks You can go through these steps in a simplistic, “try to build fix the next error repeat” way. Type.GetTypeInfo() is mostly easy to polyfill.
In fact HttpClient for Net40 on Windows is available on Nuget in the package. Most notable might be HttpClient, which first appeared in net45, but also for instance HostingEnvironment.QueueBackgroundWorkItem() (net452 and later) and Type.GetTypeInfo() & PropertyInfo.GetCustomAttribute() in net45 and later.
Discover what NuGet dependencies for your project are different on netcore vs netframework.Discover what explicit references to framework dlls the netframework target requires, and add each one as a in the netframework conditional section.Optionally, add a boilerplate section to your project to enable the netframework target to build on mono for linux or macos.Create two conditional sections, one for netcore. 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? Five Ways to Amplify Power BI with Azure Synapse Analytics (ebook)Ĭannot load blog information at this time.A 15-second guide and 15-minute walk through.
He is a software development manager for a multinational company. Ming Man is Microsoft MVP since year 2006. The blog is never meant to give people consulting services or silver bullet solutions.
The blog also uses as a help to keep my memory. The blog also has a lot of guidance teaching you how to get stated certain Microsoft technologies. This blog is about more than 50% telling you how to resolve error messages, especial for Microsoft products. Since March 2011 Microsoft Live Spaces migrated to Wordpress () till now, I have is over 1 million viewers.