Is it possible to integrate this language to MSBuild? #180
Replies: 1 comment
-
I think you would need to write an VS Extension that use your analyzer to the highlighting, something like the console highlight done here, but integrated with the VisualStudio Sdk.
If is from a C# Project, maybe using source generators? reading your custom file from them and then parsing your SyntaxTree to one that Roslyn can understand (or returning the Mono.Cecil one if it is compatible [do not know if it is]) and compile? (Disclaimer: never worked with it before). If is from your custom language project, redirecting all the .cs files to a custom handler that use Roslyn and do the parsing again. If you did not implement the use of namespace on your language, then ensure that al .cs are compiled to the Main Namespace.
If you compile your code and add it as a reference to your C#, it should work as it is a .NET dll. on reverse should work too i think? but you would need to implement the use of object, namespace, imports, and all that. |
Beta Was this translation helpful? Give feedback.
-
Presently you have to write code in a WPF window designed by yourself, is it possible to write code in Visual Studio and let VS do highlighting for you?
Besides, is it possible to compile your code and C# code together? For example, you write a class in this language, and another internal class in C#, is it possible to compile these two classes to one assembly so that they can call each other?
Beta Was this translation helpful? Give feedback.
All reactions