Search code examples
vb.netwcfvisual-studio-2010mercurialvisualhg

How to make the .svc.cs or .svc.vb file visible in Solution Explorrer for a WCF project?


I have a solution that contains a WCF service project. In Solution Explorer only the MyService.svc file is shown, but on double clicking it the MyService.svc.vb file opens for editing. That is OK, but Visual HG (based on Mercurial) now doesn't show that the MyService.svc.vb file has changed and I cannot commit any changes without browsing to the Tortoise HG workbench. This is a possible cause for errors when merging code. So, how do I make the MyService.svc.vb file appear in Solution Explorer?

EDIT: The problem seems to be limited to VB WCF projects. In C# there is an arrow before the .svc file that will show the svc.cs file when clicked. Bug?


Solution

  • The way to make this work is to click on the "Show All Files" Icon in Solution Explorer.

    enter image description here

    While I can't say with 100% certainty that the behavior difference between C# and VB.Net is "By Design" it almost certainly is. There were very analogous decisions in other project types and likely the same decision was applied to WCF services. The rationale behind it is that VB users don't want the clutter.