发布ASP.NET应用程序时出错

时间:2021-12-14 10:25:46

There is a web app I'm trying to make publish in order to upload it by CuteFtp Pro. I usually being doing this with no problem. But this time, I'm facing crazy error! Actually, as I right-click the solution and click to Publish using File System option choosing an appropriate path for that, finally I got an Error:

我正在尝试发布一个Web应用程序,以便通过CuteFtp Pro上传它。我通常这样做没有问题。但这一次,我面临着疯狂的错误!实际上,当我右键单击解决方案并单击“使用文件系统发布”选项时,选择适当的路径,最后我得到一个错误:

Error

错误

Copying file Images\512px-Icon_-_upload_photo_2.svg.png to obj\Debug\Package\PackageTmp\Images\512px-Icon_-_upload_photo_2.svg.png failed.
Could not find file 'Images\512px-Icon_-_upload_photo_2.svg.png'.
0   0   GiftShop

I really don't know and have no idea about this error since there is no file by the name of 512px-Icon_-_upload_photo_2.svg.png

我真的不知道并且不知道这个错误,因为没有名称为512px-Icon _-_ upload_photo_2.svg.png的文件

In fact, I never had an image by that name through the project!! What could be the reason? I'm really getting frustrated in challenging with that error.

事实上,我从来没有通过该项目获得该名称的图像!可能是什么原因?我真的很沮丧地挑战这个错误。

Anybody could help me on this please?

有人可以帮我吗?

Thank you so much

非常感谢

5 个解决方案

#1


1  

This basically happens whenever we delete the contents from the folder but forget to remove from Visual studio solutions.

每当我们从文件夹中删除内容但忘记从Visual Studio解决方案中删除时,这基本上都会发生。

To Resolve this follow below steps:-

要解决此问题,请按以下步骤操作: -

  1. Go to visual studio solution explorer and right click on the specific content

    转到visual studio解决方案资源管理器并右键单击特定内容

  2. exclude(yellow marked files) from project.

    从项目中排除(黄色标记的文件)。

  3. right click and remove those files from visual studio solution explorer.

    右键单击并从visual studio解决方案资源管理器中删除这些文件。

Hoping this will help you :)

希望这会帮助你:)

#2


0  

Try removing the file from your project (right click and exclude).

尝试从项目中删除文件(右键单击并排除)。

#3


0  

search for the string name of file in all the files of the project. Remove the line and you are done.

在项目的所有文件中搜索文件的字符串名称。删除该行,您就完成了。

Whats the best guess is that it must have been referenced in one of the CSS you are using especially if you are using Jquery or any of its plugin..

最好的猜测是它必须在你正在使用的一个CSS中被引用,特别是如果你使用的是Jquery或它的任何一个插件。

#4


0  

Do one thing exclude your obj folder from project.This is the best way for those kind of errors.

做一件事就是从项目中排除你的obj文件夹。这是发生这类错误的最佳方法。

In your solution explorer there is one tab with tool tip "Show All Files".Click on it and it will show you all files.

在您的解决方案资源管理器中,有一个工具提示“显示所有文件”的选项卡。单击它,它将显示所有文件。

There is one another way

还有另一种方式

Update: went into Project --> Package/Publish Settings, and clicked "Exclude generated debug symbols." The project began publishing with no issue.

更新:进入项目 - >打包/发布设置,然后单击“排除生成的调试符号”。该项目开始发布没有任何问题。

one more solution for you

还有一个解决方案

Are you seeing the file in the project? If so right click and tell it to remove the "ghost" file from the project. Once you do that I would try and publish again.

你在项目中看到了这个文件吗?如果是这样,右键单击并告诉它从项目中删除“ghost”文件。一旦你这样做,我会尝试再次发布。

