Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I wrote a c# console application which created 3 files: a.exe, a.exe.config, a.pdb.

Can I copy these files to any Win computer and execute it, or the computer needs correct .net framework and maybe some other stuff?

Thanks,

Zalek
Posted

Yes, any C# application is managed code - it is intimately tied to the .NET framework, so you will need that or a replacement such as one of the Mono variants to run any C# program, beit console or Winforms.

You must have the appropriate .NET framework installed to run any .NET application.
 
Share this answer
 
v2
Comments
zalekbloom 18-Mar-14 12:47pm    
Is there any DOS command to find if a computer has .net fremework installed?

Thanks,

Zalek
OriginalGriff 18-Mar-14 12:55pm    
There is no DOS command to check (though you can check to see if the folder exists:
%windir%\Microsoft.NET\Framework\v3.5
But that's dangerous if your users are...um...nontechnical.
There is also the registry:
http://support.microsoft.com/kb/318785
Which you can check via the command line:
reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5"| findstr Install
But...I hate letting users near the registry either.
You can do it via a web browser:
http://www.codeproject.com/Tips/188674/A-safe-way-to-get-the-user-to-check-if-the-NET-fra
But as far as I know, that is pretty much your lot!
Yes. However, you can be calling unmanaged code in a console application.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900