2

I have an ASP.NET Web application that was successfully running on Linux with the help of dnx-mono NuGet package. I used to publish it by using dnx publish tool and run it with the command:

/opt/dnx-mono.1.0.0-rc1-update1/bin/dnx --appbase /path/to/json Microsoft.Dnx.ApplicationHost kestrel

Since dnx is obsolete, I want to get rid of it and migrate to .NET Core, but it does not work anymore on Linux.

Important: I cannot make my application .NET Core app because it uses some libraries (like MySQL.Data) that are still not available for .NET Core. Therefore, I create ASP.NET Core Web Application (notice .NET Framework):

enter image description here I migrated the whole application and run it successfully on Windows, but my target is Linux. No more dnx publish, no problem - there is dotnet publish which works well and produces binaries. What now? Dnx-mono package does not have a "dotnet-something" successor, and using dotnet command with published binaries produced errors that I was not able to resolve (The library 'libhostpolicy.so' required to execute the application was not found), but I don't think that I should even use dotnet command with standalone binaries. Googling didn't help as most tutorials are focused around ASP.NET Web applications for .NET Core, not for .NET Framework. Version of Linux is Debian 8, dotnet command was obtained by following this guide. Any clue?

1
  • 1
    dotnet restore then dotnet run should be all you need on any platform but it needs to be a .Net Core app. Commented Feb 21, 2017 at 15:21

1 Answer 1

2

You cannot run an application on Linux that targets the full .Net Framework, it has to be Core only.

Sign up to request clarification or add additional context in comments.

4 Comments

1) Mono is not going to support ASP.NET Core Web applications that target full .NET framework? 2) There are no plans from MS to make NuGet packages like "dnx-mono" that I have successfully used?
@MiljenMikic Microsoft uses Mono to bootstrap .NET Core, but now .NET Core is fully on its own. Please drop anything with DNX names, as now .NET Core SDK 1.0 is coming (on March 7), and that's the future.
@LexLi I really want to get rid of DNX* stuff, that's why I posted the question in the first place. But a necessary condition is to keep my apps still working, which is not the case currently.
@MiljenMikic you cannot keep everything, as Microsoft does drop certain features along the way.

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.