add file system file reference (.cs) to SyntaxEditor

SyntaxEditor for Windows Forms Forum

Posted 2 years ago by Mark


I'm trying to add an external reference (.cs file) to my "SyntaxEditor" (c#) project.

How can I do?

Thanks in advance

private ActiproSoftware.Text.Languages.DotNet.Reflection.IProjectAssembly projectAssembly;
projectAssembly = new ActiproSoftware.Text.Languages.CSharp.Implementation.CSharpProjectAssembly("SdiCodeEditor");

//OK, work

//KO, not work
//file.cs types are not loaded by the intellisense

Comments (1)

Answer - Posted 2 years ago by Mark


This code shows how to queue up parsing to create source files for a project assembly defined in project:

project.SourceFiles.QueueCode(cSharpSyntaxLanguage, "MyFile1.cs", "class Foo { public void Bar() {} }");
project.SourceFiles.QueueFile(cSharpSyntaxLanguage, @"C:\MyFile2.cs");
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.