Visual Studio Setup Project shortcut has missing functionality compared to manually creating shortcut

75 Views Asked by At

I am working on making a very simple console app for tech-illiterate people to simply drag their files onto it, and it does the rest for them. When I made the program and tested this with the exe file itself, this worked fine. The program took the array of file paths as arguments, and used those paths to perform the required operations on the files as expected. I also made a shortcut of the exe file and moved it to desktop, and after testing it again (Drag the files onto the shortcut) it works the exact same as the initial test.

To simplify the process even further for the people I am making this for, I took one step further and made a setup project in Visual Studio. After some difficulties, I got it up and running, and it even created the shortcut without the issues I'd previously had with that part of the setup process. However, even though the exe file that was created by the installer works exactly as expected, the shortcut does not allow the same drag-drop functionality as the exe or the manually made shortcut. Without this functionality, I will most likely have to teach them how to manually 'install' the software themselves (A terrifying thought)

At first I looked around in the VS Setup Project properties and several other settings / properties to see if there was something I missed, but nothing seemed like it would cause this to happen. I looked around online, but the closest I've come to finding a solution is something around the shortcut launch parameters, but if there is something I'm missing in that field I've yet to find an answer online.

Visual Studio 2022 Community Edition

Version: 17.4.4

1

There are 1 best solutions below

0
Bogdan Mitrache On

Have you tried changing/resetting the working folder (the current working directory or whatever is called in VS 2022)?

I've seen applications that fail to run as expected if you launch them with a different current working dir.