bestlong 怕失憶論壇's Archiver

bestlong 發表於 2011-12-30 15:27

VS2010 開啟專案出現需要遺漏的 Web 元件才能載入

環境是 Windows 7 PRO + Microsoft Visual Studio 2010 PRO

下載了 BugNET-0.9.147-Source.zip 來學習 ASP.NET C#

解壓縮後開啟專案時出現了下列訊息:

Web 專案 'BugNET_WAP' 需要遺漏的 Web 元件才能載入。
您要立即使用 Web Platform Installer 下載並安裝元件嗎?

原圖如下:



如果有安裝 Web Platform Installer 環境下選擇 "是" 會出現下列畫面:





居然是要我安裝 IIS Express 這很奇怪,因為 Win7Pro 本身已有內建 IIS 只好先取消安裝
接著方案總管的畫面就顯示無法載入的訊息



那麼就來編輯 BugNET_WAP.csproj 看看問題在哪裡





馬上就看到有警告資訊以及內容在 <UseIISExpress>true</UseIISExpress> 有藍色波浪線
手動改為 <UseIISExpress>false</UseIISExpress> 存檔關閉

然後再重新載入 BugNET_WAP 換出現別的訊息如下:

Web 應用程式專案 BugNET_WAP 設定為使用 IIS。 若要存取本機 IIS 網站,您必須在系統管理員帳戶的內容中執行 Visual Studio。



只好按照要求用系統管理員權限啟動 VS2010 後再次開啟專案,還是一樣的有問題再次重新載入 BugNET_WAP 換下列訊息:

Web 應用程式專案 BugNET_WAP 設定為使用 IIS。 找不到 Web 伺服器 'http://localhost:59847/'。



一樣進行編輯 BugNET_WAP.csproj 內容在最後的段落找到下列設定:[code]  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>True</UseIIS>
          <AutoAssignPort>False</AutoAssignPort>
          <DevelopmentServerPort>59847</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>http://localhost:59847/</IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
[/code]將 <UseIIS>True</UseIIS> 改為 <UseIIS>False</UseIIS> 存檔後關閉,再一次重新載入 BugNET_WAP 就可以了。
頁: [1]

Powered by Discuz! X1.5 Archiver   © 2001-2010 Comsenz Inc.