Visual Studio 2010访问被拒绝错误 [英] Visual Studio 2010 Access Denied Errors

查看:155
本文介绍了Visual Studio 2010访问被拒绝错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我放弃了一切。我正在处理多个应用程序。我似乎无法找到使其正常工作的正确方法。无论我做什么,我都会获得访问被拒绝的错误。我在Windows 7上切换了用户帐户,我重置了权限等。



有时项目会编译并运行正常。我将编辑一些代码,并点击F5,它会说无法将文件复制到文件等。我将删除该文件,有时它会工作。但它变得越来越糟糕 - 在我删除文件后,我点击F5它会显示一个快速加载光标然后没有任何反应。该项目甚至没有尝试开始。如果我等了5分钟然后点击F5,它就会开始没问题。

Alright, I've given up on everything. I am working on multiple applications. I can't seem to find the proper way to get this working. No matter WHAT I do, I get access denied errors. I've switched user accounts on Windows 7, I've reset permissions, etc.

Sometimes the project will compile and run fine. I'll edit some code, and hit F5 and it'll say "Unable to copy file to file" etc. I'll delete the file and sometimes it'll work. But it's getting worse - after I delete the file and I hit "F5" it'll show a quick loading cursor then nothing happens. The project doesn't even attempt to start. If I wait 5 minutes and hit F5, it'll start right up no issues.

Error	2	Unable to copy file "obj\x86\Debug\project.exe" to "bin\Debug\project.exe". Access to the path 'bin\Debug\project.exe' is denied.





检查任务管理器,应用程序不是'卡住了。没有什么是过度窃取RAM或CPU。该应用程序打开和关闭罚款。



Checking the task manager, the application isn't stuck open. Nothing is excessively stealing RAM or CPU. The app open and closes fine.

Error	1	Unable to copy file "obj\x86\Debug\project.exe" to "bin\Debug\project.exe". The process cannot access the file 'bin\Debug\project.exe' because it is being used by another process.	



有什么想法吗?我正在认真地放弃它!它整夜杀了我,让我慢下来。我的代码指向一个空白表单。我删除了所有代码。同样的问题。这是.NET framework 4.0 x86。



当我删除文件并点击F5时,就是我收到错误的时候。有时它不会打开。这是随机的。我正在使用最新更新的VS 2010的新版本SP1(终极版)



奇怪的是,当它被拒绝访问时,Windows拒绝我的访问100%!我无法运行它(给出错误,抱歉没有保存)我无法删除该文件。当我右键单击并转到安全性时,它表示访问被拒绝。我最近在Windows 7安装上遇到了奇怪的安全问题 - 这可能是相关的吗?


ANY kinds of ideas? I'm seriously giving up on it! It's killed me all night and slowed me down. My code is pointing to a blank form. I've removed ALL code. Same issue. This is .NET framework 4.0 x86.

When I delete the file, and hit F5, that's when I get the error. Sometimes it won't open. It's random. I'm using a fresh version of VS 2010 with latest updates SP1 (ultimate)

The weird thing is when it gets access denied, Windows denies my access 100%! I can't run it (gives a error, sorry didn't save it) and I can't delete the file. When I right click and go to security, it says access is denied. I've been getting weird security positions on my Windows 7 install lately - could this be related?

推荐答案

检查你的任务经理,看看 project.exe project.vhost.exe 正在运行。



如果这就是你的应用程序没有正确关闭的情况。
Check your task manager and see if the project.exe or project.vhost.exe is running.

If this is the case then your application is not closing properly.


我不是100%确定是什么/为什么,但我创建了一个全新的项目,手动添加编码,同样的事情。什么都没删除引用。我将启动项目设置为EXE项目(而不是解决方案 - >选择那里的启动项目)它似乎工作。



所以它现在正在工作..不知道为什么,一定是个bug?也许它没有编译和链接DLL项目,不确定。
I'm not 100% sure what/why, but I created a whole new project, added coded manually, same thing. Removed references nothing. I set the start up project as the EXE project (rather then the solution->selecting the startup project there) and it seems to work.

So it's working now.. no clue why, must be a bug? Maybe it wasn't compiling and linking the DLL project, not sure.


最后我知道如何解决这个问题。 2天后google ing ..



打开Windows服务: - 应用程序体验





计算机(右键单击) - >管理 - >服务与应用 - >服务 - >启用应用程序体验



为我工作..希望有帮助
Finally I know how to solve this problem. After 2 days google-ing..

Turn on windows service :- Application experience


Computer (right-click) -> manage -> Service & Application -> service -> Enable Application experience

Works for me.. hope it helps


这篇关于Visual Studio 2010访问被拒绝错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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