João Aires
João Aires

Reputation: 1

.net Framework to .net Core

Im doing a project with .net Framework , but to run on the linux i need .net Core..

I heard that it is possible to change .net Core to .net Framework only with changes on the project.csproj with this:

<TargetFramework>netcoreapp1.1</TargetFramework> 

to

<TargetFramework>v4.5.2</TargetFramework>

and i tried to do the opposite , but i got some erros on the project...

There's a way to do that?

Thanks!

Upvotes: 0

Views: 168

Answers (1)

mdemir
mdemir

Reputation: 112

You can not switch a .NET Framework project to .NET Core that easy. You might change an empty project but not one you already started coding. Possibly you'll need to rewrite or start from scratch.

There are some major differences between two

  • Format of configuration files (web.config vs appsettings.json)
    • See this post on providing backward compatibility for App.config, appSettings.config and Web.config XML-based configuration providers
  • Used libraries
  • Startup files (Global.asax vs Startup.cs)
  • Lack of static objects in .Net Core. Like Session and Application objects - which is a good thing btw.
  • Many of the .Net Framework libraries are dependant on app.config/web.config files

Upvotes: 2

Related Questions