Cannot open files in Visual Studio but in Delphi and Notepad

0

About an hour ago Visual Studio 2008 decided that it cannot find files any more.

This is on 64 bit Windows Vista.

When I right-click on a text file (source code or otherwise) and select "open with" and "Visual Studio 2008", I get the following error (example):

Windows cannot find 'C:\Users\ajbrehm\Documents\Visual Studio 2008\Projects\Hello Prism\Hello Prism\Main.pas'. Make sure you typed the name correctly, and then try again.

When I right-click the same file and select "open with" and "Delphi 2010" or "Notepad" (both other options available for text files on my system), the file opens correctly.

Oddly enough when the file is part of a Visual Studio project and I open the project itself with Visual Studio (this works), I can open the file from within Visual Studio.

Any ideas what might be going on?

This started about an hour after I made a complete backup of my Vista VM and after I installed IIS 7, SQL Express, and Sourcegear Vault. The first files I noticed couldn't be opened in Visual Studio any more where Pascal source files in checked-outed folders from Vault. And Vault also seems to be unable to see one of the sources files and claims they don't exist. I found out about Visual Studio not opening ANY files any more when I tried to recreate the file Vault refused to see.

Update: I just checked. Another user, "administrator", can still open text files with Visual Studio 2008. Both users have administrator rights.

Update: I just restored the hours-old backup. Same problem. Apparently whatever triggered this happened before the install of IIS 7 and SQL Express. Never noticed it before.

Andrew J. Brehm

Posted 2009-12-21T00:56:08.540

Reputation: 4 411

I'll try that! That could explain why it behaves differently for different users. – Andrew J. Brehm – 2010-01-21T11:55:53.823

1Have you tried setting VS to open always under administrative priviledges (Right click -> Properties -> Compatibility) – Scoregraphic – 2010-01-13T13:43:59.197

Answers

0

You have invalid characters, like U+0001, in the files. Remove them and things should work fine.

user35470

Posted 2009-12-21T00:56:08.540

Reputation:

1No, that's not it. It's unlikely that I have invalid characters in ALL files and it's also unlikely that it would affect one user but not others. – Andrew J. Brehm – 2010-04-28T21:05:13.330