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

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

问题描述

我在 Visual Studios MacOS 预览版中创建了一个控制台应用程序(.Net Core).在项目解决方案中,我没有看到我的 program.cs 其他东西也不可用,它说 Project not built in active configuration

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 &openssl@1.1 安装在 osx 中,所以当我尝试用自制软件重新安装 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 core C# 应用程序.

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

推荐答案

您似乎没有 .NET Core SDK 1.0.0-rc4 已安装.

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

如果没有安装 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天全站免登陆