Open TheColonel2688 opened 3 years ago
No you are not but you do have one missing element. You need to install CS-Script. This extension is an integration between CS-Script and VS. Thus you only have on from the pair.
choco install cs-script
As for .NET 5 support, you will need to wait a little.
I have only just released (~week ago) the .NET 5 based edition of CS-Script.
choco install cs-script.core --pre
It is a feature complete pre-release that is to be re-released without any changes as public release in a few days. So you can start using it right away.
But the integration with all supported IDEs is still on the way. Currently only VSCode has been migrated.
Oh I did install https://github.com/oleg-shilo/cs-script.core/releases/tag/v1.4.5.0-NET5-RC5
However, it sounds like the VS extension doesn't support the .Net 5 version of CS-Script yet, correct? So that is why it can't find it?
correct.
What you can do is to bypass the VS extension and start VS directly with the script by using the script engine itself:
css -new hello.cs
css -vs hello.cs
Note when you execute step 2 first time ever you will be notified that you need to set CSSCRIPT_VSEXE envar. So before proceeding with the suggestion create environment variable CSSCRIPT_VSEXE and assign it the value of path to the VS executable devenv.exe.
You can always check the it with:
PS C:\Users\user> css -vs ?
-vs
Generates .NET project file and opens it in Visual Studio.
The path to the Visual Studio executable (devenv.exe) needs to be defined in the environment variable
`CSSCRIPT_VSEXE`.
I am getting a "No Compatiable CS-Script version Found" message when I open CS-Script tools.
I installed the RC5 for .Net 5 via Chocolaty.
I am using VS Studio Comunity 2019 V16.8.4.
I've never actually tried to use the extension before, I've always done hosted stuff in my apps. So maybe I am doing something wrong.