Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

adding DotnetCliTool to csproj project on VS2017RC #597

Closed
kazuk opened this issue Feb 10, 2017 · 4 comments
Closed

adding DotnetCliTool to csproj project on VS2017RC #597

kazuk opened this issue Feb 10, 2017 · 4 comments
Labels

Comments

@kazuk
Copy link

kazuk commented Feb 10, 2017

Hi, Microsoft.Extensions.SecretManager.Tools package is this repo?

I will Encrypt to configuration items.

reading this.
https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets

Installing the Secret Manager tool
Add Microsoft.Extensions.SecretManager.Tools to the tools section of the project.json file and run dotnet restore. 

I can not to do. because I don't have project.json .

I try add NuGet package reference to project.
error massage shown this. (I use ja-jp localized VS)

Incompatible packages: 1
パッケージ 'Microsoft.Extensions.SecretManager.Tools 1.1.0-preview4-final' には、プロジェクト 'WebFront' でサポートされていないパッケージ タイプ 'DotnetCliTool' があります。

message means package type 'DotnetCliTool' is not supported on Web project,

My question.

  1. How to add DotnetCliTool to csproj styled project on VS2017RC
@natemcmaster
Copy link
Contributor

Because of NuGet/Home#4190, you cannot install the package from the NuGet GUI. Instead, you must edit your csproj file to contain:

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

The source for this tool lives here: https://github.com/aspnet/DotNetTools/

@maksym-devpro
Copy link

Dear Support Team,

We have faced a problem with adding "Microsoft.Extensions.SecretManager.Tools" into AspNet Core project in Visual Studio 2017.

Error message:

Package 'Microsoft.Extensions.SecretManager.Tools 1.0.1' has a package type 'DotnetCliTool' that is not supported by project 'SecretManagerInVs2017'.
http://screenshots.client-demo-site.net/scn-20170629-180145-9y6gp.png

I've tried to add "SecretManager.Tools" as described in the documentation (https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets) but it didn't solve the problem
http://screenshots.client-demo-site.net/scn-20170630-150359-v4z9t.png

Please help us solve the described issue.

Kind regards,

@natemcmaster
Copy link
Contributor

@maksym-devpro the error you described is a known issue. See NuGet/Home#4190. As I mentioned before, manually edit your csproj and then run restore either in Visual Studio or on command line with dotnet restore.

@maksym-devpro
Copy link

Thank you so much.
I was able to added an extension.

jmlc101 added a commit to jmlc101/JM.Capstone that referenced this issue May 18, 2018
…/Configuration#597, I knew I had to restore after editing csproj. Installed SecretManager.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants