Tool:Visual Studio 2015 Ultimate Update 3
OS:Windows 10
.NET Core 1.0.0
ASP.NET Core 1.0.0
將 Console Application(.NET Core)轉換成ASP.NET Core Web Application(.NET Core)的過程中,使用Visual Studio 2015以IIS Express啟動網站,結果發生錯誤:
The project does't not know how to run the profile IIS Express.
解決方式,先Unload Project
編輯專案檔案:
修改xproj檔案,將:
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
修改為:
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
然後重新載入專案即可:
沒有留言:
張貼留言