-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS 2013 temporary file & renaming issue #40
Comments
Here is the reasoning behind it from the VS team: Thanks for reaching out to us David! David from our team. In VS 2013, we have introduced this new disaster recovery feature that helps recover files in case of an unexpected crash. We got a number of customer reports where their files used to get “zeroed out” after a Windows crash event. This feature allows us to preserve the latest possible contents of the file and recover in case of an unexpected event such as a Windows crash. Thanks, From: David Starr Murali, Summary: Visual Studio creates temp files as part of standard file save process. Do you understand the behavior described below? If not, who might help us learn more? Thanks! David Starr From: Amir Rajan Jeff Schumacher (@codereflection) and I develop open source auto tests tools for .Net. Jeff built Giles and I built SpecWatchr. Both of our tools monitor file change events in a given directory. When a file change event occurs, we kick off a build, test run, web deployment or anything else you may want to contextually do when a code file changes. It turns out that VS 2013 doesn't change .cs files, but instead creates a temporary version and *replaces the original. This photo I took of the file change events shows two temp files getting created..I didn't capture the rename event, but notice that no file changed event for HomeController.cs is raised: https://pbs.twimg.com/media/BPeOrcPCMAAzKQv.jpg:large We're both just confused. Why would a ctrl+s in VS 2013 create two temp files and then rename the original file (as opposed to just changing the original file)? Thanks for fielding this question. It's really appreciated! Amir |
Sounds like the way around this for now is to handle the rename event. @amirrajan, is that what you've done with SpecWatchr? It really seems like the VS team is putting a band aide on the problem. I know they cannot do anything about Windows crashing, but why would Visual Studio zero out a file completely? I have to wonder if other IDE's, heck even vim or emacs, has had reports of this problem on Windows. Then again, maybe the complaints the VS team are getting are all from people using TFS. ;) |
Yes. Handling for the rename event fixed the issue. Here is the code for reference: https://github.com/amirrajan/SpecWatchr/blob/master/sidekickapp.cs#L24 and this https://github.com/amirrajan/SpecWatchr/blob/master/sidekickapp.cs#L65 |
More issues have cropped up, specifically with Windows 8 + VS 2013. Details here: https://github.com/amirrajan/SpecWatchr/issues/7#issuecomment-22581729 |
More updates, looks like the file change issue was fixed, they just didn't tell anyone. That and the file change events are raised in a different order. In other words, SpecWatchr screwed up. https://github.com/amirrajan/SpecWatchr/issues/7#issuecomment-22593175 |
#40 Handling rename issue for VS2013
Test support for VS 2013. The SpecWatchr guys (@amirrajan) found that temporary files are getting created, and file renames are occurring with a save in VS 2013.
The text was updated successfully, but these errors were encountered: