简体   繁体   English

避免在VisualStudio解决方案中构建所有VB.NET项目

[英]Avoid building all VB.NET projects in a VisualStudio solution

We create a class library and ship C# and VB.NET examples. 我们创建一个类库,并提供C#和VB.NET示例。

I have a solution of 60 C# projects. 我有60个C#项目的解决方案。 If I make an edit to one of them, Visual Studio only builds the changed one. 如果我对其中之一进行编辑,Visual Studio将仅生成更改后的内容。

I have an equivalent solution of 60 VB.NET projects. 我有60个VB.NET项目的等效解决方案。 Visual Studio always builds all 60 projects. Visual Studio始终生成所有60个项目。 Why? 为什么? Is there a way to force Visual Studio to behave like it does with C# projects? 有没有一种方法可以强制Visual Studio像C#项目那样运行?

I should mention that there are no dependencies between the projects. 我应该提到项目之间没有依赖关系。

More information: It's not recompiling, really, it's just checking if they need compilation and that takes a significant amount of time. 更多信息:实际上,它不是在重新编译,只是在检查他们是否需要编译,这需要大量时间。

Here's the build output: 这是构建输出:

========== Build: 0 succeeded, 3 failed, 58 up-to-date, 0 skipped ========== ==========内部版本:0成功,3错误,最新58,跳过0 ==========

Those 58 checks take about 30 seconds in my solution of VB.NET projects. 在我的VB.NET项目解决方案中,这58次检查大约需要30秒。 This same up-to-date check is almost instant in the solution of C# projects. 在C#项目的解决方案中,这种相同的最新检查几乎是即时的。

No edit is necessary. 无需编辑。 Just switching startup projects is enough. 仅切换启动项目就足够了。

How this works is very dependent on how the dependencies between the projects are setup. 这如何工作非常取决于项目之间的依存关系的设置方式。 If all of your projects reference the project that's being edited then yes all of the projects will necessarily be rebuilt. 如果您的所有项目都引用了正在编辑的项目,则是的,所有项目都必须重新构建。

Can you give us some more info on the setup. 您能给我们更多有关设置的信息吗? In particular what dependencies are there between the projects? 特别是项目之间有哪些依存关系?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM