.NET - Create desktop shortcut on installation?
Is the option to create a desktop shortcut during installation only available if the application targets 开发者_C百科the .NET Framework 3.5? On one of my projects, the option is grayed out and is targeting the .NET Framework 2.0. In case your wondering, I am using Visual Studio 2008 Express Edition.
Using the Visual Studio 2008 (non-express) Setup and Deployment project template, I'm able to include a .NET 2.0 .exe (a windows forms app, confirmed to have been built targeting .NET 2.0) and have it detect the .NET dependency. I'm then able to create a shortcut on the desktop to the .exe without issue (by creating a shortcut in the "User's Desktop" folder within the "File System" window).
Edit:
What I described above is a deployment process quite different from the one that you're having problems with, I apologize. To clarify the question slightly, I believe this is a C# Express Edition project being discussed, and the deployment method is via the Project Properties->Publish tab. I can confirm this same shortcut-option-grayed-out 'feature' exists in Visual Studio Professional 2008, and I can't establish why this is exactly; I'd imagine it has something to do with the sophistication of how it wants to deploy things (with such do-dads as checking for updates automatically).
My original post is then a kind of workaround for you, but alas the Setup and Deployment project I mentioned is not packaged with VS C# Express Edition.
IronRuby targets 2.0SP1 and can have the option. It's probably a limitation of the installer technology or Express. Wix is what we use, might want to look at that.
精彩评论