"Set as project launch"
I have a solution with a bunch of projects. The Launch project is an ASP.NET MVC Web Application.
I installed it as a startup project (by right clicking on it in Solution Explorer and choosing βinstall as startup project.β The project name is in bold and everything works fine.
Then I will edit one of the supporting projects and click the "Start Debugging" button and bang - the message "the project of this type cannot be started".
Then I check and the web project is no longer set as a startup project. Etc....
Does anyone know why this is happening?
a source to share
This can happen if the projects in the solution do not have unique identifiers. Each project file has this entry:
ProjectGuid = "{36910E05-3D05-4AC0-B90C-94F8F776CE5F}"
If you created your supporting projects by copying the file when uploading the project, they will still have the same ID. The easiest way to check is to open the solution file with a text editor. You know you have a problem if you see two projects with different names, but the same ID:
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project1", "Project1.csproj", "{BAC18E5A-710F-4E5A-8DE3-822CE1AA5D38}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project2", "Project2.csproj", "{BAC18E5A-710F-4E5A-8DE3-822CE1AA5D38}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Another symptom of this problem is that you cannot define dependencies between projects (ie Visual Studio keeps "forgetting" them).
To fix the problem, simply edit the project files to have unique identifiers and adjust the solution file accordingly.
a source to share