在visual studio构建时编辑文件是否安全? [英] Is it safe to edit files while visual studio builds?

查看:77
本文介绍了在visual studio构建时编辑文件是否安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在visual studio构建时编辑源文件.h和.cpp是否安全?如果我在另一个编辑器中编辑(Sublime text 3)怎么办?

Is it safe to edit source files .h and .cpp while visual studio builds? What if I'm editing in another editor (Sublime text 3)?

我想要的是Visual Studio在我点击构建时获取源的副本然后将其用于整个建立。我不确定这是怎么回事。随机运行时错误看起来像Visual Studio设法错过编译一些源文件(即使在再次生成
而不更改源文件之后)。当我重建整个项目时,这些错误就会停止发生。

What I want is Visual Studio to take a copy of the source when I hit build and then use that for the entire build. I'm not sure this is happening. Random runtime errors look like visual studio has managed to miss compiling some source files (even after a build again without changing the source files). These errors then stop happening when I rebuild the whole project.

推荐答案

AFAIK ,Visual Studio内部使用的MSBuild在启动时不会拍摄代码文件的快照。当执行MSBuild目标并需要文件时,它会将该文件传递给MSBuild目标的MSBuild任务(编译器任务等)。当
MSBuild任务需要该文件时,它将被读取。

AFAIK, MSBuild, which is used internally by Visual Studio, doesn't take snapshots of code files when started. When a MSBuild target is executed and requires a file, it passes that file to the MSBuild task (compiler task, etc.) of the MSBuild target. When the MSBuild task needs that file then it is read.


这篇关于在visual studio构建时编辑文件是否安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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