Coder Social home page Coder Social logo

Comments (16)

crackerberries avatar crackerberries commented on September 27, 2024 1

i'll spin up a linux and windows vm and try on them

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

It might be a side affect of VS updates. One of my PCs started exhibiting the same problem. Will need to investigate.
Thank you for reporting

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

Well, just realized that it was another VSCode update pending.
After the update has finished and VSCode restarted the problem has gone.

Can you please check that you have installed the latest version of VSCode and the extension.

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

Something is still not OK. Will have a look.

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

What version of .NET SDK are you running. Can you please check your dotnet --list-sdks

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

Getting the very latest update has solved the problem on another machine as well:
image

from cs-script.vscode.

crackerberries avatar crackerberries commented on September 27, 2024

Thanks for the interest! I will try applying the changes now.

I have .NET 3.1 and 5. the terminal outputs 3.1.409 [/usr/local/share/dotnet/sdk] 5.0.203 [/usr/local/share/dotnet/sdk]

For clarification, I am on a MacBook Air 2015 running macOS Big Sur.

Hope that helps, and hope your solution works,

crackerberries

from cs-script.vscode.

crackerberries avatar crackerberries commented on September 27, 2024

Doesn't seem to have worked... do I have to add anything else to my project/code before running it? I've noticed it doesn't throw an error the first time I use it after i boot Visual Studio Code, but it also doesn't output anything.

I haven't read the documentation, and if this error is a result of my own incompetence, so sorry for wasting your time.

crackerberries

from cs-script.vscode.

crackerberries avatar crackerberries commented on September 27, 2024

I cannot make a new CS-Script project, because it just throws the error again.

I'll try different things and try to find something that works.

crackerberries

from cs-script.vscode.

crackerberries avatar crackerberries commented on September 27, 2024

Forgot this:

image

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

The extension is doing lazy loading so it is not activated until you try to use it. That's why the problem is not immediate.

I feel that most likely the script engine binaries somehow failed to be deployed.
You can check if they are present (e.g. cscs.dll):

_user_dir = path.join(process.env.HOME!, 'Library', 'Application Support', 'Code', 'User', 'cs-script.user');

if they are try to execute directly from the shell:

dotnet ./cscs.dll

And if it works then try "about" command from VSCode:

image

It is the simplest scenario that runs the engine and spits the output to the VSCode output window.

You being on mac makes it really difficult for me to investigate as I do not have mac handy.
Debugging by yourself can be an option but it is not an easy one to take. It will be your time spent on it without any warranty of success.
Sorry mate.

from cs-script.vscode.

drowhunter avatar drowhunter commented on September 27, 2024

Windows 10 User here. I get this error as well on fresh install of CS-Script from chocolatey
and version v2.1.0 of the vscode extension

C# Script execution engine (.NET Core). Version 2.0.0.0.
Copyright (C) 2004-2020 Oleg Shilo. www.csscript.net (github.com/oleg-shilo/cs-script.core)

   CLR:             5.0.17
   System:          Microsoft Windows NT 10.0.19044.0
   Architecture:    x64
   Install dir:     <not integrated>
   Script engine:   c:\programdata\chocolatey\lib\cs-script.core\tools\cscs.dll
   Config file:     <none>
   Compiler engine: dotnet (C:\Program Files\dotnet\dotnet.exe)
   NuGet manager:   dotnet
   NuGet cache:     C:\Users\tj\.nuget\packages
   Custom commands: C:\ProgramData\cs-script\commands
   Global includes: C:\ProgramData\cs-script\inc

and freshly installed CS-Script plugin

output of --list-sdks

3.1.421 [C:\Program Files\dotnet\sdk]
6.0.301 [C:\Program Files\dotnet\sdk]
6.0.302 [C:\Program Files\dotnet\sdk]

Followed instructions, F1, CS-Script: New C# Script

First execution of script (Green Triangle) nothing happens
Second Click of button CS-Script is busy

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

It looks like you need to update your CS-Script version.
This is the expected output:

CS-Script.VSCode - v2.1.0
-------------------------------------------------------
C# Script execution engine (.NET Core). Version 4.4.7.0.
Copyright (C) 2004-2020 Oleg Shilo. www.csscript.net (github.com/oleg-shilo/cs-script)

   CLR:             6.0.7
   System:          Microsoft Windows NT 10.0.19042.0
   Architecture:    x64
   Install dir:     C:\ProgramData\chocolatey\lib\cs-script\tools
   Script engine:   C:\ProgramData\chocolatey\lib\cs-script\tools\cscs.dll
   Config file:     C:\ProgramData\chocolatey\lib\cs-script\tools\css_config.xml
   Compiler engine: csc (C:\Program Files\dotnet\sdk\6.0.302\Roslyn\bincore\csc.dll)
                  : dotnet (C:\Program Files\dotnet\dotnet.exe)
   NuGet manager:   dotnet
   NuGet cache:     C:\Users\oleg.shilo\.nuget\packages
   Custom commands: C:\ProgramData\cs-script\commands
   Global includes: C:\ProgramData\cs-script\inc
-------------------------------------------------------
Syntaxer
   C:\ProgramData\chocolatey\lib\cs-syntaxer\tools\syntaxer.dll
Extension
   c:\Users\oleg.shilo\.vscode\extensions\oleg-shilo.cs-script-2.1.0\out

I suggest you update your CS-Script as it is not exactly matching the runtime installed. Then we will proceed from there.

You said that it was a fresh install from choco but the version there is 4.4.7 (https://community.chocolatey.org/packages/cs-script)

It is possible you have an old obsolete CS-Script.Core installed (https://community.chocolatey.org/packages/cs-script.core).
If it is the case you will need to remove it and install choco install cs-script.

After MS dropped support for .BNET Framework and renamed .NET Core in just .NET, CS-Script followed the suite and renamed CS-Script.Core in just CS-Script.

from cs-script.vscode.

drowhunter avatar drowhunter commented on September 27, 2024

Oh, I see , I figured that since I wanted to use Net Core, I installed the CSScript.Core version instead of CSScript.

I've been using CSScript since before Net.Core was a thing but this is the first time reinstalling it in a while.

So is Net.Framework no longer supported? Is CSScript basically .Net now?

I will try uninstalling that older version and hopefully the problem will go away

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

Yes. CS-Script just followed the .NET roadmap:

from cs-script.vscode.

oleg-shilo avatar oleg-shilo commented on September 27, 2024

Starting from version v2.2.0 any accidental "hanging" of the script being executed can be fixed by CS-Script: reset busy status command

from cs-script.vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.