DEV Community

nuh yurduseven
nuh yurduseven

Posted on

mono-.net core integration on Monodevelop

Hi, I am the new member of the team and this post is my first. Ok. for a long time I try to install-integrate mono-.net core on monodevelop IDE. I am using Solus and perhaps that's why I got hard. I don't know "how to do this work on other distro". But I have decide share with you this experiences. Bugs, errors etc.

If you want to create a .net core app and build this app, you can use mono framework. I try a .net core 2.1 LTS and mono 6.8.0.105 on runtime.

Make it happen installation monodevelop, mono framework and dependency packages .netcore-2.1 LTS sdk on your system. Then;

for .netcore sdk:
open /etc/profile and add Path variable

PATH=$PATH:/your/dotnet/sdk/path and DOTNET_ROOT=/your/dotnet/sdk/path

and do:
$ source /etc/profile

Ok. You have a dotnet command reachable everywhere anymore.

you can try:
$ dotnet --version

Thus, after created new solution, you can go into the project directory and run dotnet build command.

Open the monodevelop IDE and go Edit->Preferences->Sdk Location->.Net core and add dotnet core command line.

Alt Text

then create a new solution ASP.NET core web API or app. Right click project app and select options. You should check target framework inside General tab.

Under the Run tab right side of General tab there is a ASP.NET core tab. You can change port here In general tab, do not select "Run on external console". This option(form of 'unclicked') provide to use application console in monodevelop.

Build app.

Alt Text

I could not run .netcore 3.0 sdk LTS with this release of mono. Perhaps It should was installed latest mono framework.

As a result, an asp.net core app or API can be developed via mono on Monodevelop IDE for both Linux and Mac. This method can be used for this.

Top comments (1)

Collapse
 
bicyclemark profile image
Mark Wardell

Thanks for sharing: I am opening a console app i built with $dotnet new console. i did dotnet run in cmd line and it runs....

so then i open in monodevelop

when i open Monodevelop 7.8.4 protests immediately in the package window...

Getting restore information for project /home/markwardell/Documents/temp/temp.csproj
/usr/share/dotnet/sdk/5.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(54,5) : error MSB4186: Invalid static method invocation syntax: "[MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')". Method '[MSBuild]::GetTargetFrameworkIdentifier' not found.Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a, b)). Check that all parameters are defined, are of the correct type, and are specified in the right order.
Unable to create package spec for project. '/home/markwardell/Documents/temp/temp.csproj'