0
我在.Net Core 2.0上。.Net核心網站發佈Microsoft.WebSite.Publishing.targets
我創建了一個包含webapp和網站的新解決方案。網站項目包含一個index.html和web.config文件。
我沒有發佈Web應用程序的問題,但該網站導致我一些麻煩。
我添加了爲FileSystem發佈方法配置的發佈配置文件。
當我運行的dotnet的默認發佈.publishproj產生,我收到以下錯誤消息
error MSB4019: The imported project
"C:\ProgramFiles\dotnet\sdk\2.0.0\Microsoft\
VisualStudio\v10.5\Web\Microsoft.Web
Site.Publishing.targets" was not found. Confirm that the path in the
<Import> declaration is correct, and that the file exists on disk.
好了,我改變website.publishproj值到目標文件所在。
<!--<Import
Project="$(_WebPublishTargetsPath)\Web\Microsoft.WebSite.Publishing.targets"
/>-->
<Import Project="C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\
Microsoft.WebSite.Publishing.targets" />
然後我得到
error MSB3030: Could not copy the file
"C:\Users\Administrator\AppData\Local\Temp\WebSitePublish\WebSite2-
1026028577\obj\Debug\website.exe" because it was not found.
[C:\Users\Administrator\Documents\visual studio
2017\WebSites\WebSite2\website.publishproj]
我可以使用Visual Studio中沒有任何問題發佈網站。我錯過了什麼?
它確實有道理,它的工作原理。我假定visual c#「Asp.Net網站」模板與dotnet核心完全兼容。謝謝。 – BenoitM