A .net application is rarely a single executable. But in a case as this, you need to have a single executable.
Let's see what options you have:
1)
Have a ready-compiled assambly you alter before delivering it to the client. There are really
complex methods[
^] you could implement to alter the allready compiled IL code to add the specific data you intend to use.
2)
Alter code and compile project at run-time.. Well, your project structure has to be really simple to be effective. Have a look also
here[
^]. You could use also
Roslyn[
^] or
legacy dynamic code generation[
^] to construct your application on run-time. Still, this is also hard work.
3)
Merge pre-built and custom assamblies. Build you assamblies as you did, but have a single assambly containing those specific information in a static class for example. You alter the code of this single assambly on request, conpile it. As it is a short, it will compile quickly, and easily. After that use
ILmerge[
^] to merge all assambiles into one executable.
I would try this last one first...
As for the second idea: you can't access cookies from outside the browser. Well, you could try from file system, but every browser stores cookies in a different way.