I am able to create a self signed certificate and generate a .pfx file from code using makecert and pvk2pfx. I can edit the project file programmatically (using regex, although an xmlreader implementation might also work and perhaps be safer) to edit the project file. However, after I add the .pfx file and set signing to true, the project no longer builds because I need to open VS to enter the password for the private key.
I would like to know if it is possible to add a .pfx file to a project programmatically after creating the .pfx file, without needing to open VS to enter the password.