Home > Net >  C # development environment is up and running and copy the difference exe files separately
C # development environment is up and running and copy the difference exe files separately

Time:11-01

The same database and code, click run in the machine Visual studio will be abnormal exit, but will be under the bin directory compiled. Exe files and. DLL files (including abnormal exit file. DLL) copied to another computer on execution, code is wrong, is arguably execution. Exe is supposed to be an error, but on the other computer can not see the problem (or, may have a problem, but did not show), what reason is this? Two kinds of operation mechanism differ?

CodePudding user response:

Normally only c # program installed VS all. NET environment should be all possible load VS run sure didn't have a problem of VS you now this kind of situation, in turn, may refer to the c + + or libraries written in other languages and you this machine is not required for the library environment but there is another machine

CodePudding user response:

Try the code if catch is empty running is not error when debugging report not error depends on the abnormal vs Settings

No try code exception no matter how to run will error

CodePudding user response:

reference 1st floor OrdinaryCoder response:
. Normally only c # program installed VS all.net environment should be all possible load VS run sure didn't have a problem of VS you now this kind of situation, in turn, may refer to the c + + or libraries written in other languages and you this machine is not required for the library environment while another machine with

Another computer is new, didn't match anything, simply copy the exe and DLL

CodePudding user response:

refer to the second floor qq_30335331 response:
try code if catch is empty running is not error when debugging report not error depends on the abnormal vs Settings

No try code exception regardless of how to run will be an error

Good, really useful try a code block, the original poster said abnormal Settings in vs2019 where is open?

CodePudding user response:

refer to the second floor qq_30335331 response:
try code if catch is empty running is not error when debugging report not error depends on the abnormal vs Settings

No try code exception regardless of how to run will be an error

Catch is empty and the original poster said is what meaning, have a mistake, not should be determined by the catch to catch mistakes?

CodePudding user response:

Guess not to come out...

CodePudding user response:

reference book 5 floor small curtilage response:
Quote: refer to the second floor qq_30335331 response:
try code if catch is empty running is not error when debugging report not error depends on the abnormal vs Settings

No try code exception regardless of how to run will be an error

Catch is empty and the original poster said is what meaning, have a mistake, not should be determined by the catch to catch mistakes?

Understand the building Lord said grateful

CodePudding user response:

This depends on what you use versions of vs, early versions of vs debugging will be enabled by default "enable visual studio bearing" (personally, I remember before should be vs15 too early can't remember)
In visual studio hosting environment, vs debug and run directly, sometimes for the performance of two kinds of state

CodePudding user response:

The
little reference to the original poster book home reply:
the same database and code, click run in the machine Visual studio will be abnormal exit


"Lazy" to this level, where you execute one line of code (line number) and the context code won't say wrong understand it?

CodePudding user response:

reference book, 4/f, small house reply:
ok, code block really useful try, said that the original poster of the abnormal Settings in vs2019 where is open?


This may be your knowledge and experience, because the teacher usually won't tell you when beginners to learn,

Many people develop code written when the try... Catch is purely for the sake of self-deception, cheat development leading the way, in development, is to let the bug out as soon as possible, only let the bug is captured by the vs development environment, you don't know what to do next, only through tens of thousands of times in the test code, to Release, and Release the Release version usually need to capture the top application Exception, uniform processing (for example give users a unified prompt dialog, or recorded in the log), not let programs because "user code no error trapping" out of the process

Developing scribble a try... Catch is a fool, so can't really debugging, you can't automatically the debugger breakpoints in really wrong statements to debug on the stack each entry statement environment, in other words, scribble a try... Catch didn't understand debugging and write code entirely on Mongolia, rely on copying code,

CodePudding user response:

Really know people who know their debugging code is the code that back
 
[STAThread]Public static void Main (string [] args)
{
# if the DEBUG
Application. ThreadException +=Application_ThreadException;
# # endif
 if the DEBUG 
The Process ();
# the else
Try
{
The Process ();
}
The catch (Exceptin the ex)
{
.
}
# endif

 [Conditional (" Release ")] 
The static void test1 ()
{

}

[Conditional (" DEBUG ")]
The static void test2 ()
{

}

, etc., used to distinguish debug or release version,

Do not write code in order to release, coding is the lowest, is the purpose of writing the code in order to pass the test, and should pass the test, at least have to act to do debugging,

CodePudding user response:

Have a look, thanks for sharing!
  •  Tags:  
  • C#
  • Related