如何在可移动驱动器上的 Visual Studio 中关闭 .sln 文件的加密?

发布于 2024-11-02 09:57:58 字数 459 浏览 6 评论 0 原文

问题描述: (至少在 VS2005 和 VS2008 中发生,未在 VS 2010 中测试)

如果从可移动驱动器打开项目(例如 .csproj)或解决方案文件(.sln),并且发生某些情况...似乎驱动器在没有安全删除的情况下断开连接,或者如果计算机崩溃或 VS 崩溃,则项目和/或解决方案文件会被加密。看起来 Visual Studio 在打开时会加密项目文件,并且仅在 Visual Studio 或项目正确关闭时才解密它们。如果发生意外情况,文件仍保持加密状态。

在这些情况下是东芝硬盘,但我也想到其他可移动硬盘或 USB 闪存盘。

这不是问题,直到磁盘连接到同一台计算机(文件已加密,因此只能由加密它们的 Win 用户打开)。但是,当磁盘连接到另一台计算机时,或者更糟糕的是......当 Windows 安装损坏时,项目文件将无法再访问。

有什么办法可以关闭这个功能吗?或者这是一个错误,需要通过“不使用可移动驱动器”来解决?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心头的小情儿 2024-11-09 09:57:58

我不知道解决方案或项目文件有任何内置加密,而且我经常在 USB 记忆棒上移动项目。这可能是由计算机上的某些服务或磁盘本身提供的 - 但我想知道更可能的解释是否只是文件损坏或磁盘损坏。

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.

埖埖迣鎅 2024-11-09 09:57:58

我知道这是一篇较旧的文章,但只是补充一下...

我正在运行 Windows 7 Professional x64 的计算机。昨晚 Windows 突然失去了与我的 RAID 控制器的通信(无法判断是 RAID 控制器还是 Windows 造成的,事件查看器中不足以推断)。一旦发生这种情况,该卷就会从 Windows 资源管理器中消失(这是有道理的)。

然后 Windows 在系统托盘中弹出一条消息,通知我应该在某个地方备份我的个人证书(PFX 文件),因为我有一段时间没有这样做了。我忽略了这一步,因为我从不使用任何需要个人证书的东西(没有 EFS 或类似的东西),所以我关闭了,因为此时一切都搞砸了(页面文件位于再见的卷上)

重新启动后,我的 RAID 阵列检查正常,因此我启动到 Windows,正常启动它,而不是进入安全模式。瞧,一切又恢复正常了,或者我想...我遇到了与这里类似的相同问题,以及发布在 http://www.dreamincode.net/forums/topic/277832-projects-became-encrypted-when-i-used-ext-drive-on-laptop-now-what/以及。

因此,在这些帖子中,我们可以(可能)推断出 Windows 与可移动媒体或在没有彻底卸载的情况下突然消失的卷的兼容性不太好。

我不确定为什么这会导致我们的文件开始应用加密属性,但这仍然是个谜......不幸的是,我认为我们只是想知道,因为这可能是在幕后WinFS、HAL 或那些不可触及的抽象层之一中的 Windows。

希望这个额外的见解可以帮助其他人弄清楚这到底是怎么回事。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文