Visual Studio"清洁&重建"一键? [英] Visual Studio "Clean & Rebuild" in one button?

查看:25
本文介绍了Visual Studio"清洁&重建"一键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究的解决方案有一些特殊之处.有时我需要Clean solution,然后Rebuild solution,否则网络应用程序无法访问.这就是为什么我为这项工作制作了一个 bat 文件并将 bat 文件绑定到 Visual Studio 工具栏中的按钮.

My solution i'm working on it's has some specialy. And sometime I need to Clean solution and after that Rebuild solution, if not the web application can not access. That why I made a bat file for that work and bind the bat file to a button in Visual Studio toolbar.

但是通过这种方式,visual studio 只运行 bat 文件,因此它只清理和重建我之前在 bat 文件中定义的一个解决方案.我想要的是一个可以在解决方案打开时清理和重建的按钮,它是 Visual Studio 的 CleanRebuild 命令的组合,只需一个按钮.

But with that way, visual studio just run the bat file, so it clean and rebuild just one solution I'm defined before in the bat file. What I want is a button which can clean and rebuild on solution OPENING, is made a combo of Clean and Rebuild commands of visual studio to just one button.

有办法吗?

我使用的是 Visual Studio 2013.

I'm using Visual Studio 2013.

推荐答案

正如@Blorgbeard 所说,

As @Blorgbeard said,

什么是重建解决方案?

重建解决方案将清理并从头开始构建解决方案,忽略之前所做的任何事情.它的作用是删除所有程序集、exe 和引用的文件以重新编译.

Rebuild solution will clean and then build the solution from scratch, ignoring anything it’s done before. What it does is deletes all the assemblies, exe’s and referred files to compile again.

什么是清洁解决方案?

Clean Solution 将从 bin/obj 目录中删除所有已编译的文件(即 EXE 和 DLL).

Clean Solution will delete all compiled files (i.e., EXE’s and DLL’s) from the bin/obj directory.

重建意味着编译和链接所有源文件,无论它们是否更改.构建是正常的事情,而且速度更快.有时,项目目标组件的版本可能会不同步,因此需要重新构建才能使构建成功.在实践中,您永远不需要清洁.

Rebuild means compile and link all source files regardless of whether they changed or not. Build is the normal thing to do and is faster. Sometimes the versions of project target components can get out of sync and rebuild is necessary to make the build successful. In practice, you never need to Clean.

这篇关于Visual Studio"清洁&重建"一键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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