How to turn off encrypting of .sln files in Visual Studio on removable drive?

青春壹個敷衍的年華 提交于 2019-12-13 19:20:37

问题


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"?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/5726333/how-to-turn-off-encrypting-of-sln-files-in-visual-studio-on-removable-drive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!