Reputation: 161
When I try to run a .exe that I built in Visual Studio 2013 with C# it will run just fine on the machine I compiled it in. When I try to run the program on different machines I get exception errors.
So I tried to publish the program and I get this error:
Default certificate could not be created. Publish aborting
If I run the executable from a machine that has Visual Studio on it it works fine.
When I try to create a certificate I get the error
The Profile for the user is a temporary profile. (exception from HRESULT:0x80090024)
I would like this executable to run at start-up on all Windows 7 student computers in our school.
Upvotes: 15
Views: 26885
Reputation: 2688
You need to tell the publisher where to get the certificate from:
Upvotes: 24
Reputation: 151
Run Visual Studio with administrative rights (Run as administrator).
Upvotes: 14
Reputation: 7875
The below solution works for me using Visual Studio 2017 Community Edition in Windows 10.
Make sure that your account has write access to folder 'C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys'.
Also make sure your account has write access to the folder where you are creating the key.
Upvotes: 1