cs-script icon indicating copy to clipboard operation
cs-script copied to clipboard

VSCode intellisense

Open snikeguo opened this issue 8 months ago • 1 comments

I developed a program named A.exe. The code is as follows:


//A.exe:
namepsace A
{
    public class Program
    {
        public static void helloword()
        {
            .....
        }
        public void Main()
        {
                var content = File.ReadAllText("D:/TestIntellisense.cs");
                Assembly assembly = CSScript.RoslynEvaluator.CompileCode(content, new CompileInfo { CodeKind = SourceCodeKind.Script });
                CallScriptInvokeHostMethod...
        }
    }
}

TestIntellisense.cs

using A;
public class Test
{
    public void InvokeHostMethod()
    {
        Program.helloword();
    }
}

I run A.exe, and it works very well. OK ~ but I have installed the C# (CS-Script) extension in VSCode, but when editing TestIntellisense.cs, "Program.helloword();" does not show code suggestions. How can I fix this issue?

I think I should put A.exe into a certain directory of Cs-Script, so that the language server can parse A.exe and enable IntelliSense functionality.

snikeguo avatar Jun 14 '24 03:06 snikeguo