visual-studio - 为什么我必须将源 `.asm` 文件的 `Properties > General > Item Type` 设置为 `Microsoft Macro Assembler` ...?
问题描述
为什么我必须将源.asm
文件设置Properties > General > Item Type
为 Microsoft Macro Assembler
,即使我已经为项目节点选择了选项Build dependencies > Build Customization > masm
.
解决方案
这可能取决于您使用的是哪个版本的 Visual Studio,但我记得使用其中一个版本自动选择 .asm 文件的 masm 似乎是一次性选项。在处理了多个版本的 Visual Studio 并遇到了某些版本的问题后,我手动设置每个 .asm 文件的属性以使用自定义构建工具(也关闭不参与构建,正如 John Kalane 所评论的那样),它正在工作对于我拥有的所有版本(VS2005、VS2010、VS2015、VS2019)。
32 位调试版本,对于发布版本 /Zi 不需要:
command line: ml /c /Zi /Fo$(OutDir)\example.obj example.asm
outputs: $(OutDir)\example.obj
64 位调试版本,对于发布版本 /Zi 不需要:
command line: ml64 /c /Zi /Fo$(OutDir)\example.obj example.asm
outputs: $(OutDir)\example.obj
推荐阅读
- c# - 文件部署集数据库初始化器
- c# - 如何将值列表插入到 Enumerable 中?
- excel - Excel数组公式异常
- node.js - Node + Express API 在生产中不起作用
- android - 如何使用 Wifi 连接获取强制门户重定向 URL 表单 webview?
- javascript - 如何让 JavaScript 画布游戏暂停?
- java - 我怎样才能使 RecyclerView 更流畅?
- excel - VBA EDITOR 在 Mac 上退出(终止)Excel 2016
- javascript - Highcharts 工具提示显示在 div 上
- java - spring-boot:我可以修复 spring-boot 2 中的下一个错误吗?