部署的应用程序找不到其资源c#Visual Studio 2010 [英] Deployed application can't find its resources c# Visual Studio 2010

查看:158
本文介绍了部署的应用程序找不到其资源c#Visual Studio 2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在另一台机器上发布我的应用程序时,我有一个很大的问题。作为图片和声音的应用程序资源无法在任何地方找到,因为它们实际上安装在某个地方,我真的不知道哪里。我在说一点点击部署!我将文件放在解决方案资源管理器的资源文件夹中的单独的文件夹中,路径是这样的设置内的字符串路径.... \Resources\Images\Cards\和.... \Resources \Sounds\无论我做什么程序都找不到它的资源,所以这里的基本问题是什么?我相信这是一个错误的路径,因为我看到程序安装它安装所有的东西(相同数量的MB)。有人建议吗
C#Visual Studio 2010黑杰克游戏

解决方案

我经过一段时间的努力找到了这个问题的答案。 。
您要在设置中的资源文件夹之前删除..\..\,否则部署的应用程序找不到其资源,因此它们将不会在与所述相同的文件夹。但要记住,如果要继续处理项目,您必须将..\..\放回调试程序中,否则调试将无法正常工作!因为我没有获得10的声誉,所以我不允许出版这张图片给你看。..))


I have an big issue when publishing my application on another machine. The apps resources as pictures and sounds can't be found anywhere thou they actually are installed somewhere I really don't know where.. I'm talking about oneClick Deployment! I have put the files in separate folders in the Resource folder in the Solution explorer and the path is a string path inside Settings like this ....\Resources\Images\Cards\ and ....\Resources\Sounds\ Whatever I do the program can't find its resources so what is the basic issue here? I believe it's something wrong with the path because I see when the program gets installed it installs everything (same amount of MB). Any suggestions anybody? C# Visual Studio 2010 Black Jack Game

解决方案

Well I found the answer to this issue after a while of struggling.. You have to erase the "..\..\" before the Resource folder in the "settings" while you are about to publish otherwise the deployed application can not find its resources thus they will not be at the same folder as described. But remember if you want to continue working on your project you must put back "..\..\" for debugging the program otherwise debugging will not work!!! I was not allowed to publish the image to show you here because of I don't have earned "10" reputations yet.. :)

这篇关于部署的应用程序找不到其资源c#Visual Studio 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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