Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Project not build in active configuration Visual Studio MacOS .net Core

I have created an Console Application(.Net Core) in Visual Studios MacOS Preview. In the project solution I don't see my program.cs also other things are not available it says Project not built in active configuration

enter image description here

whereas the project solution should look something like this

enter image description here

I have installed .net core for macOS. Also done with Homebrew configurations. I already had openssl & [email protected] installed in osx so when I try to re-install openssl with homebrew it says

Warning: openssl is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version

On the other part to be sure that .net core works fine. I just compiled .net core C# application in Visual Studio Code.

like image 896
abhimanyuaryan Avatar asked Jan 20 '17 22:01

abhimanyuaryan


People also ask

Can you develop .NET core on Mac?

Visual Studio for Mac makes it easy to develop your app's service with its support for the latest ASP.NET Core Web development platform. ASP.NET Core runs on the latest evolution of the . NET platform and runtime.

How do I change the build configuration in Visual Studio?

Right-click on the project node and select Options. You can also double-click on the project node to bring up the Project Options dialog. Select Add to create a new configuration. You can also copy any of the existing configurations.

How do I get build options in Visual Studio?

If you want to build multiple configurations and platforms in one action, you can use the Build > Batch Build option in Visual Studio. To access this feature, press Ctrl+Q to open the search box, and enter Batch build .


3 Answers

It looks like you do not have the .NET Core SDK 1.0.0-rc4 installed.

Without the SDK installed Visual Studio for Mac Preview 3 will not find any SDK MSBuild files to import which results in no Debug/Release configurations being added to the project.

Visual Studio for Mac looks in the /usr/local/share/dotnet/sdk/ directory for the latest sdk. If there are no subdirectories in that directory then you do not have the SDK installed.

Also there are no files shown in the project which will also occur if there is no SDK found.

Currently Visual Studio for Mac does not have good error reporting about the missing SDK but this is planned for a future release.

like image 130
Matt Ward Avatar answered Sep 20 '22 07:09

Matt Ward


I got the same issue after VS update to build 1077. To resolve this issue you just need install .NET Core SDK 1.0.0-rc4 and reinstall Mono 4.8, you can get it here.

These information I got from changelog page https://developer.xamarin.com/releases/vs-mac/preview/vs-mac-preview1/

I hope this will help.

like image 33
Dmitry Antonenko Avatar answered Sep 24 '22 07:09

Dmitry Antonenko


For me on .netcore library project.

Remove project from solution (Right click on project > Delete > Remove)

And add it again. (Right click to solution > Add > Add Exist Project..)

Make sure SDK was already installed as Matt Ward mentioned.

like image 7
b.ben Avatar answered Sep 23 '22 07:09

b.ben