简体   繁体   English

编译XNA项目时,无法执行请求的操作错误

[英]The requested operation cannot be performed error when compiling an XNA project

When compiling a project for the second time I get the following error message. 第二次编译项目时,我收到以下错误消息。 I have to close down VS 2010 and it compiles when reloaded. 我必须关闭VS 2010并在重新加载时进行编译。 If I make a change then the problem comes back. 如果我做出改变,那么问题就会出现。

"Unable to copy file "obj\\x86\\Debug\\MyFile.dll". The requested operation cannot be performed on a file with user-mapped section open." “无法复制文件”obj \\ x86 \\ Debug \\ MyFile.dll“。无法对打开用户映射部分的文件执行请求的操作。”

I had this problem for another cause. 我有另一个原因的问题。 So I am sharing for those having this problem without the achievement extension 所以我在没有成就扩展的情况下分享那些有这个问题的人

In my case, it was due to the project settings page being opened. 在我的情况下,这是由于项目设置页面被打开。 I am using a type in my project as the type of one setting, so it appears that visual studio opens the dll to get the specs but don't release it automatically. 我在我的项目中使用一个类型作为一个设置的类型,因此看起来visual studio打开dll来获取规范但不自动释放它。 Closing the settings page solve the problem or restarting visual studio. 关闭设置页面可解决问题或重新启动Visual Studio。

Found cause - it's to do with having Visual Studio Achievements extension installed. 找到原因 - 这与安装Visual Studio Achievements扩展有关。 The problem goes away with this extension removed. 删除此扩展程序后问题就消失了。

I also faced the same issue due to a stupid mistake :) All I did is I kept the corresponding output dll open in Visual Studio Object Browser. 由于一个愚蠢的错误,我也遇到了同样的问题:)我所做的就是在Visual Studio对象浏览器中保持相应的输出dll打开。 Closing that dll from the object browser resolved the issue. 从对象浏览器关闭该DLL解决了该问题。

I also hit this issue when trying to save a file in Visual Studio (so non XNA, but google seems to be guiding here). 我在尝试在Visual Studio中保存文件时也遇到了这个问题(所以非XNA,但谷歌似乎在这里指导)。

Problem turned out to be that I had a partially completed git command running in my terminal - it was a diff against the file I was trying to save. 问题结果是我在我的终端中运行了部分完成的git命令 - 这是我试图保存的文件的差异。

When I terminated the command then the problem went away. 当我终止命令时,问题就消失了。

In my case, this error was being caused by Microsoft Security Essentials scanning the file as soon as Visual Studio saved it before a compile. 就我而言,这个错误是由Microsoft Security Essentials在编译之前立即扫描文件引起的。 The compiler then tried to access the file and would find it locked by MSE. 然后编译器尝试访问该文件,并发现它被MSE锁定。 Adding the Visual Studio projects directory to the exclusions list made the error go away. 将Visual Studio项目目录添加到排除列表中会使错误消失。

For me it was Git extensions locking the file up. 对我来说,Git扩展锁定了文件。 I killed the git process that had got stuck and rebuilt the project. 我杀死了卡住并重建项目的git进程。 If you cant find whats locking up the file you can always restart the computer :) 如果你找不到什么锁定文件,你可以随时重新启动计算机:)

I've got the same problem, but I don't have Visual Studio Achievements extension installed ! 我有同样的问题,但我没有安装Visual Studio Achievements扩展!

I'am totally stucked with this problem, I con not build my code any more. 我完全坚持这个问题,我不再建立我的代码了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 System.IO.Exception 错误:“无法在用户映射部分打开的文件上执行请求的操作。” - System.IO.Exception error: “The requested operation cannot be performed on a file with a user-mapped section open.” Visual Studio 构建错误:无法对具有用户映射的文件执行请求的操作 - Visual Studio Build Error:requested operation cannot be performed on a file with a user-mapped 当'用户映射部分打开的文件无法执行请求的操作时'出了什么问题?' - What's wrong when 'the requested operation cannot be performed on a file with a user-mapped section open?' 如何解决此视觉工作室错误? “请求的操作无法在打开了用户映射部分的文件上执行” - How can I fix this visual studio error? “The requested operation cannot be performed on a file with a user-mapped section open” 错误:提交请求后无法执行此操作 - Error: This Operation cannot be performed after request has been submitted ASP.net core 2. 0 get error when use transaction scope: The requested operation cannot be completed because the connection has been broken - ASP.net core 2. 0 get error when use transaction scope : The requested operation cannot be completed because the connection has been broken MailItem.Save()错误“由于邮件已更改,因此无法执行该操作” - MailItem.Save() error “The operation cannot be performed because the message has been changed” Outlook 插件错误:无法执行操作,因为消息已更改 - Outlook add-in error: The operation cannot be performed because the message has been changed 不稳定的LINQ to SQL错误:“在调用SubmitChanges期间无法执行操作。” - Erratic LINQ to SQL Error: “operation cannot be performed during a call to SubmitChanges.” *创建* Salesforce对象时,“用不活动的用户执行操作”错误的原因是什么? - What are the causes of a “operation performed with inactive user” error when *creating* a Salesforce object?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM