↓ Archives ↓

Posts Tagged → vs2005

Limited refactoring

Yesterday I was programming something in C#.NET using Visual Studio and I ran into a rather annoying lack of feature.

I am using Visual Studio 2005 so this might have been resolved in 2008 or 2010 – but non-mandatory program suites call for previous version updates! (This is why our rather limited team of developers solve this by supplying mandatory updates via subscription)

Anyway – My solution has a few projects (a main .exe and a few DLL’s) and one of these holds some settings and resources which is accessed through the ‘standard’ interface. We’ve simply double clicked the right place and added settings and resources. It works! It’s magic!!

The problem occurred when I wanted to change the default namespace for the project containing the settings and resources. VS2005 refactor my settings and resources to the new namespace – which is great, that was what I wanted – but in EVERY place where these are referred I need to change the reference manually! That was a LOT of work! Luckily it required no thinking at all! :-)

I find it very ridiculous that the namespace is changed for the settings/resources but isn’t changed throughout the rest of the code – this is actually a feature that the normal ‘refactor’ function handles nicely without much trouble and something that a simple search and replace can solve…

Visual Studio – Again!

Once again Visual Studio has proven troubleish!

I’ve spent the last hour trying to find out why our project at work wouldn’t compile (complaining about missing files) on other machines but would on mine! I went through every file in the repository and confirmed that it was up to date. I confirmed that the same files where present and up-to-date on the other machines… !!!

I turned out that I had been moving files around. I had made a sub-namespace to one of our project and moved some files into it. This can be done with no worries – except I didn’t close VS2005 before I did a commit. BIG mistake!! Apparently the project-file only gets updated with the new file locations when I close VS2005 and not when I hit the save-button…

Another hour spent learning the hard truth about Visual Studio.