Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choco Install - Newtonsoft Dependency missing #51

Closed
lawrencegripper opened this issue Mar 25, 2015 · 9 comments
Closed

Choco Install - Newtonsoft Dependency missing #51

lawrencegripper opened this issue Mar 25, 2015 · 9 comments

Comments

@lawrencegripper
Copy link

Hi,

Love the project, having a play now.

Looks like your missing the Newtonsoft.Json.dll from the Choco package. With the current package you get the following output.

 C:\WINDOWS\system32> choco install autorest
!!ATTENTION!!
The next version of Chocolatey (v0.9.9) will require -y to perform
  behaviors that change state without prompting for confirmation. Start
  using it now in your automated scripts.

  For details on the all new Chocolatey, visit http://bit.ly/new_choco
Chocolatey (v0.9.8.33) is installing 'autorest' and dependencies. By installing you accept the license for 'autorest' an
d each dependency you are installing.

AutoRest v0.9.6
Added C:\ProgramData\chocolatey\bin\AutoRest.exe shim pointed to '..\lib\autorest.0.9.6\tools\autorest.exe'.
Finished installing 'autorest' and dependencies - if errors not shown in console, none detected. Check log for errors if
 unsure.
C:\WINDOWS\system32> autorest
Microsoft (R) AutoRest 0.9.6.0
Copyright (C) Microsoft Corporation. All rights reserved.

Usage: AutoRest.exe -Input <value> -Namespace <value> [-OutputDirectory <value>] [-OutputFileName <value>] [-CodeGenerat
or <value>] [-Modeler <value>] [-ClientName <value>] [-Header <value>] [-AddCredentials <value>]

Parameters:
  -Input: The location of the input specification.
  -Namespace: The namespace to use for generated code.
  -OutputDirectory: The location for generated files. If not specified, uses "Generated" as the default.
  -OutputFileName: If specified, all generated code is written to this file. Otherwise, code is generated into multiple
files in the OutputDirectory.
  -CodeGenerator: The code generator language. If not specified, defaults to CSharp.
  -Modeler: The Modeler to use on the input. If not specified, defaults to Swagger.
  -ClientName: Name to use for the generated client type. By default, uses the value of the 'Title' field from the Swagg
er input.
  -Header: Text to include as a header comment in generated files. Use NONE to suppress the default header.
  -AddCredentials: If true, the generated client includes a ServiceClientCredentials property and constructor parameter.
 Authentication behaviors are implemented by extending the ServiceClientCredentials type.


Examples:
  Generate C# client in MyNamespace from swagger.json input:
  >AutoRest.exe -Namespace MyNamespace -Input swagger.json

  Generate C# client in MyNamespace into client.cs including custom header from swagger.json input:
  >AutoRest.exe -Namespace MyNamespace -OutputFileName client.cs -Header "Copyright Contoso Ltd" -Input swagger.json

  Generate C# client with a credentials property in MyNamespace from swagger.json input:
  >AutoRest.exe -AddCredentials true -Namespace MyNamespace -CodeGenerator CSharp -Modeler Swagger -Input swagger.json


C:\WINDOWS\system32> cd "C:\Users\xxxxxx\Documents\CustomerTemp\autorest\"
C:\Users\xxxxxxx\Documents\CustomerTemp\autorest> ls


    Directory: C:\Users\xxxxxx\Documents\CustomerTemp\autorest


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       25/03/2015     12:12           3663 devinsight.api.json


C:\Users\xxxxx\Documents\CustomerTemp\autorest> autorest -codegenerator CSharp -Modeler Swagger -Input .\devinsight.a
pi.json -Namespace DevInsight
error: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6ae
ed' or one of its dependencies. The system cannot find the file specified.
Finished generating CSharp code for .\devinsight.api.json.

I grabbed the latest newtonsoft dll from here and placed it in "C:\ProgramData\chocolatey\lib\AutoRest.0.9.6\tools" manually and all seems to work well.

image

image

@matt-gibbs
Copy link
Contributor

@lawrencegripper, thank you. Will publish an update ASAP.

@dotnetdude
Copy link

Nuget package AutoRest also throwing the same error. Missing Newtonsoft.Json dll. Looks like Newtonsoft json dependency is missing. in the autoreset Nuget package. Manually copying the dll generated the c# code.

@cmshawns
Copy link

For others having this problem, you'll want the net45 build of Newtonsoft.Json.dll.

@azurecompliance4
Copy link
Contributor

The package is updated on NuGet.
Chocolatey is pending moderator approval.

From: Shawn S. [mailto:notifications@github.com]
Sent: Friday, March 27, 2015 4:25 PM
To: Azure/AutoRest
Subject: Re: [AutoRest] Choco Install - Newtonsoft Dependency missing (#51)

For others having this problem, you'll want the net45 version of Newtonsoft.Json.dll.


Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-87119090.

@matt-gibbs
Copy link
Contributor

Chocolatey moderator approval is still pending. There is a notice on the home page that they are behind. Hoping the update is approved soon.

@shanselman
Copy link

I'm still waiting for this also. @matt-gibbs

@matijagrcic
Copy link

@matt-gibbs
Copy link
Contributor

The moderation backlog was quite long. Package has been approved.

@lawrencegripper
Copy link
Author

@matt-gibbs I've written a blog post on automating the release process to chocolatey with appveyor, not going to sort the moderator backlog but could be useful for future releases https://gripdev.wordpress.com/2015/04/08/appveyor-github-and-chocolatey-automatically-build-your-project-and-publish-updates-it-to-chocolatey/

jianghaolu added a commit to jianghaolu/AutoRest that referenced this issue Sep 6, 2016
670b55e Merge pull request Azure#51 from jianghaolu/09062016
a55439f fixed page listing for no item lists.
e132607 Remove redundant sync & callback based applys
de94443 Merge pull request Azure#49 from Azure/sdk_1026
218ef3a Merge pull request Azure#47 from Azure/sdk_1023
13f7e4b Merge pull request Azure#46 from Azure/sdk_1021
6b54fd6 Merge pull request Azure#44 from Azure/sdk_1015
ac5100f Fixing the javadoc error and formatting errors for key vault
7c46138 Merge pull request Azure#45 from jianghaolu/autorest_1343

git-subtree-dir: src/client/Java
git-subtree-split: 670b55e5b4779b751f1726140c1a32c14f2aef93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants