microsoft / vscode-docs-authoring

VSCode extension that provides markdown authoring assistance to docs.microsoft.com contributors
MIT License
138 stars 90 forks source link

[Markdocs Server Error]: Error: not found: package: 'Newtonsoft.Json' #112

Closed sdwheeler closed 5 years ago

sdwheeler commented 5 years ago

I am getting the following error when I load VS Code.

[Markdocs Server Error]: Error: An assembly specified in the application dependencies manifest (MarkdocsService.deps.json) was not found: package: 'Newtonsoft.Json', version: '10.0.3' path: 'lib/netstandard1.3/Newtonsoft.Json.dll'

I am running the following version of VS Code:

Version: 1.28.2 (system setup)
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:23:51.859Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

I have the following versions for the Docs Authoring Pack:

qinezh commented 5 years ago

Can you try dotnet --info in Console, and paste the output?

sdwheeler commented 5 years ago

@qinezh

.NET Core SDK (reflecting any global.json):
 Version:   2.1.400
 Commit:    8642e60a0f

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.400\

Host (useful for support):
  Version: 2.1.2
  Commit:  811c3ce6c0

.NET Core SDKs installed:
  1.0.0-preview2-003121 [C:\Program Files\dotnet\sdk]
  1.0.0-preview2-003131 [C:\Program Files\dotnet\sdk]
  1.0.0-preview4-004233 [C:\Program Files\dotnet\sdk]
  1.0.1 [C:\Program Files\dotnet\sdk]
  2.0.2 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.400-preview-009171 [C:\Program Files\dotnet\sdk]
  2.1.400 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
qinezh commented 5 years ago

Thanks @sdwheeler for the details.

Can you open folder %USERPROFILE%\.vscode\extensions\docsmsft.docs-preview-0.3.16\.markdocs, and check if Newtonsoft.Json.dll exists in current folder? If it exists, can you try run command dotnet MarkdocsService.dll under current folder and check if same issue occurs?

If same issue still occurs, can you help to install .NET Core SDK v2.0.0 from here and try it again? It would be helpful to identify the root cause.

sdwheeler commented 5 years ago
    Directory: C:\Users\sewhee\.vscode\extensions\docsmsft.docs-preview-0.3.16\.markdocs

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       10/24/2018   8:14 AM         335360 Markdig.dll
-a----       10/24/2018   8:14 AM          41921 MarkdocsService.deps.json
-a----       10/24/2018   8:14 AM          13824 MarkdocsService.dll
-a----       10/24/2018   8:14 AM           4016 MarkdocsService.pdb
-a----       10/24/2018   8:14 AM            154 MarkdocsService.runtimeconfig.json
-a----       10/24/2018   8:14 AM         160256 Microsoft.DocAsCode.Common.dll
-a----       10/24/2018   8:14 AM          26624 Microsoft.DocAsCode.MarkdigEngine.dll
-a----       10/24/2018   8:14 AM          78336 Microsoft.DocAsCode.MarkdigEngine.Extensions.dll
-a----       10/24/2018   8:14 AM           5632 Microsoft.DocAsCode.MarkdigEngine.Validators.dll
-a----       10/24/2018   8:14 AM          65536 Microsoft.DocAsCode.Plugins.dll
-a----       10/24/2018   8:14 AM          49664 Microsoft.DocAsCode.YamlSerialization.dll
qinezh commented 5 years ago

It turns out Newtonsoft.Json.dll is missing from the folder, maybe a network issue occurs while downloading the dependency.

Reinstall docs-preview should resolve this issue. Can you have a try?

sdwheeler commented 5 years ago

Ok, removing and reinstalling the entire Docs Authoring Pack fixed it.