Search code examples
c#msbuildcode-generationtaskcodedom

How can I get the current CodeDomProvider in an MSBuild Task


I have a task and I want to generate some code using the CodeDom. How can I get either the current "language" or the CodeDomProvider for the current project calling my task?


Solution

  • Ok I managed to figure it out eventually:

    Geting a CodeDomProvider in an MSBuild Task