I have read in some of the ClickOnce posts that ClickOnce does not allow you to create a desktop icon for you application. Is there any way around this?
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
- Should I use static function in c# where many call
In Visual Studio 2017 and 2019 you can do the following:
Go to Project Properties -> Publish -> Manifests and select the option Create desktop shortcut
It seems like there is a way to place an icon on the desktop in ClickOnce.
The desktop icon can be a shortcut to the
.application
file. Install this as one of the first things your application does.In Visual Studio 2005, ClickOnce does not have the ability to create a desktop icon, but it is now available in Visual Studio 2008 SP1. In Visual Studio 2005, you can use the following code to create a desktop icon for you when the application starts.
I have used this code over several projects for a couple of months now without any problem. I must say that all my applications have been deployed over an intranet in a controlled environment. Also, the icon is not removed when the application is uninstalled. This code creates a shortcut to the shortcut on the start menu that ClickOnce creates.