I\'d like a user to download an exe from my website, where (synchronously upon download) an XML file is injected into this application. This XML file contains a public key, and
To inject the file add it to your project. Then right-click on it in the solution explorer, go to properties, and change its type to EmbeddedResource.
To load it at run-time use Assembly.GetManifestResourceStream(). Read more here: http://msdn.microsoft.com/en-us/library/xc4235zt.aspx.
Assembly.GetManifestResourceStream()