Recommended way to handle WriteCodeFragment task for Custom Language #7984
Replies: 2 comments 4 replies
-
I don't know the details of CodeDOM, but expect that writing your own task would probably be the fastest, most reliable approach. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Did nobody think of Custom Languages when creating this? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The default WriteCodeFragment task inside Microsoft.Build.Tasks.Core tries to retrieve the CodeDomProvider through the System.CodeDom.Compiler.CodeDomProvider.CreateProvider method.
That method, inside System.CodeDom only supports the Microsoft Languages C# and VB.
We have registered our custom language inside Machine.Config, in the right location.
This location works for the WPF code generation, but somehow it does not work for the WriteCodeFragment task.
I checked the System.Codedom class
What is the recommended way to get WriteCodeFragment to generate the source code for a custom language:
Beta Was this translation helpful? Give feedback.
All reactions