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

Project working in VS doesn't work with cli (not fully restoring? + other issues) #4550

Closed
krwq opened this issue Dec 10, 2015 · 3 comments
Closed
Labels
Milestone

Comments

@krwq
Copy link
Member

krwq commented Dec 10, 2015

See https://github.com/krwq/cli/tree/dotnet_api/test/Microsoft.DotNet.Tools.Api
open in VS -> build and run - works

dotnet cli:
dotnet restore + dotnet run anyarg:

X:\oss\cli-2\test\Microsoft.DotNet.Tools.Api>dotnet run anyarg
Running X:\oss\cli-2\artifacts\win7-x64\stage2\bin\dotnet-run.exe anyarg
> X:\oss\cli-2\artifacts\win7-x64\stage2\bin\dotnet-run.exe anyarg
Process ID: 9524
Could not connect with the server.
System.AggregateException: One or more errors occurred. ---> System.TypeInitializationException: The type initializer for 'System.Net.SystemNetworkCredential' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.SecureString, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at System.Net.NetworkCredential.set_Password(String value)
   at System.Net.SystemNetworkCredential..ctor()
   at System.Net.SystemNetworkCredential..cctor()
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.DotNet.Tools.Api.Program.Main(String[] args) in X:\oss\cli-2\test\Microsoft.DotNet.Tools.Api\Program.cs:line 36
---> (Inner Exception #0) System.TypeInitializationException: The type initializer for 'System.Net.SystemNetworkCredential' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.SecureString, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at System.Net.NetworkCredential.set_Password(String value)
   at System.Net.SystemNetworkCredential..ctor()
   at System.Net.SystemNetworkCredential..cctor()
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)<---

< X:\oss\cli-2\artifacts\win7-x64\stage2\bin\dotnet-run.exe anyarg exited with 1 in 2153 ms.

There is actually more issues. If you add that packages by hand to force restore then dotnet run actually crashes while throwing different exception...

@krwq krwq changed the title Project working in VS doesn't work with cli (not fully restoring?) Project working in VS doesn't work with cli (not fully restoring? + other issues) Dec 10, 2015
@krwq
Copy link
Member Author

krwq commented Dec 10, 2015

Couple of issues with that:

  • Newtonsoft.Json nupkg is missing dependencies
  • no errors that any packages are missing
  • unhandled exception (caused by missing dlls) during the runtime show completely random error message
  • dotnet-run crashes when trying to display the error message

@brthor
Copy link
Contributor

brthor commented Dec 11, 2015

Commented here:

JamesNK/Newtonsoft.Json#618

@blackdwarf
Copy link

Closing as external in the @brthor's linked issue. @krwq can you please create a new issue for the remaining three issues that are not related to Json.net?

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the Beta-Jan milestone Jan 31, 2020
rainersigwald pushed a commit that referenced this issue Jul 20, 2020
….9 (#4550)

Microsoft.NET.Sdk
 From Version 3.1.400-preview.20263.1 -> To Version 3.1.400-preview.20263.9

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants