How to handle resources when emitting from a Roslyn workspace?

I am working on a project where we compile, emit and run code using Roslyn. I ran into a problem when Roslyn does not insert resource files into the DLLs that I emit using Compilation.Emit().

I see that there is an argument of type IEnumerable<ResourceDescription>that I think I need to use.

Unfortunately, I can’t find the resource information in Project, so I’m not sure how to get the information I need.

Does Roslyn allow users to open any resource file information? Or do I need to go back to EnvDTE or manually use MSBuild? (If I need to use MSBuild, how do I support DNX projects?)

+4
source share
1 answer

It seems that this information bypasses the project system and is instead passed directly from the MSBuild bootloader to the command line arguments.

Source

+1
source

Source: https://habr.com/ru/post/1622658/


All Articles