0

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!

4
  • Don't dream it, and face the truth. learn.microsoft.com/en-us/aspnet/core/migration/mvc Commented Jul 4, 2017 at 13:15
  • My project isnt MVC Commented Jul 4, 2017 at 17:22
  • If not MVC but WebForms you hit a real dead end. In that case you have to completely rewrite as ASP.NET Core MVC and cut/paste only the useful portion of your old solution. No other way out. Commented Jul 4, 2017 at 17:36
  • Thank you very much , i w'll do that ! Commented Jul 5, 2017 at 9:40

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.