5
Answers

C# Console application executable file not running

Photo of Ravi Patel

Ravi Patel

5y
5.8k
1
Hi,
I have developed one C# Console application project which export the date from SQL database into csv file.
Project is working as expected from the PC where I created this project in visula studio.
But I want to run the application executable file from different PC using task scheduler and this PC does not have visual studio installed and I don't want to install.
I have researhced some article that as long as I have same version of .Net installed on both PC then I can run the application executable file from different PC even if I don't have visual studion on that PC.
I have .Net 4.5.2 running in my visual studio and on other PC I have .Net 4.5.2 or higher installed because I got error message while installing .Net 4.5.2 on that PC that .Net 4.5.2 or higher version is alreday installed on this PC.
I am still not able to run applicatiion executable file from other PC.
Can any one tell me what is the issue or is there any other way to run Application executable file using task scheduler?
Any help would be much appreciated.
Thank you 

Answers (5)

2
Photo of Nilesh Shah
13 54.3k 1.4m 5y
The best possible debugging for you is to write to console at different steps.
so that you know which steps are executed and where is the error.
2
Photo of Nilesh Shah
13 54.3k 1.4m 5y
Most probably there is some error(crash) when you run the exe file but it is just closing it as the error in not handled.
 
can you write your login in try - catch block and write error to console in catch section?
 
do you use app.config file for storing database connection string? have you copied that file along with the .exe file?
 
the more detail you provide the better.
1
Photo of Rajanikant Hawaldar
32 38.8k 454.6k 5y
https://support.microsoft.com/en-in/help/4014018/new-hybrid-configuration-wizard-crashes-with-error-code-0xe0434352
1
Photo of Laxmidhar Sahoo
NA 10.4k 55.7k 5y
whether the used  dll is stored i the target pc or not .That should be in the reference folder that you are taken in your pc 
1
Photo of Ravi Patel
NA 438 5.8k 5y
Hi Nilesh,
I am not using app.config file and my connection string is embedded in the code.
When I check windows error log I got this below.
Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0
Problem signature:
P1: ExportRedwoodData.exe
P2: 1.0.0.0
P3: 5dfbaa3a
P4: System.Data
P5: 4.7.2623.0
P6: 5a1f6c08
P7: 147e
P8: 24
P9: System.Data.SqlTypes.SqlType
P10:
Attached files:
These files may be available here:
C:\Users\Ravi.WRAP-S-P21\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_ExportRedwoodDat_8bec6f2da698367e68ea5944961a5be3b810255f_6a0b8ef8_a19635f9
 
Faulting application name: ExportRedwoodData.exe, version: 1.0.0.0, time stamp: 0x5dfbaa3a
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18895, time stamp: 0x5a4b125e
Exception code: 0xe0434352
Fault offset: 0x00015608
Faulting process id: 0x536c
Faulting application start time: 0x01d5b9c7e88e7f1e
Faulting application path: C:\Users\Ravi.WRAP-S-P21\Documents\Debug\ExportRedwoodData.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 26934234-25bb-11ea-80d7-44a842396e3a
Faulting package full name:
Faulting package-relative application ID: