macos - Visual Studio Mac,从命令行构建?
问题描述
我正在考虑使用 Visual Studio 和 Xamarin 来构建跨平台应用程序,但我更喜欢使用 Sublime Text 作为我的编辑器。目前我找不到任何关于 3rd 方工具与 Visual Studio 集成的信息。
Visual Studio 是否可以像 Xcode 那样使用“xcodebuild”实用程序从命令行构建?理想情况下,我想制作一个 shell 脚本,它可以像我在 VS 中按下构建按钮一样构建,并返回我可以在 Sublime Text 中解析和显示的错误。
非常感谢任何建议。
解决方案
我以这种方式使用位于“/Applications/Visual Studio.app/Contents/MacOS/vstool”的“vstool”:
vstool build -t:Build -c:"Release|iPhone" "MyProject.sln";
如 vstool 帮助中所述:
Visual Studio Build Tool
build [options] [build-file]
-p --project:PROJECT Name of the project to build.
-t --target:TARGET Name of the target: Build or Clean.
-c --configuration:CONFIGURATION Name of the solution configuration to build.
-r --runtime:PREFIX Prefix of the Mono runtime to build against.
Supported targets:
Build: build the project (the default target).
Clean: clean the project.
推荐阅读
- python - 有没有办法用python自动化/脚本视频编辑?
- regex - 正则表达式组匹配未给出预期结果
- ruby - 在 Ruby 中编写一个标头 HTML 标签 Markdown 解析器
- ruby-on-rails - 使用 RSpec 模拟类实例的实例变量/访问器
- reactjs - ReactDOM:未捕获的类型错误:无法读取未定义的属性“渲染”
- json - 如何从 tsx 格式的反应应用程序中的 json 文件中读取数据
- flutter - Flutter 扩展 HashMap
- snowflake-cloud-data-platform - 我们可以在 TYPE TIME 列中使用小数秒在 Snowflake 中存储和检索时间吗
- amazon-cloudformation - 使用无服务器框架创建 AWS IoT 证书时出现资源配置错误
- containers - Windows 容器映像上 els.dll / elscore.dll 的可用性