oleg-shilo/cs-script.vscode

Cs-Script Initialization Problem Vs-Code 1.44.0

oleg-shilo opened this issue · 13 comments

Moved from of oleg-shilo/cs-script#191 (@mmickael)


Hi Oleg, after upgrading VS Code to 1.44.0, Cs-Script seems to have a problem with initialization and the extension stops working. Please see the lower left corner of the attached screenshot.

image

Cs-Script version 1.6.0-2 (8 Apr, 2020)

Hi Mickael,

I cannot reproduce it on my side so let's wait until @t-andre gives us feedback in his #21. Just to see if it is something specific to your environment or rather common.

OK, on a dev PC it does not exhibit the problem neither with VSCode installed nor portable. But on another fresh PC it does.

Working on it....

OK in my case the problem was caused by the required .NET Core v3.1 not being available. I had v3.0 installed. So the syntaxer (syntax provider) cannot be started.

Can you please start the syntaxer manually and let me know if it throws missing assembly error. Pleas execute:

dotnet C:\Users\<username>\AppData\Roaming\Code\User\cs-script.user\dotnet\syntaxer\syntaxer.core.dll -timeout:60000 -cscs_path:C:\Users\<username>\AppData\Roaming\Code\User\cs-script.user\dotnet\cscs.dll

If you have the error as below:

Error:
  An assembly specified in the application dependencies manifest (syntaxer.core.deps.json) was not found:
    package: 'Microsoft.Win32.SystemEvents', version: '4.7.0'
    path: 'runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll'

Then it means that you need to install .NET Core 3.1 to solve the problem.

I will see if either check can be performed form the extension startup or the naughty assembly can be remapped to the older version.

I have .NET Core 3.1 installed but not .NET Core 3.0 and have the same error.

Then probably there is an unintended internal dependency on some v.3.0 resources.

While I am investigating this packaging problem you can fix it but patching the deps file.

Just replace C:\Users\<user_name>\AppData\Roaming\Code\User\cs-script.user\dotnet\syntaxer\syntaxer.core.deps.json withe the attached copy and restart VSCode. This should help until I sort it out.

Let me know it it helped.

syntaxer.core.deps.json.zip

It's working with the patch.
Thanks

Excellent. Thank you for such a quick feedback.

Your help was crucial as on my dev environment I have all .NETCore versions installed so it doe snot show the error.

Will see what went wrong during the packaging of the extension that the dependency was not included.

Please update to v1.6.3
It contains a proper fix: includes <root>/dotnet/syntaxer/runtimes/** folder, which was missed during the packaging.

It's working now.

Thanks

One more problem the load project is not working.

Yeah this one is tricky.

There is something changed in VSCode recently that breaks "load project".

What "load project" does is very simple:

  1. Create a temp proj folder with proj file with all links to the script file and its dependencies
  2. Restarts VSCode with the command to open the proj folder.

Step #2 opens the folder but VSCode fails to load it properly. If I just close and open the same folder manually it works OK.

I will have another look. But if my initial assessment is right and it is indeed it is pure VSCode problem then it's more difficult to address.

Can you please check this release manually, before I publish it: https://github.com/oleg-shilo/cs-script.vscode/releases/tag/v1.6.4

It seems that Uri.parse("<path>") that is required for executing vscode.openFolder does not longer work with absolute path strings. It needs schema-based expression.

So I found that Uri.file("<path>") works the old way even with the dir path. The build v1.6.4 has this fix.

But just before publishing it I want to test it outside of my dev environment.

Thank you.