The program created in visual studio cannot start.

Asked 2 years ago, Updated 2 years ago, 64 views

My friend asked me to program with C#.net on VS2010.
My PC works fine, but when I boot to my friend's PC in Windows 7,

A problem has occurred and the program is no longer working properly.The program is closed and Windows notifies you if you have a solution.The message appears.
Enter a description of the image here

Does anyone have any idea where and how to make it work properly?
I uploaded a zip file containing a compressed exe file to the rental server for delivery to my friend and gave it to him by downloading it, but I also think that such a method of delivery may have caught some security.

I look forward to your kind cooperation.

windows .net visual-studio

2022-09-30 20:48

5 Answers

[Possibility of common occurrence]

  • The required library (DLL) is missing or the version is different.
  • The .NET Framework version is out of date or corrupted.
  • You do not have sufficient access privileges.Unable to write files, etc.
  • I am affected by the security software.

[Solution]
 Check the library version you are referring to for conflicts.
 

 hoge.exe --- piyo.dll ver 1.0.1.0
fuge.dll --- piyo.dll ver 1.0.0.9

This configuration may be affected by a different version of piyo.dll.
You must modify fuge.dll to refer to piyo.dll ver1.0.1.0.

If possible, have your logs checked

If the .NET application terminates incorrectly, you can check the Windows Log→Application in the Management Tool→Event Viewer for exceptions.


2022-09-30 20:48

Dialog displayed when no program error handling has been performed.
It's only a coincidence that it works on your PC, so make sure you handle the error properly.Only the program itself and you, the author, know what kind of errors are occurring.


2022-09-30 20:48

The most likely reason is that there are no libraries or necessary files like other people's answers,
There is also a possibility that there is a bug in the program in the first place.

For example,

  • It doesn't work without folders and files specific to your computer.
  • It doesn't work without specific apps and data.

Why don't you check the area like that?
(I'm not sure if this is a bug or not, but the reason why it doesn't work as expected,
 It's probably a bug in the broad sense.)

The quickest thing to do is to handle errors properly and see what errors are occurring.
Add specific means to the program.If an error occurs,
Add error handling to output the contents and data to a text file and
It may be quick to have your friend's PC run it again.


2022-09-30 20:48

As a possibility, if you are performing dynamic DLL loading in the program and the DLL you want to load is marked as a file retrieved from another computer, the DLL loading will fail.

Enter a description of the image here

If you are distributing files without compression or extracting ZIP files in Explorer, please check the security flag.


2022-09-30 20:48

Thank you all.
If you didn't handle the error, it was natural to handle the error properly, but it was difficult to understand and remake everything because I didn't make it myself, so I put VS in the PC I wanted to work on and built it on my side.

Thank you, everyone.


2022-09-30 20:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.