【问题标题】:Package 'Microsoft.Extensions.SecretManager.Tools 1.1.0-preview4-final' has a package type 'DotnetCliTool'包“Microsoft.Extensions.SecretManager.Tools 1.1.0-preview4-final”的包类型为“DotnetCliTool”
【发布时间】:2017-04-01 17:27:02
【问题描述】:

FalconWebsite.csproj

<ItemGroup>
    <PackageReference Include="knockoutjs" Version="3.4.1" />
    <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0-beta1" />
    <PackageReference Include="Microsoft.AspNetCore" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.OAuth" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.0" />
    <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="1.1.0-msbuild3-final" />
  </ItemGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0-msbuild3-final" />
  </ItemGroup>

我正在尝试使用以下命令安装 Microsoft.Extensions.SecretManager.Tools

安装包 Microsoft.Extensions.SecretManager.Tools -Pre

但是,我得到如下图

我在这个链接Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-msbuild2-final' has a package type 'DotnetCliTool' that is not supported by project发现了类似的错误 但是,根据链接不适合我

【问题讨论】:

  • 同样的问题!我找不到任何人对此一无所知!我们该如何解决这个问题?
  • 我遇到了同样的问题。VS 2017社区版,Asp .Net Core Web项目。我解决不了!

标签: c# asp.net-mvc asp.net-core visual-studio-2017


【解决方案1】:

编辑项目文件,添加以下行:

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.0-msbuild3-final" />
  </ItemGroup>

我刚刚试了一下,效果很好。

【讨论】:

【解决方案2】:

使用Microsoft.Extensions.SecretManager.Tools版本1.0.0-msbuild3-final

【讨论】:

  • 我遇到了同样的错误。我使用了命令“Install-Package Microsoft.Extensions.SecretManager.Tools -Version 1.0.0-msbuild3-final”。我试图复制并粘贴“”。但还是同样的问题
【解决方案3】:

由于NuGet/Home#4190,您无法从 NuGet GUI 安装包。相反,您必须编辑您的 csproj 文件以包含:

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.0-msbuild3-final" />
</ItemGroup>

这是你的答案,因为我是通过页面来解决的。 https://github.com/aspnet/Configuration/issues/597

【讨论】:

    猜你喜欢
    • 2017-07-20
    • 1970-01-01
    • 1970-01-01
    • 2015-04-10
    • 1970-01-01
    • 2018-10-18
    • 1970-01-01
    • 2015-11-22
    • 1970-01-01
    相关资源
    最近更新 更多