How to turn off encrypting of .sln files in Visual Studio on removable drive?
Problem description: (occurs at least in VS2005 and VS2008, not tested in VS 2010)
If project (e.g. .csproj) or solution file (.sln) is opened from removable drive, and something happens ... seems like if drive is disconnected without safe removing, or if computer crashes or if VS crashes, then project and/or solution files got encrypted. It seems like Visual Studio encrypts project files when opened and only decrypts them when Visual Studio or project is correctly closed. If something unexpected happens, files remain encrypted.
It is Toshiba hard-disk in these cases, but occurred to me also on other removable hard drives or USB keys.
This is not a problem, until disk is connected to the same computer (files are encrypted, so they can be opened only by Win user that开发者_如何学编程 encrypted them). But when disk is connected to another computer, or even worse ... when Windows installation gets corrupted, then the project files are no more accesible.
Is there some way to turn this functionality off? Or is it a bug and needs to be solved just by "not using removable drives"?
I am not aware of any inbuilt encryption for either solution or project files, and I quite often move projects around on USB stick. It is possible that this is being provided by some service on your computer, or by the disk itself - but I wonder if a more likely explanation is simply file corruption or a damaged disk.
I know this is an older post, but just to add to this...
I'm running a machine with Windows 7 Professional x64. Last night Windows lost communication with my RAID Controller out of nowhere (can't tell if the RAID controller or Windows was the cause, not enough in Event Viewer to deduce). Once this occurred, the Volume vanished from Windows Explorer (makes sense).
Windows then popped up a message in the System Tray informing me I should backup my personal certificates (PFX file) somewhere since I haven't done so in a while. I ignored this step, since I never use anything that would require personal certificates (no EFS or anything like that), so I shut down since everything was screwed at this point (Page file is on the volume that went bye bye)
Upon a reboot, my RAID array checked out fine, so I booted into Windows starting it normally and not going into Safe Mode. Voila, everything is back to normal again, or so I thought...I'm experiencing the same issue similar to here and that posted at http://www.dreamincode.net/forums/topic/277832-projects-became-encrypted-when-i-used-ext-drive-on-laptop-now-what/ as well.
So between these posts, we can deduce (possibly) that Windows does not fair very well with Removable Media, or Volumes that go-away all of a sudden without a clean dismounting.
I'm not sure why this would cause our files to start having the Encrypted attribute applied to them though, that's still the mystery...Unfortunately I think we're just going to be left wondering since this is probably way under the hood of Windows in WinFS, HAL, or one of those untouchable abstraction layers.
Hopefully this additional insight might help others out there figure out WTF is going on with this.
精彩评论