I gave the answer to my problem of today in the title…
I work on multiple projects. But we also recently changed our source control provider from SVN to Git. If I haven’t touched a code-base for months, I don’t bother to clone the new repository until I need to work on it. That’s what happened today.
I cloned the repository for this particular solution, and started working on it. I added new code to a few projects, including one new WCF method. Tested everything else, then when I wanted to test the WCF service changes, two things went wrong:
- Pressing F5 launched my browser rather than the WCF Test Client.
- After I figured out how to fix the first issue, the newly added method was missing.
To fix the first issue, all I had to do was right-click the source file containing my service contract and choose Set As Start Page.
Then off to Google and StackOverflow, but I found nothing that solved my problem.
In my case, what happened was IIS Express was still pointing to the old contract, in the source folder that I used before switching to Git. I confirmed it by trying to move that directory and saw the usual Windows error message telling me that directory was in use.
To fix the issue, I had to manually edit the applicationhost.config file found in:
Fixing it was just a matter of searching for my project name, and right away I saw the paths pointing to the wrong directory.
I hope this helps somebody who has a similar problem…