oleg-shilo / cs-script.vscode

VSCode extension for CS-Script
MIT License
37 stars 7 forks source link

Cs-Script Initialization Problem Vs-Code 1.44.0 #22

Closed oleg-shilo closed 4 years ago

oleg-shilo commented 4 years ago

Moved from of https://github.com/oleg-shilo/cs-script/issues/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)

oleg-shilo commented 4 years ago

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.

oleg-shilo commented 4 years ago

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....

oleg-shilo commented 4 years ago

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.

t-andre commented 4 years ago

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

oleg-shilo commented 4 years ago

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

t-andre commented 4 years ago

It's working with the patch. Thanks

oleg-shilo commented 4 years ago

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.

oleg-shilo commented 4 years ago

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

t-andre commented 4 years ago

It's working now.

Thanks

t-andre commented 4 years ago

One more problem the load project is not working.

oleg-shilo commented 4 years ago

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.

mmickael commented 4 years ago

Confirmed. Fixed. Thank you all.

-- Regards,

Medhat Mickael From: Oleg Shilo notifications@github.com Sent: Friday, April 10, 2020 10:34 AM To: oleg-shilo/cs-script.vscode cs-script.vscode@noreply.github.com Cc: Medhat Mickael mmickael@innovativedhs.com; Mention mention@noreply.github.com Subject: Re: [oleg-shilo/cs-script.vscode] Cs-Script Initialization Problem Vs-Code 1.44.0 (#22)

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/oleg-shilo/cs-script.vscode/issues/22#issuecomment-612082659, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADETJCOWGD3GUPUWXCIPNZ3RL44AJANCNFSM4MFDCAIA.

Confidentiality Notice. The information in this transmission may contain proprietary and confidential information of Innovative Downhole Solutions and may be subject to protection under the law. The message is intended for the sole use of the individual or entity to which it is addressed. If you are not the intended recipient, you are notified that any use, distribution or copying of the message is strictly prohibited. If you received this message in error, delete the material from your system without reading the content and notify the sender immediately of the inadvertent transmission.

oleg-shilo commented 4 years ago

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.