473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

reading manifest


Hi;

Can we get all dependincy information (manifest) of an executableusing c# ?
If so, can anybody give a small example ?

thanks..
Nov 15 '05 #1
2 5961
Can we get all dependincy information (manifest) of an executableusing c# ? If so, can anybody give a small example ?


You can, by means of the Assembly class's GetReferencedAssemblies method.
For example:

Assembly MyAssembly = Assembly.LoadFrom("c:\\MyAssembly.dll");
AssemblyName[] AsmNames = Assembly.GetReferencedAssemblies();

You can also get a reference to the currently executing assembly like this:

Assembly CurrentAssembly = Assembly.GetExecutingAssembly();

Regards,
Kevin McNeish
C# MVP
Chief Software Architect, Mere Mortals .NET Framework
www.oakleafsd.com
Nov 15 '05 #2

thanks it workes, but how can I dismiss System.Forms like dependincies ?
I just want to external referenced dll's that users prepared and their
version

But all System.* referances are also in this list.

thanks..

"Kevin McNeish [C# MVP]" <ke****@oakleafsd.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
Can we get all dependincy information (manifest) of an executableusing
c# ?
If so, can anybody give a small example ?
You can, by means of the Assembly class's GetReferencedAssemblies method.
For example:

Assembly MyAssembly = Assembly.LoadFrom("c:\\MyAssembly.dll");
AssemblyName[] AsmNames = Assembly.GetReferencedAssemblies();

You can also get a reference to the currently executing assembly like

this:
Assembly CurrentAssembly = Assembly.GetExecutingAssembly();

Regards,
Kevin McNeish
C# MVP
Chief Software Architect, Mere Mortals .NET Framework
www.oakleafsd.com

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Murat Tasan | last post by:
hi, i'm having a very odd problem... here is my system: debian linux java: j2sdk 1.4.1_02 everything is running fine, except for one little problem... i have a custom manifest file called...
0
by: hawat.thufir | last post by:
an ant build.xml file: <project name="XHTML" default="package2"> <import file="properties.xml" /> <target name="clean"> <delete dir="${outputDir}" /> </target>
1
by: Santhu | last post by:
What is the difference between METADATA and MANIFEST and where do they get stored? Thank you
3
by: spacekid | last post by:
Hi there I am exposing a c# assembly as a COM component (regasm /codebase) and calling it from classic asp. When I try to call the ConfigurationSettings.AppSettings function in the c# assembly,...
3
by: Jonathan Payne | last post by:
Hi, I am interested in adding a manifest file to the resources for a MFC application. When I create an AppWizard MFC app with a manifest file it adds the following lines to the .rc file: ...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
11
by: RossettoeCioccolato | last post by:
Is there any way to coax the VC8 linker into generating an application manifest with a trust level section suitable for an administrative application? Or do I have to add this manually each time...
14
by: _iycrd | last post by:
After several frustrating attempts to wrap a native DLL w a C++/CLI DLL, I finally got an assembly to compile, only to find a *runtime* error. The app comes up fine. Test dialog displays. ...
1
by: Steve Teeples | last post by:
Can an application manifest document be added to a C# application? If so, can it be done from within the IDE of Visual Studio 2005? I want to customize my application's security level...
0
xarzu
by: xarzu | last post by:
Getting a C# program with a manifest file to run in the debugger ---------------------------------------------------------------- How do I declare a manifest file in the Visual Studio IDE for C#...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.