473,399 Members | 2,774 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,399 software developers and data experts.

What is the .NET equivalent of Java's MANIFEST.MF and co.?

I'm trying to understand where the information in the META.INF directory
including MANIFEST.MF etc is to be found for .NET assemblies.

Also some projects such as Eclipse's OSGi kernel stores additional info in
the MANIFEST.MF file. What would be the .NET equivalent where such info can
be stored?

Kunle

--
Don't talk unless you can improve the silence.

Nov 29 '05 #1
4 3596
what kind of info are you speaking about?

info about assembly author, etc....
are stored as attirbute like that:
===
[assembly: AssemblyTitle("NGui")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NGui")]
[assembly: AssemblyCopyright("Copyright © 2005")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
===

there is no "classpath" info. assembly are either in the same directory,
path or GAC. as DLL should be.

signing is done with the compiler and a .snk file
"Kunle Odutola" <ku***********@REMOVETHISokocha.freeserve.co.uk> wrote in
message news:ug****************@TK2MSFTNGP12.phx.gbl...
I'm trying to understand where the information in the META.INF directory
including MANIFEST.MF etc is to be found for .NET assemblies.

Also some projects such as Eclipse's OSGi kernel stores additional info in
the MANIFEST.MF file. What would be the .NET equivalent where such info
can
be stored?

Kunle

--
Don't talk unless you can improve the silence.

Nov 30 '05 #2
"Lloyd Dupont" <net.galador@ld> wrote in message
news:uV**************@TK2MSFTNGP15.phx.gbl...

Hi Lloyd,
what kind of info are you speaking about?
Custom descriptive info mainly. It will be used by classes in my framework
when loading/managing bundles. In the OSGi specs, a bundle maps to an
assembly with custom info in it's equivalent of the Java MANIFEST.MF file.
Examples of the sort of custom info follows (sorry it's a bit long):

Bundle-Activator: com.acme.fw.Activator
The Bundle-Activator header specifies the name of the class used to start
and
stop the bundle.

Bundle-Category: osgi, test, nursery
The Bundle-Category header holds a comma-separated list of category
names.

Bundle-Classpath: /jar/http.jar,.
The Bundle-Classpath header defines a comma-separated list of JAR file path
names or directories (inside the bundle) containing classes and resources.

Bundle-Copyright: OSGi (c) 2002
The Bundle-Copyright header contains the copyright specification for this
bundle.

Bundle-DocURL: http:/www.acme.com/Firewall/doc
The Bundle-DocURL headers must contain a URL pointing to documentation
about this bundle.

Bundle-Localization: OSGI-INF/l10n/bundle
The Bundle-Location header contains the location in the bundle where
localization files can be found.

Bundle-NativeCode: /lib/http.DLL; osname = QNX; osversion = 3.1
The Bundle-NativeCode header contains a specification of native code
libraries contained in this bundle.

Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0
The Bundle-RequiredExecutionEnvironment contains a comma-separated
list of execution environments that must be present on the Service Platform.

DynamicImport-Package: com.acme.plugin.*
The DynamicImport-Package header contains a comma-separated list of
package names that should be dynamically imported when needed.

Export-Package: org.osgi.util.tracker;version=1.3
The Export-Package header contains a declaration of exported packages.

Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
The Fragment-Host header defines the host bundle for this fragment.

Import-Package: org.osgi.util.tracker,org.osgi.service.io;version= 1.4
The Import-Package header declares the imported packages for this bundle.

Require-Bundle: com.acme.chess
The Require-Bundle header specifies the required exports from another
bundle.
info about assembly author, etc....
are stored as attirbute like that:
===
[assembly: AssemblyTitle("NGui")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NGui")]
[assembly: AssemblyCopyright("Copyright © 2005")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
===


I initially thought of representing this information with custom attributes.
I didn't because I'm worried about losing flexibility because changing a
bundle's "Bundle-Category" attribute would now require a rebuild of the
otherwise unchanged bundle/assembly's source code. Is there a way round that
with the CLR model?
Kunle

--
Don't talk unless you can improve the silence.

Nov 30 '05 #3
>> what kind of info are you speaking about?

Custom descriptive info mainly. It will be used by classes in my framework
when loading/managing bundles. In the OSGi specs, a bundle maps to an
assembly with custom info in it's equivalent of the Java MANIFEST.MF file.
Examples of the sort of custom info follows (sorry it's a bit long):

Bundle-Activator: com.acme.fw.Activator => could be specified with the compiler
Bundle-Category: osgi, test, nursery
Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0
Import-Package: org.osgi.util.tracker,org.osgi.service.io;version= 1.4
Require-Bundle: com.acme.chess => uh?
Bundle-Classpath: /jar/http.jar,.
Bundle-NativeCode: /lib/http.DLL; osname = QNX; osversion = 3.1 => no equivalent, look in local directory, PATH & GAC
Bundle-Copyright: OSGi (c) 2002
Bundle-DocURL: http:/www.acme.com/Firewall/doc => use standart assembly attribute
DynamicImport-Package: com.acme.plugin.*
Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)" => use custom assembly attribute
Bundle-Localization: OSGI-INF/l10n/bundle => you should read the internationalization section, should be in sattelite
assembly in specific directories

Export-Package: org.osgi.util.tracker;version=1.3 => use reflection on the assembly

I initially thought of representing this information with custom
attributes.
I didn't because I'm worried about losing flexibility because changing a
bundle's "Bundle-Category" attribute would now require a rebuild of the
otherwise unchanged bundle/assembly's source code. Is there a way round
that
with the CLR model?

No.
However if you don't use Visual Studio but some command line tool to build
your DLLs/EXEs,
you could make a multi-module assembly (CSC /t:module), all bundled together
with AL.
In which case you could have a module with a single C# source file with the
attributes.
You, then, just need to recompile this module and rebuilt the DLL/EXE with
all the modules.

It's certainly uselessly complicated but if you are worry about compiling
your source code, that's the way to go.

It has some advantages though.
For exemple this way you could embed native DLL inside your assembly.

Lloyd
Dec 1 '05 #4

"Lloyd Dupont" <net.galador@ld> wrote in message
news:uR**************@TK2MSFTNGP12.phx.gbl...
what kind of info are you speaking about?
Custom descriptive info mainly. It will be used by classes in my framework when loading/managing bundles. In the OSGi specs, a bundle maps to an
assembly with custom info in it's equivalent of the Java MANIFEST.MF file. Examples of the sort of custom info follows (sorry it's a bit long):

Bundle-Activator: com.acme.fw.Activator

=> could be specified with the compiler
Bundle-Category: osgi, test, nursery
Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0
Import-Package: org.osgi.util.tracker,org.osgi.service.io;version= 1.4
Require-Bundle: com.acme.chess

=> uh?
Bundle-Classpath: /jar/http.jar,.
Bundle-NativeCode: /lib/http.DLL; osname = QNX; osversion = 3.1

=> no equivalent, look in local directory, PATH & GAC
Bundle-Copyright: OSGi (c) 2002
Bundle-DocURL: http:/www.acme.com/Firewall/doc

=> use standart assembly attribute
DynamicImport-Package: com.acme.plugin.*
Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"

=> use custom assembly attribute
Bundle-Localization: OSGI-INF/l10n/bundle

=> you should read the internationalization section, should be in

sattelite assembly in specific directories

Export-Package: org.osgi.util.tracker;version=1.3 => use reflection on the assembly


Hmmm, perhaps I'm trying too hard to emulate Java's environment. Thanks, I'm
back in my .NET developer alter-ego now.
Yep, use of custom attributes, and perhaps the .config files plus standard
..NET localization should be applied to reach my goal.
I initially thought of representing this information with custom
attributes.
I didn't because I'm worried about losing flexibility because changing a
bundle's "Bundle-Category" attribute would now require a rebuild of the
otherwise unchanged bundle/assembly's source code. Is there a way round
that
with the CLR model?

No.


OK. Thanks. This jives with my initial thoughts and advice I've received
elsewhere.
It's certainly uselessly complicated but if you are worry about compiling
your source code, that's the way to go.

It has some advantages though.
For exemple this way you could embed native DLL inside your assembly.


Steady on chap!. I wasn't planning on going that far. ;-)

Kunle

Dec 2 '05 #5

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

Similar topics

2
by: Steven | last post by:
Hello, I'm a student at the university of Antwerp Belgium and I'm writing a program for java web start that has to support plugins. Now my question is why does java web start download 3 versions...
54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
1
by: Santhu | last post by:
What is the difference between METADATA and MANIFEST and where do they get stored? Thank you
12
by: Steven T. Hatton | last post by:
This is something I've been looking at because it is central to a currently broken part of the KDevelop new application wizard. I'm not complaining about it being broken, It's a CVS images. ...
8
by: Hermawih | last post by:
Hello , I want your opinion about this . In order to say it clearly , I think I have to describe it in long sentences . I could consider myself as Intermediate/Advance Access Developer ;...
2
by: yaron | last post by:
Hi, for porting java to c# i need to know: What is the C#.NET equivalent for java.net.SocketAddress and java.nio.ByteBuffer ? Thanks.
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
0
by: MIRRA | last post by:
Hi I have a UNIX script which creates a report. In that script I have to define the java classpath. Also I need to check if the java classpath specified exists or not. Below is the command i use ...
5
by: Verde | last post by:
I'm learning about .NET assemblies and in the documentation there is mention of "module" or "modules" within an assembly. For example, the Assembly class has a GetModules method. What is a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.