views:

781

answers:

6

I have a solution with many projects. On Debug, I have three web projects that I want to start up on their own Cassini ASP.NET Web Development servers. In the Solution Properties - Common Properties - Startup Project, I have Multiple startup projects chosen with the three web applications' Action set to Start. All three web development servers start, and all three web pages load.

However, Visual Studio is only attaching to two of the WebDev.WebServer.EXE processes. I have to manually go attach to the third process in order to debug it with the debugger.

This behavior just started happening, and I'm at a loss as to how to troubleshoot this. Any help is appreciated.

EDIT:

Also to note, I have stopped and restarted the development servers several times with no change in behavior. Also, when attaching to the process manually, I see that the Type property of the two automatically attached WebDev.WebServer.EXE processes is Managed, while the Type property of the unattached WebDev.WebServer.EXE process is TSQL, Managed, x86. When looking at the project's properties, however, I am targeting AnyCPU, and do NOT have SQL Server debugging enabled.

EDIT:

Also to note, the two projects that attach correctly are C# web applications.

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

The project that is not attaching correctly is a VB.NET web application.

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

EDIT:

Also to note, the behavior is the same on another workstation. So odds are that it's not a machine specific problem.

+1  A: 

This might be a shot in the dark, but I would look at the csproj files, to see if the one that isn't working has any obvious differences. In particular, I would look for a <ProjectTypeGuids> element. Anything that relates to web-hosting is of interest too, of course; so anything under:

<ProjectExtensions>
  <VisualStudio>
    <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
      <WebProjectProperties>

(or similar, depending on your flavor of project; compare between the 3 for anything that looks out of place)

Marc Gravell
I edited my question and specified my ProjectTypeGuids. When comparing the ProjectExtensions section, the only difference between the three different projects is the port number.
Aaron Daniels
hmmm... ok, it was worth looking though.
Marc Gravell
I agree. I think you got me looking in the right direction though.
Aaron Daniels
I'm thinking the issue may be around the code types the debugger is using. Why would the one vb.net project be T-SQL, Managed, and x86? Whereas the others are simply managed. Would a strongly typed dataset cause this? I have Native Code and SQL Server options unchecked in the Project Properties - Web - Debuggers section.
Aaron Daniels
A: 

What I do is set multiple startup projects and choose each of the web applications in the properties of the solution (Right Click Solution in Solution Explorer > Properties).

Is the third project an IIS web project (set in properties)? We have numerous IIS projects that run together and we don't have any issues debugging.

Try solution > properties > Configuration Properties > Configuration and see what projects get build and when.

Burt
All three are web application projects. The only difference is that the one that wont attach to the debugger is a VB.NET project, whereas the others are C# projects.
Aaron Daniels
A: 

Not sure what the problem might be, but when I've had problems with complex projects before I've found it helps to look at the .vbproj or .csproj files directly.

Have you tried creating a new vb.net project, and simply copying over the files from the non-working project?

I'd also try adding a 4th, very simple C# web application project to see if perhaps 3 is some sort of magic number for your configuration (though I'm currently working on a solution with more than 3, and have no problems debugging). You could do the same with a simple vb web app - you'll know then whether it's a problem with webserver #3, vb.net in general, or your specific project.

chris
Looking through them, I cannot find any discernible differences. I've created a new VB.NET project just to see if it was something to do with VB.NET, but it worked just fine. I didn't copy everything over as it is a large web application under source control. Plus, I would like to know what is causing the issue just as much as I want the issue fixed.
Aaron Daniels
If you copy everything over to the new project, in theory the .vbproj file should look the same as the one that's not working. Diff them, and you may have a clue as to what's causing the problem. You don't have to check in the changes, if you find the problem is in the .vbproj file you can simply edit it then check it in.
chris
A: 

Right click on the main solution -> Properties -> Common Properties -> Start Up Project ->

Make sure it's set to "Multiple startup projects" and all are set to "Start" instead of none or start without debugging.

Also double check each projects .user file and make sure AlwaysStartWebServerOnDebug is set to true along with any other debugging options.

JKG
A: 

This is going to be a very basic thing, I'm just posting it to make you sure.

Is debugging enabled in the Web.config file of the web application? Is it set to Debug mode when you start it in Visual Studio?

Venemo
Yes. The other two projects attach just fine. If those weren't configured, nothing would attach. Thanks for the thought though.
Aaron Daniels
+2  A: 

I got stuck here to, you should check out this answer

kayos
I don't know if it is because this question previously had a bounty or what, but it's not letting me accept your answer. Thank you so much. This is definitely the issue!
Aaron Daniels
No problem. It was racking my brain for almost a whole day. What I end up doing is commenting out the <location> tags and then uncomment them for deployment. Works like a charm!
kayos