我应该在TFS或Visual Studio Online Builds中排除对bin\..project..dll的引用吗? [英] Should I Exclude references to the bin\..project..dll in TFS or Visual Studio Online Builds?

查看:117
本文介绍了我应该在TFS或Visual Studio Online Builds中排除对bin\..project..dll的引用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的一位客户使用基于Team Foundation Server(TFS)功能的Visual Studio Online



我们正在研究如何进行自动化构建和自动化单元使用Visual Studio Online托管构建代理进行测试。



我们正在尝试构建其中一个Web应用程序。



我们的Web应用程序解决方案包含解决方案下的许多csproj文件。



注意:Web应用程序将正确构建并在我们的本地开发中正常运行使用Visual Studio 2012的计算机。



但是,当我们在Visual Studio Online的托管构建代理上构建Web应用程序时,它会抛出以下错误,因为它找不到我的应用程序的主dll(我的应用程序叫做BlahBlah):



C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v11.0 \\ \\ WebApplications\Microsoft.WebApplication.targets(1 82):无法复制文件bin \BlahBlah.dll,因为找不到它。 C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v11.0 \ WebApplications\Microsoft.WebApplication.targets(182):无法复制文件bin \BlahBlah.pdb因为找不到它。

因此,我检查了我们的Web应用程序解决方案中的各种csproj文件,我发现了以下代码:



< content include =bin\BlahBlah.dll>

< content include =bin\BlahBlah.pdb>

为了使其在Visual Studio Online的托管构建代理上正常运行,以上引用被以下内容替换:



< content include =bin \ BlahBlah.dll condition =$(IsDesktopBuild)== true>

< content include =bin\BlahBlah.pdbcondition =$(IsDesktopBuild)== true>

< none include =bin \BlahBlah.dllcondition =$(IsDesktopBuild)!= true>

< none include =bin \ BlahBlah .pdbcondition =$(IsDe sktopBuild)!= true>

更换引用后,我们的应用程序将在Visual Studio Online的托管构建代理上正确构建。



但是,我应该在TFS或Visual Studio ONline Builds中排除对bin..project..dll的引用吗?换句话说,我上面的成功构建了一个False Pass吗?

解决方案

(IsDesktopBuild)== true>

< ; content include =bin\BlahBlah.pdbcondition =


(IsDesktopBuild)== true>

< none include =bin \ BlahBlah.dllcondition =


(IsDesktopBuild)!= true>

< none include =bin\BlahBlah.pdb条件=

One of our customers uses Visual Studio Online which is based on capabilities of Team Foundation Server (TFS)

We were researching how to do automated Builds and automated Unit Tests using the Visual Studio Online hosted build agent.

We are trying to build one of our Web Applications on it.

Our Web Application solution contains a number of csproj files under the solution.

Note: The Web Applications will build properly and run properly on our local development computers using Visual Studio 2012.

However, when we build the web application on the Visual Studio Online's Hosted Build Agent, it throws the following error about not finding the my application's main dll( my application is called BlahBlah ):

C:\Program Files (x86)\MSBuild\Microsoft\ VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "bin\BlahBlah.dll" because it was not found. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "bin\BlahBlah.pdb" because it was not found.
Therefore, I checked the various csproj files within our Web Application solutions, and I found the following code:

<content include="bin\BlahBlah.dll">
<content include="bin\BlahBlah.pdb">
In order to make it run properly on the Visual Studio Online's Hosted Build Agent, the above references were replaced by the following:

<content include="bin\BlahBlah.dll" condition="$(IsDesktopBuild) == true">
<content include="bin\BlahBlah.pdb" condition="$(IsDesktopBuild) == true">
<none include="bin\BlahBlah.dll" condition="$(IsDesktopBuild) != true">
<none include="bin\BlahBlah.pdb" condition="$(IsDesktopBuild) != true">
After replacing the references, our application would build properly on the Visual Studio Online's Hosted Build Agent.

However, Should I Exclude references to the bin..project..dll in TFS or Visual Studio ONline Builds? In other words, is my above successful build a "False Pass" ?

解决方案

(IsDesktopBuild) == true">
<content include="bin\BlahBlah.pdb" condition="


(IsDesktopBuild) == true">
<none include="bin\BlahBlah.dll" condition="


(IsDesktopBuild) != true">
<none include="bin\BlahBlah.pdb" condition="


这篇关于我应该在TFS或Visual Studio Online Builds中排除对bin\..project..dll的引用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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