I have been wrestling with a curious problem for some time now. I have a C# project loaded up in VS 2008 and version-controlled in SVN. What was happening is that after an update the Winforms Designer refused to load some of the forms, claiming that “The file (…) does not support code parsing or generation because it is not contained within a project that supports code.” What the… ?

It turns out that there is some Designer Magic in .user and .suo files created by VS to contain user settings. Our SVN repo ignores those files, but apparently – if you change the form afterwards, it fails to open in the Designer.

Deleting those user preference files and reopening the solution worked fine for me. Currently I have no time to look at this further and it is very likely that my (lame) explanation is completely moot. That’s my first impression, though. I’ll keep on updating.

Today I went ahead and tried to get back to a project started some time ago, but something was not right. I weren’t able to update or commit anything to my SVN server. I spent a frustrating hour trying to resolve the problem, but finally I managed to find what went wrong. Here’s my troubleshooting process:

The problem: Visual Studio cannot connect to my server via SSH – commits and updates fail after authentication.

  1. Q: Does providing right/wrong authentication change anything?
    A: No, no visible change in (weird) behavior.
  2. Q: Does TortoiseSVN have the same problem?
    A: Yes, it’s commits and updates do not work. It’s not Visual Studio’s problem.
  3. Q: Does it work on another repo on this server?
    A: No, it does not. It’s not this single repo problem then.
  4. Q: Does it work for another server without SSH auth?
    A: Yes, checked repo for Processing. It’s not general TortoiseSVN problem. It’s either server or local Tortoise config issue.
  5. Q: Does it work on another computer?
    A: Yes, checked my home box, works there. It seems to be my laptop’s problem.
  6. Q: Does substituting TortoisePlink for Plink do anything?
    A: No effect.
    It seems that (Tortoise)Plink fails to connect, but Tortoise doesn’t report the error properly.
  7. Q: Does Plink connect to the server when run from command-line, not Tortoise?
    I run cmd.exe, go to plink.exe location and type “plink mysvnserver.example.com”.
    A: No, it returns an error: “bash: mysvnserver.example.com: command not found” I have no idea what this means.
  8. Q: Does it work for another server?
    A: No, it prints:
    >plink anotherserver.example.com
    login as: myusername
    myusername@mysvnserver.example.com’s password:
    What the…? I tried to login to anotherserver, but was logged to mysvnserver.

Then I figured out that PuTTY settings might be interfering with proper plink operations. It seems that when you overwrite the default settings, every PuTTY app uses them.  So, plink didn’t require host name (it was specified in the Default Settings), it treated the supplied host name as a command, therefore failing. I have reset the putty settings, now everything runs just fine.

I hope this helps, and next time when you get “connection closed unexpectedly” from TortoiseSVN, you’ll know where to look.

Follow

Get every new post delivered to your Inbox.