-
Notifications
You must be signed in to change notification settings - Fork 253
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
The type initializer for 'NuGet.ConfigurationDefaults' threw an exception. #834
Comments
Hey Tony, can you please provide us with more details? Are you using visual studio extension or nuget.exe (Console Manager is in visual studio, and nuget.exe is on the command line). What version are you using? Where did you get it from? What do you mean by installing it. Are you able to provide a call stack, and a reproducible scenario? |
Hi Yishai, I am using both the Visual Studio Extension and the Nuget.exe. Neither one is working at the moment. The version is the Nuget.exe is 2.8.5. I downloaded both the VS Extension and Nuget.exe from http://docs.nuget.org/consume/installing-nuget. As for the call stack, this is what I get from Nuget.exe: The type initializer for 'NuGet.ConfigurationDefaults' threw an exception. Thank you for your time and expertise. Sincerely, Hey Tony, can you please provide us with more details? Are you using visual studio extension or nuget.exe (Console Manager is in visual studio, and nuget.exe is on the command line). What version are you using? Where did you get it from? What do you mean by installing it. Are you able to provide a call stack, and a reproducible scenario? — |
What version of visual studio are you usng? And can you attach a debugger and get more info on the exception? I can't tell what is the inner exception |
I am using Visual Studio 2013 Update 4. As for attaching a debugger, the error occurs the moment I execute the Nuget.exe app. What version of visual studio are you usng? And can you attach a debugger and get more info on the exception? I can't tell what is the inner exception — |
Hi Yishai, When I loaded the Nuget.exe as a project, I received the following message: As for debugging, the executable terminates even if I tried to use the Debug “Step into new process”. As for the activity log, this is what was logged: 80131509 GetExportedValue cannot be called before prerequisite import 'NuGet.VisualStudio.VsPackageSourceProvider..ctor (Parameter="settings", ContractName="NuGet.ISettings")' has been set. 1352 2015/06/29 16:36:40.477 Error End package load [IntegrationPackage] {D209E4D9-0F58-4BC3-A529-FDCF20967DC0} 80131509 Object reference not set to an instance of an object. Sincerely, Here is how to do it, run nuget.exe from visual studio, Use File->Open project and select Exe Project File from the bottom right drop down [image]https://cloud.githubusercontent.com/assets/1238711/8412259/8b8875fc-1e3d-11e5-8eef-76c4da9c2149.png Then set all the parameters you need on the properties page [image]https://cloud.githubusercontent.com/assets/1238711/8412318/ece66f7a-1e3d-11e5-86bc-8c51eb0ce498.png — |
The log doesn't seem related to nuget.exe, and the image didn't come through. Can you try again to share the image? Perhaps use github.com directly instead of by email? |
I’ve attached the image. The log was generated when attempting to use the Nuget package from VS2013. So far, it appears that this issue is due to the Nuget application inability to load a configuration file. My questions are:
From: Yishai Galatzer [mailto:notifications@github.com] The log doesn't seem related to nuget.exe, and the image didn't come through. Can you try again to share the image? Perhaps use github.com directly instead of by email? — |
Hi Yishai, Here’s a stack trace generated from Nuget.exe:
Does this help? Sincerely, I’ve attached the image. The log was generated when attempting to use the Nuget package from VS2013. So far, it appears that this issue is due to the Nuget application inability to load a configuration file. My questions are:
From: Yishai Galatzer [mailto:notifications@github.com] The log doesn't seem related to nuget.exe, and the image didn't come through. Can you try again to share the image? Perhaps use github.com directly instead of by email? — |
Hi Yishai, Here’s a stack trace generated from Nuget.exe:
kgs\packages.config" -Verbosity Detailed Sincerely, I’ve attached the image. The log was generated when attempting to use the Nuget package from VS2013. So far, it appears that this issue is due to the Nuget application inability to load a configuration file. My questions are:
From: Yishai Galatzer [mailto:notifications@github.com] The log doesn't seem related to nuget.exe, and the image didn't come through. Can you try again to share the image? Perhaps use github.com directly instead of by email? — |
Look for nuget.config files in your folder and up the tree, and also in XXX\AppData\Roaming\NuGet |
ping, any updates? |
This looks like a duplicate of an issue we have for throwing proper exception when configuration is corrupt. The error should throw the file name that is introducing the problem. |
Hi All,
I just installed the latest version of the Nuget Console Manager and it appears that no matter what command I use on the Nuget.exe command line app, I get the following exception: The type initializer for 'NuGet.ConfigurationDefaults' threw an exception.
Any ideas on how I can resolve this issue? Thanks.
Sincerely,
Tony
The text was updated successfully, but these errors were encountered: