N
N
naumenkoff2021-01-10 08:27:51
C++ / C#
naumenkoff, 2021-01-10 08:27:51

How to open an application compiled by VisualStudio on another PC without VS?

Hello everyone, I have a general question. I’ve been writing code for maybe half a year, but I never had the issue of transferring .exe, but now it has appeared. I have a program that needs to be made to work on other PCs. And it's not about phantom folders, as others write, it's not about that at all. Approximately how it works to make it easier - The Load method, which includes 4 methods -
1. get the folder with the client
using the registry 2. get the active account using the registry
3. get the active account using the received client folder from the registry
4. download the image of the same active account
all this is done, the next stage after these methods is drawing the gui, which does not happen. the application closes at the moment of complete execution of 4 methods, and then it does not open. Tried ILMerge, Fody, "Publish" in VS, change Debug to Release, but nothing helps and the app won't open on another PC. I have 2 NuGet packages - FontAwesomeSharp and Newtonsoft.Json and 1 more DLL, and for me it opens even without a DLL anywhere, and on another PC, in any case, 4 methods are executed and that's it, the end, the program closes. I'm scratching my head, nothing helps

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2021-01-10
@firedragon

Up to a heap of an error should be written to the system log.
There will be an exception and a stack trace.

G
Gennady Kruglov, 2021-01-10
@robinzonejob

Write an additional global exception handling (try / catch) and write, for example, to a text file in the same directory as the exe file - the error text. If, after the application is executed, something is written there, there will be something to build on.
Offhand, it's hard to say what the problem is. Maybe your paths in the registry on the target PC do not match what you expect. Maybe .Net is not installed on the target PC at all. Although, if you are sure that the application starts and 4 methods work out, the latter is excluded. But only if you are sure of it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question