GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 373 of 436    Print  
How can we say one exe is developed in .net Compatible languages or not?

  
Total Answers and Comments: 7 Last Update: March 21, 2007     Asked by: srinivaasu 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 17, 2006 16:15:57   #1  
Jayaprakash        

RE: How can we say one exe is developed in .net Compat...
There will be a config file appname.exe.config.
 
Is this answer useful? Yes | No
November 20, 2006 12:12:28   #2  
Srinivas        

RE: How can we say one exe is developed in .net Compat...

Dear Jayaprakash

I think without appname.exe.config. also we can build the forms. According to my knowledge this file is not mondatory to be explicitly invoke then how can we say one application is developed in .net compatible languge. In other words how can we say the application is developed in Managed way and not is UnManaged way. So Please clarify me in this regard.

Regards

Srinivas


 
Is this answer useful? Yes | No
November 24, 2006 21:59:39   #3  
Paul        

RE: How can we say one exe is developed in .net Compat...

I would try to decompile the exe using the ildasm.exe. If a CLR header is found the manifest should give the details regarding the application.


 
Is this answer useful? Yes | No
December 04, 2006 08:46:28   #4  
Khader Hassan Khan M        

RE: How can we say one exe is developed in .net Compat...
Its simple Just run that exe in a machine which do not have .Net framework.
 
Is this answer useful? Yes | No
December 28, 2006 09:03:08   #5  
Khader Hassan Khan M        

RE: How can we say one exe is developed in .net Compat...

try this code

using System;

using System.Collections.Generic;

using System.Text;

using System.Reflection;

namespace checkingnetproj

{

class Program

{

static void Main(string[] args)

{

string FullPATHofFile;

FullPATHofFile <path of the exe or dll> ;

try

{

AssemblyName assemblyName AssemblyName.GetAssemblyName(FullPATHofFile);

Console.WriteLine( {0} - is a .NET assmbly. FullPATHofFile);

}

catch (BadImageFormatException)

{

Console.WriteLine( {0} - Not .NET assmbly. FullPATHofFile);

}

Console.ReadLine();

}

}

This will help u.


 
Is this answer useful? Yes | No
January 13, 2007 04:44:49   #6  
shailesh        

RE: How can we say one exe is developed in .net Compat...

Every exe is in PE(Portable executable ) form which keeps the information about in which environment it is to be run so if try to run any exe that is not .NET complaint it will not run.


 
Is this answer useful? Yes | No
March 21, 2007 11:26:49   #7  
GP        

RE: How can we say one exe is developed in .net Compat...

There are two easy methods
1) No programming:
Load the EXE/DLL with ILDASM.exe if it is .Net programed than it will work otherwise it will throw error.
2) Programatically:
Use reflection API to LoadAssembly. It it is not a .Net program it will throw exception.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape