Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I properly handle resources when emitting from a Roslyn workspace?

I'm working on a project where we are compiling, emitting and running code using Roslyn. I've run into an issue where Roslyn does not embed resource files in the DLLs I emit using Compilation.Emit().

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

Unfortunately, I can't find any information on resources in Project, so I'm not sure how to get the information I need.

Does Roslyn allow users to uncover any information about resource files? Or will I need to fall back to EnvDTE or using MSBuild manually? (If I need to use MSBuild, how do I support DNX projects?)

like image 684
JoshVarty Avatar asked Jan 03 '16 23:01

JoshVarty


1 Answers

It looks like this information bypasses the project system, and is instead passed directly from the MSBuild loader to the command line arguments.

Source

like image 51
SLaks Avatar answered Nov 08 '22 04:11

SLaks