c# - 项目未构建在事件配置中 Visual Studio MacOS .net Core

标签 c# macos visual-studio xamarin .net-core

我在 Visual Studios MacOS Preview 中创建了一个控制台应用程序(.Net Core)。在项目解决方案中,我没有看到我的 program.cs,它说 Project not built in active configuration

enter image description here

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

enter image description here

我已经安装了.net core for macOS .也完成了 Homebrew 配置。我已经在 osx 中安装了 openssl & openssl@1.1 所以当我尝试用自制软件重新安装 openssl 时它说

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# 应用程序。

最佳答案

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

如果没有安装 SDK,Visual Studio for Mac Preview 3 将找不到任何要导入的 SDK MSBuild 文件,这会导致没有调试/发布配置被添加到项目中。

Visual Studio for Mac 在/usr/local/share/dotnet/sdk/目录中查找最新的 sdk。如果该目录中没有子目录,则您没有安装 SDK。

如果没有找到 SDK,项目中也没有显示文件。

目前 Visual Studio for Mac 没有关于缺少 SDK 的良好错误报告,但计划在未来版本中提供。

关于c# - 项目未构建在事件配置中 Visual Studio MacOS .net Core,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41773344/

相关文章:

c# - 无法读取输入流

swift - 从 Xcode 按钮运行 Shell 脚本

macos - 运行brew命令充满了 'Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.'

mysql - 隐藏SSRS表中的一行

.net - QTAgent32.exe 已停止工作

angular - 如何通过 Visual Studio Publish 为 Angular 项目定义 <base href ="/ProjectName/">?

c# - Microsoft.CodeAnalysis.TypeKind 枚举中的 TypeKind.Submission 和 TypeKind.Module 是什么意思?

c# - 在属性节点中绑定(bind)

c# - 为什么这个图像阈值在 windows 中有效,但在 mono/linux 中无效?

node.js - 如何在 NodeJS 中使用 "Mac Terminal"和命令行 "console.log"显示 "Local heroku"中的多行?