在 Visual Studio 2010 中自定义 Web 部署包
我在 VS 2010 中构建了一个 WCF DataService,目标是 .Net 4.0。这一切都很好。我创建了一个部署包,并使用 MSDeploy 和 zip 文件将应用程序部署到 Web 服务器。当我在 TFS 构建代理上设置自动构建时,部署包的内容发生了变化。我的部署包中不再获得强命名程序集。这些排除的程序集是解决方案中的项目,并且构建在生成服务器上。
我没有看到部署包的很多配置选项,但我想知道为什么构建服务器使用相同的设置创建与我的工作站不同的包。
我使用“仅运行此应用程序所需的文件”,我勾选了“排除生成的调试符号”和“从 App_Data 文件夹中排除文件”。我_不_包含数据库包。我确实创建了一个zip文件(缺少强命名程序集)
感谢您提供的任何信息来解释为什么会发生这种情况。那么也许我可以解决这个问题。
Beezler
在构建服务器上,我取消了我关心的程序集,这使我的部署包达到了我想要的状态。因此,部署包似乎不包含 GACed 程序集,这是一件好事。我仍然想知道如何在某些引用的程序集中覆盖此行为。
谢谢,
I have a WCF DataService build in VS 2010, targetting .Net 4.0. This all works fine. I've created a deployment package and have the application deployed to a web server using MSDeploy and a zip file. When I set up an automated build on a TFS Build Agent the contents of the deployment package changed. I no longer get the strong named assemblies in my deployment package. These excluded assemblies are projects within the solution and are built on the Build Server.
I don't see a lot of configuration options for the deployment package, but I would like to know why the build server creates a different package than my workstation, using the same settings.
I am using "Only files needed to run this application", I have ticked "Exclude generated debug symbols" and "Exclude files from App_Data folder". I _do_not_ include database packages. I do create a zip file (which is missing the strong named assemblies)
Thanks for any information you may have explaining why this occurs. Then maybe I can solve the problem.
Beezler
On the build server I've ungaced the assemblies I was concerned about and that got my deployment package to the state I want it. So it appears the deployment package does not include the GACed assemblies, which is a good thing. I would still like to know how to override this behavior on certain referenced assemblies.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果要包含 GAC 程序集的 DLL 文件,请执行以下操作:
即可!发布项目时,它将在 bin 文件夹中包含 DLL 以供参考!
If you want to include a DLL files for a GAC assembly do the following:
That's it! When publishing your project, it will include the DLL in the bin folder for that reference!