Visual Studio 2008 不必要的项目构建 [英] Visual Studio 2008 Unnecessary Project Building

查看:28
本文介绍了Visual Studio 2008 不必要的项目构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 C# 项目,其中包括一个 exe 和 11 个库文件.exe引用所有库,lib1可能引用lib2、lib3、lib4等

I have a C# project which includes one exe and 11 library files. The exe references all the libraries, and lib1 may reference lib2, lib3, lib4, etc.

如果我对 lib1 中的类进行更改并构建解决方案,我认为只需要更改 lib1 和 exe.但是,如果我想运行该解决方案,所有 dll 和 exe 都在构建中.

If I make a change to a class in lib1 and built the solution, I assumed that only lib1 and the exe would need to be changed. However, all dll's and the exe are being built if I want to run the solution.

如果依赖项没有改变,有没有办法阻止它们被构建?

Is there a way that I can stop the dependencies from being built if they have not been changed?

推荐答案

关键是这句话吗?但是,所有 dll 和 exe 都在构建中如果我想运行解决方案"

Is the key this phrase? "However, all dll's and the exe are being built if I want to run the solution"

Visual Studio 将始终尝试在运行单个项目时构建所有内容,即使该项目不依赖于所有内容.但是,可以更改此选择.转到工具|选项|项目和解决方案|构建和运行并选中仅在运行上构建启动项目和依赖项"框.然后当你按下 F5 时,VS 只会构建你的启动项目和它依赖的 DLL.

Visual Studio will always try to build everything when you run a single project, even if that project doesn't depend on everything. This choice can be changed, however. Go to Tools|Options|Projects and Solutions|Build and Run and check the box "Only build startup projects and dependencies on Run". Then when you hit F5, VS will only build your startup project and the DLLs it depends on.

这篇关于Visual Studio 2008 不必要的项目构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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