I'开发者_运维问答ve created a windows application in c# now i added a new setup project to this application and i build it. It is executing successfully. When i try to add project output to user desktop. There are two files adding in the desktop one is exe file and another one is xml file (configuration file). Why it is happening. How can i add only exe file to my desktop while running the setup file.
Thank you, Nagu
You have to add a shortcut to project output, not the project output itself. You can do this by selecting the "User's desktop" folder, right click and select "Create new shortcut" and in the select item dialog go to "Application folder" and select "Primary output from your project".
Is there a reason you're are trying to put the exe on the desktop? Standard practice is to place it in a folder in Program Files (or somewhere the user designates) and place a shortcut on the desktop.
Assuming that you already have the exe file added to your setup:
- Right click your setup project, click view->file system;
- Right Click on User's Desktop->Create Shortcut to user's desktop
I think that would be it.
精彩评论