未在活动配置中生成项目Visual Studio MacOS .net Core [英] Project not build in active configuration Visual Studio MacOS .net Core

查看:106
本文介绍了未在活动配置中生成项目Visual Studio MacOS .net Core的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Visual Studios MacOS预览版中创建了一个控制台应用程序(.Net Core).在项目解决方案中,我看不到program.cs,也没有其他可用的内容,它表示项目未在活动配置中构建

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

项目解决方案应该看起来像这样

whereas the project solution should look something like this

我已经为macOS安装了 .net core .也可以通过Homebrew配置完成.我已经有openssl& osx中安装了openssl@1.1,因此当我尝试使用自制软件重新安装openssl时,它会显示

I have installed .net core for macOS. Also done with Homebrew configurations. I already had openssl & openssl@1.1 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

另一方面,请确保.net核心正常运行.我只是在Visual Studio Code中编译了.net核心C#应用程序.

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

推荐答案

您似乎没有在未安装SDK的情况下,Visual Studio for Mac Preview 3将找不到要导入的任何SDK MSBuild文件,从而导致没有将调试/发布配置添加到项目中.

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在/usr/local/share/dotnet/sdk/目录中查找最新的sdk.如果该目录中没有子目录,则您没有安装SDK.

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.

项目中也没有显示文件,如果没有找到SDK,也会显示这些文件.

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

当前,Visual Studio for Mac缺少关于缺少的SDK的错误报告,但计划在将来的版本中发布.

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

这篇关于未在活动配置中生成项目Visual Studio MacOS .net Core的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