If its not showing the project, you might be able to create a fake file with the same name (just put some text in there so the size isn't 0kb) and in the same location as the other asp files. Make sure the "show hidden files is selected" and add it to the project and then promptly delete. This would essentially fix the corruption of VS thinking the file exist.

如果它没有显示项目,你可能能够创建一个具有相同名称的假文件(只是放入一些文本,因此大小不是0kb)并且与其他asp文件位于相同的位置。确保选中“显示隐藏文件”并将其添加到项目中,然后立即删除。这基本上可以解决VS认为文件存在的腐败问题。

Hope it works.

希望它有效。

#5


0  

Look into your solution and exclude this image file, but remember to click on Show All Files, and try to rebuild the solution.

查看您的解决方案并排除此图像文件,但请记住单击“显示所有文件”,然后尝试重建解决方案。

Update 1

更新1

I ran yesterday with the same issue, it was an image not included in the project. Please go to Solution Explorer click on Show All Files and check 512px-Icon_-_upload_photo_2.svg.png image is included in the project or not, if it in gray color so it's not included in the project and if has a yellow icon please remove it from the project.

我昨天跑了同样的问题,这是一个未包含在项目中的图片。请转到解决方案资源管理器,单击显示所有文件,然后检查512px-Icon _-_ upload_photo_2.svg.png图像是否包含在项目中,如果它是灰色,那么它不包含在项目中,如果有黄色图标请删除它来自项目。

#1


1  

This basically happens whenever we delete the contents from the folder but forget to remove from Visual studio solutions.

每当我们从文件夹中删除内容但忘记从Visual Studio解决方案中删除时,这基本上都会发生。

To Resolve this follow below steps:-

要解决此问题,请按以下步骤操作: -

  1. Go to visual studio solution explorer and right click on the specific content

    转到visual studio解决方案资源管理器并右键单击特定内容

  2. exclude(yellow marked files) from project.

    从项目中排除(黄色标记的文件)。

  3. right click and remove those files from visual studio solution explorer.

    右键单击并从visual studio解决方案资源管理器中删除这些文件。

Hoping this will help you :)

希望这会帮助你:)

#2


0  

Try removing the file from your project (right click and exclude).

尝试从项目中删除文件(右键单击并排除)。

#3


0  

search for the string name of file in all the files of the project. Remove the line and you are done.

在项目的所有文件中搜索文件的字符串名称。删除该行,您就完成了。

Whats the best guess is that it must have been referenced in one of the CSS you are using especially if you are using Jquery or any of its plugin..

最好的猜测是它必须在你正在使用的一个CSS中被引用,特别是如果你使用的是Jquery或它的任何一个插件。

#4


0  

Do one thing exclude your obj folder from project.This is the best way for those kind of errors.

做一件事就是从项目中排除你的obj文件夹。这是发生这类错误的最佳方法。

In your solution explorer there is one tab with tool tip "Show All Files".Click on it and it will show you all files.

在您的解决方案资源管理器中,有一个工具提示“显示所有文件”的选项卡。单击它,它将显示所有文件。

There is one another way

还有另一种方式

Update: went into Project --> Package/Publish Settings, and clicked "Exclude generated debug symbols." The project began publishing with no issue.

更新:进入项目 - >打包/发布设置,然后单击“排除生成的调试符号”。该项目开始发布没有任何问题。

one more solution for you

还有一个解决方案

Are you seeing the file in the project? If so right click and tell it to remove the "ghost" file from the project. Once you do that I would try and publish again.

你在项目中看到了这个文件吗?如果是这样,右键单击并告诉它从项目中删除“ghost”文件。一旦你这样做,我会尝试再次发布。

If its not showing the project, you might be able to create a fake file with the same name (just put some text in there so the size isn't 0kb) and in the same location as the other asp files. Make sure the "show hidden files is selected" and add it to the project and then promptly delete. This would essentially fix the corruption of VS thinking the file exist.

如果它没有显示项目,你可能能够创建一个具有相同名称的假文件(只是放入一些文本,因此大小不是0kb)并且与其他asp文件位于相同的位置。确保选中“显示隐藏文件”并将其添加到项目中,然后立即删除。这基本上可以解决VS认为文件存在的腐败问题。

Hope it works.

希望它有效。

#5


0  

Look into your solution and exclude this image file, but remember to click on Show All Files, and try to rebuild the solution.

查看您的解决方案并排除此图像文件,但请记住单击“显示所有文件”,然后尝试重建解决方案。

Update 1

更新1

I ran yesterday with the same issue, it was an image not included in the project. Please go to Solution Explorer click on Show All Files and check 512px-Icon_-_upload_photo_2.svg.png image is included in the project or not, if it in gray color so it's not included in the project and if has a yellow icon please remove it from the project.

我昨天跑了同样的问题,这是一个未包含在项目中的图片。请转到解决方案资源管理器,单击显示所有文件,然后检查512px-Icon _-_ upload_photo_2.svg.png图像是否包含在项目中,如果它是灰色,那么它不包含在项目中,如果有黄色图标请删除它来自项目。