无法在 Visual Studio 解决方案的调试文件夹中运行应用程序?

发布于 2024-10-08 15:37:58 字数 414 浏览 0 评论 0原文

如果没有管理员权限,我无法在 Debug 文件夹中运行该应用程序。每当我在没有管理员权限的情况下运行它时,都会出现 JIT 调试器窗口。有什么问题吗?请帮助我,我需要一个快速的解决方案。

更新:

https://i.sstatic.net/3fEHr 后的调试器

debugger

这是按 yes

替代文字

在这里我可以看到无法从设置中读取路径,但是当我以管理员身份运行它时,它不会给我任何异常。也许它无法读取,因为有些文件权限被卡住了。

该消息指示“对象引用未设置为对象的实例。”事实上,我希望在 Visual Studio 中编程的人应该熟悉此类异常。

I can not run the application in Debug folder without admin rights.Whenever I run it without admin rights, the JIT-debugger window appears. What's the problem? Help me please I need a quick solution.

Update:

Here is the debugger

debugger

after pressing yes

alt text.

Here I can see that can't read path from settings, but when I run it as admin it doesn't give me any exception. Maybe it can't read because there some stuck with file permissions.

The message indicates "Object reference not set to an instance of the object.. " In fact, I expect that person programmed in Visual Studio should be familiar of such kind exceptions.

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

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

发布评论

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

评论(3

瀟灑尐姊 2024-10-15 15:37:58

单击“是”。它试图提供帮助并向您展示哪些未处理的异常正在轰炸您的程序。这是否会提供快速解决方案是无法猜测的。

Click Yes. It is trying to be helpful and show you what unhandled exception is bombing your program. Whether that will provide a quick solution is unguessable.

独守阴晴ぅ圆缺 2024-10-15 15:37:58

该异常告诉我您的 .config 中没有该键/值,这就是您收到异常的原因。
另外,JIT 似乎只对管理员启用,如果您在没有这些权限的情况下运行应用程序,它不会弹出,但您的异常仍然存在。

The exception tells me that you don't have that key / value in your .config, and that's why you're getting an exception.
Also, the JIT seems to be enabled only to the administrator, and if you run your application without those rights, it will not pop up, but your exception will still be there.

浅语花开 2024-10-15 15:37:58

经过长时间的搜索发现了一个错误,结果发现图片上指定的代码不起作用,但是在替换为:之后

     private static readonly Configuration Other = ConfigurationManager.OpenExeConfiguration ("MediaPlayer.exe");
     private static readonly string _plPath = Other.AppSettings.Settings ["PlaylistLocation"]. Value;
     private static readonly string _videoDir = Other.AppSettings.Settings ["VideoDestination"]. Value;

一切正常。让它为那些面临此类问题的人提供帮助。

After a long search found a bug, it turned out that the code specified on picture does not work, but after its replacement by:

     private static readonly Configuration Other = ConfigurationManager.OpenExeConfiguration ("MediaPlayer.exe");
     private static readonly string _plPath = Other.AppSettings.Settings ["PlaylistLocation"]. Value;
     private static readonly string _videoDir = Other.AppSettings.Settings ["VideoDestination"]. Value;

all work fine. Let it be a help for those who has faced such a problem.

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