代码之家  ›  专栏  ›  技术社区  ›  BenoitM

.Net核心网站发布Microsoft。网站发布。目标

  •  1
  • BenoitM  · 技术社区  · 7 年前

    我发布web应用程序没有问题,但这个网站给我带来了一些麻烦。

    我添加了一个为文件系统发布方法配置的发布配置文件。

    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.
    

    <!--<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]
    

    1 回复  |  直到 7 年前
        1
  •  2
  •   Martin Ullrich    7 年前

    dotnet CLI工具来发布不受支持的“经典”网站项目。使用 msbuild