无法在Visual Studio 2013中保存对文件的更改 [英] Unable to save changes to files in Visual Studio 2013

查看:323
本文介绍了无法在Visual Studio 2013中保存对文件的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个受源代码控制(TFS,Visual Studio Online)的Visual Studio 2013解决方案.它已映射到本地工作空间,我已经签出了一些文件(例如,web.config,global.asax).

I have a Visual Studio 2013 solution that is under source control (TFS, Visual Studio Online). It is mapped to a local workspace, I have checked out some files (e.g. web.config, global.asax).

当我尝试将任何更改保存到文件时,出现将文件另存为"对话框,如果单击保存",则会警告我该文件已存在(例如,web.config),并询问我是否要替换它.如果我单击是",我得到一个错误对话框,提示该进程无法访问文件'.... \ wyfvmjia.p1p〜",因为该文件已被另一个进程使用.我不知道此文件是什么或与我要保存的文件(web.config)有什么关系.

When I try to save any changes to files I get a 'Save File As' dialog, and if I hit Save it warns me the file already exists (say, web.config), and asks me if I want to replace it. If I hit Yes I get I get an error dialog saying 'the process cannot access the file '....\wyfvmjia.p1p~' because it is used by another process. I have no idea what this file is or how it is related to the file (web.config) I am trying to save.

这真令人发指,任何帮助将不胜感激!

This is infuriating, any help would be greatly appreciated!

Visual Studio进程(devenv.exe)似乎在同一文件夹(例如wyfvmjia.p1p〜)中创建和删除随机临时文件,并导致这些文件上的共享冲突"(我使用了sys内部构件实用程序来监视文件夹),当我尝试保存时,例如说web.config.

It looks like the Visual Studio process (devenv.exe) is creating and deleting random temporary files in the same folder (e.g. wyfvmjia.p1p~) and is causing a 'sharing violation' on those files (I used a sys internals utility to monitor the folder) when I am trying to save let's say web.config.

似乎在其中一项注释中暗示了VS2013创建了一个副本文件,然后在尝试在项目中保存文件时替换原始文件.这可以解释为什么我会看到创建和删除临时文件的原因.奇怪的是,虽然出现将文件另存为"对话框.看起来其他进程(防病毒?)在VS可以执行某些操作之前已经掌握了该临时文件?

This seems to suggest in one of the comments that VS2013 creates a copy of a file and then replaces the original when trying to save a file in your project. This would explain why I see temporary files getting created and deleted. It's odd I get the 'Save File As' dialog though. It looks like some other process (antivirus?) gets hold of the temporary file before VS can do something with it?

我创建了一个仅带有program.cs文件的控制台应用程序项目,并且正在发生同样的情况.这可能是防病毒软件干扰VS2013复制-替换"功能的问题.

I created a console application project with only a program.cs file and the same is happening. This may be a problem with Antivirus software interfering with the VS2013 'copy-replace' feature.

已更改标题.仍然找不到解决方法.

Changed title. Still have not been able to find a solution.

查看已接受的答案.抱歉不早回来.

See the accepted answer. Apologies for not getting back earlier.

推荐答案

事实证明,这是由磁盘加密软件引起的.每次启动VS2013后,每次禁用磁盘加密软件服务都可以解决此问题.我在Visual Studio的早期版本中没有这个问题,大概是因为在我最初的问题中EDIT 2中提到的VS2013采用了新的复制-替换周期.

It turns out this was caused by disk encryption software. Disabling the disk encryption software services each time after starting VS2013 solves the problem. I did not have this problem with earlier versions of Visual Studio, presumably because of the new copy-replace cycle adopted by VS2013 mentioned in EDIT 2 in my original question.

很抱歉没有再发表评论并回答我的原始问题,我完全忘记了.

Apologies for not coming back to comment and answer my original question, I completely forgot about it.

这篇关于无法在Visual Studio 2013中保存对文件的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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