How might I go ab开发者_高级运维out creating an application that does not need that "Publisher Cannot be verified" window?
How can I get my Windows Forms application in a EXE file so that I can just click it and it runs, not asking me to do anything? Maybe this can be done by disabling ClickOnce, but how can you do that in Visual Studio 2010 Express?
I think the reason that no one understood your question is that the only time ClickOnce is used for deployment is when you use the "Publish" wizard.
What you're looking to do is: Go to the Build menu -> Configuration Manager -> and change the "Active solution configuration" to release. This will make Visual Studio optimise your code. Then F6 (Build Solution) and your basic exectutable (.exe) files will be in your {projectDirectory}/bin/Release folder, and you'll be able to run this from any computer that has the .NET framework you compiled in.
Using ClickOnce involves opening a link in a browser that ends in ".application", but it sounds like you're just launching a normal EXE from your local machine, so I don't think ClickOnce is involved.
Did you copy the file to your machine across a network? Right-click on the EXE, open Properties, and see if there's an "Unblock" button at the bottom of the window. If so, click it.
The "publisher cannot be verified" message relates to code signing. Like I said above, you should be able to tell Windows not to be so strict with that file, but if you really need to get signed, you could start with MSDN's Introduction to Code Signing.
The message occurs because the certificate used to sign the ClickOnce XML site can not be verified. These MSDN articles describes the problem:
- How to: Get Rid of the Publisher Cannot Be Verified Alert When Taking External Lists Offline
- Trusted Application Deployment Overview
Are you using ClickOnce deployment? You can not get rid of the "Unknown publisher" window unless you have a valid certificate with a trusted publisher, and you install it on the user's machine.
精彩评论