cs-script
cs-script copied to clipboard
VSCode intellisense
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.