Made a C # builder. There is a need for a resource in the source code that needs to be complemented. Without it, if I create an application - it does not work. How to add a resource to the builder? So he built the output file with this resource? Tried to add parameters to ComplierOption - did not help

Params.CompilerOptions += "\n/t:winexe \n/win32res:my.sql"; 
  • Сделал билдер на C#. What, sorry, did? What are you calling a builder? - Bulson

1 answer 1

The author, it will be great if you formulate thoughts more clearly and describe the context of the task. I can only guess that we are talking about CodeDom. In this case, an example with MSDN to help you.

 if (Directory.Exists("Resources")) { if (provider.Supports(GeneratorSupport.Resources)) { // Set the embedded resource file of the assembly. // This is useful for culture-neutral resources, // or default (fallback) resources. cp.EmbeddedResources.Add("Resources\\Default.resources"); // Set the linked resource reference files of the assembly. // These resources are included in separate assembly files, // typically localized for a specific language and culture. cp.LinkedResources.Add("Resources\\nb-no.resources"); } } 

By the way, the civilized world is slowly moving away from CodeDom towards Roslyn. If you do not have a ton of the hereditary code, you should keep up with the times.