在 Visual Studio 2010 中自定义 Web 部署包

发布于 2024-09-27 14:54:06 字数 531 浏览 0 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

予囚 2024-10-04 14:54:06

如果要包含 GAC 程序集的 DLL 文件,请执行以下操作:

  • 在项目中,展开“引用”文件夹,
  • 右键单击要包含 DLL 的引用,然后单击“属性”以显示属性窗格
  • 集将“复制本地”改为“真实”

即可!发布项目时,它将在 bin 文件夹中包含 DLL 以供参考!

If you want to include a DLL files for a GAC assembly do the following:

  • In your project, expand the "References" folder
  • right-click on the reference you want to include the DLL and click "properties" to bring up the properties pane
  • set "Copy Local" to "True"

That's it! When publishing your project, it will include the DLL in the bin folder for that reference!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文