【问题标题】:dotnet core build <CopyToOutputPathectory>PreserveNewest</CopyToOutputPathectory> no workingdotnet 核心构建 <CopyToOutputPathectory>PreserveNewest</CopyToOutputPathectory> 没有工作
【发布时间】:2017-06-10 10:30:26
【问题描述】:

我正在玩 dotnet core,我开始了一个(非常)简单的博客项目(使用 NancyFx 和 EF 核心)。 除了在构建时复制查看资源外,一切都运行良好。我的 cproj 指定以下内容:

<Content Include="views\demo\*;views\blog\*">
    <CopyToOutputPathectory>PreserveNewest</CopyToOutputPathectory>
</Content>

但是在运行 dotnet build 时,我的 view/* 文件不会像我预期的那样复制到 bin\Debug\netcoreapp1.0。完整的应用程序代码可在https://github.com/b3b00/NaApp

这个功能没有按我的预期工作还是我错过了什么? 目前我唯一的“解决方法”是手动复制这些文件

感谢您的帮助

奥利维尔

【问题讨论】:

    标签: .net .net-core csproj


    【解决方案1】:

    您的代码中有错字。应该是CopyToOutputDirectory 而不是CopyToOutputPathectory

    【讨论】:

    • 非常感谢 natemcaster !我现在没有时间纠正它,但它肯定会完成这项工作。如此愚蠢的错误,再次感谢
    猜你喜欢
    • 2020-02-18
    • 2018-06-18
    • 1970-01-01
    • 2018-12-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多