发布 .Net Web App 不会复制某些文件

发布于 2024-08-23 11:53:38 字数 272 浏览 3 评论 0原文

有某些图像和内容。 swf 文件在项目中使用,但它们未添加到项目中(这意味着解决方案资源管理器不会显示它们)。

当我尝试在 VS2008 中使用“构建”->“发布”选项时,这些图像和内容将被删除。 swf 文件未发布。

  1. 我是否必须将它们添加到项目中才能发布它们?
  2. 难道就没有更好的办法吗?因为很容易错过添加某些类型的文件(图像、swf 等)。例如。如果您在项目外部重命名图像文件并忘记在项目中更新,则发布将再次失败。

谢谢。请帮忙。

There are certain images & swf files that are used in the project, but they are not added to the project (Meaning, the Solution Explorer does not show them).

When I try to use the Build->Publish option in VS2008, those images & swf files are not published.

  1. Do I have to necessarily add them to the project in order to publish them?
  2. Isn't there any better way? Because it is easy to miss adding of certain type of files (images, swf, etc). For eg. If you rename an image file outside of the project and forget to update in the project then publish will fail again.

Thanks. Please help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

堇年纸鸢 2024-08-30 11:53:38
  1. 是的 - 您需要将它们添加到项目中

  2. 如果您愿意,您可以使用不同的方法来发布,但您需要将它们添加到您的项目中解决方案以这种方式发布它们。

  1. Yes - you need to add them to the project

  2. You could use a different method to publish if you like, but you need to add them to your solution to get them published this way.

思念绕指尖 2024-08-30 11:53:38

要发布文件,您必须将想要添加到解决方案的所有文件添加到解决方案中,

请确保在解决方案资源管理器中选择显示所有文件的选项,这将使查找所有内容变得更加容易。

另请记住,对于某些文件类型 .pdf,您需要将每个文件的构建操作更改为“内容”,并将“复制到输出目录”更改为“始终复制”,否则它将不会发布。

To publish the files you have to add all the files you wish to the solution,

Make sure that in your solution explorer you select the option to show all files this will make finding everything easier.

Also remember that with some files types .pdf for example you will need to change the Build Action of each file to 'Content' and the 'copy to output dirctory' to 'copy always' other wise it wont publish.

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