Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: COMException opening project file

I am using VS 2008. When I opened a c# project file created by another developer I received a System.Runtime.InteropServices.COMException. I searched the web and found the solution was to comment out the ProjectExtensions section of the project file. I did this an it opened fine. But looking over the commented code I don't understand what would cause this. Does anyone have a clue why this would fail on my local machine? I have IIS 7 installed and running properly.

  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>True</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>62088</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>http://localhost/</IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
like image 850
IanStallings Avatar asked Dec 01 '22 11:12

IanStallings


2 Answers

Following solution worked for me just now..

  • Once the solution opens, right-click on the unavailable project and select - - Edit project_file_name.vbproj.
  • Scroll to the bottom of the page, and delete the ProjectExtensions section.
  • Save the page.
  • Right-click again on the unavailable project, and select Reload Project.

Your project should now be available and you should be able to see all your project files.

like image 67
Amnesh Goel Avatar answered Dec 17 '22 12:12

Amnesh Goel


Okay I found the reason(s):

  1. I was not running VS 08 as administrator.
  2. I already had a site mapped to localhost so it could not create it on starting the project Solution? Edit the project file in notepad and change the IISUrl value to localhost/sitename
like image 36
IanStallings Avatar answered Dec 17 '22 11:12

IanStallings