473,785 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can you control the content of the assembly manifest.

Jon
For example, how do I prevent the following function from appearing in the assembly manifest?

#pragma unmanaged
void Fn() {
int a = 1;
}

It is a large port, so transforming these global functions to statics of newly defined classes would be quit a effort.
Nov 17 '05 #1
5 1881
That is not possible due to the current implementation of IJW. #pragma
unmanaged only controls wheteher the code is generated as native code or as
IL, it doesn't affect metadata emission or prevent emission of thunks that
enable calling from managed to unmanaged code and the other way around.

Ronald Laeremans
Visual C++ team

"Jon" <Jo*@martinsoun d.com> wrote in message
news:u0******** ******@TK2MSFTN GP09.phx.gbl...
For example, how do I prevent the following function from appearing in the assembly manifest?
#pragma unmanaged
void Fn() {
int a = 1;
}

It is a large port, so transforming these global functions to statics of newly defined classes would be quit a effort.

Nov 17 '05 #2
Jon
Thanks for the reply. I would not have guessed that you could not control whether items internal to the assembly are exposed in the
assembly manifest.

"Ronald Laeremans [MSFT]" <ro*****@online .microsoft.com> wrote in message news:eo******** ******@TK2MSFTN GP11.phx.gbl...
That is not possible due to the current implementation of IJW. #pragma
unmanaged only controls wheteher the code is generated as native code or as
IL, it doesn't affect metadata emission or prevent emission of thunks that
enable calling from managed to unmanaged code and the other way around.

Ronald Laeremans
Visual C++ team

"Jon" <Jo*@martinsoun d.com> wrote in message
news:u0******** ******@TK2MSFTN GP09.phx.gbl...
For example, how do I prevent the following function from appearing in the

assembly manifest?

#pragma unmanaged
void Fn() {
int a = 1;
}

It is a large port, so transforming these global functions to statics of

newly defined classes would be quit a effort.


Nov 17 '05 #3
You can put them in a compiland that is compiled without the /CLR switch
altogether (instead of in a #pragma unmanaged block). That gets rid of the
meta data signature.

Note that in CLR terms these functions are not internal to the assembly. You
are seeing one of the side effects of combining a separate compilation
language with the CLR metadata model. At least a side effect of our current
implementation.

Ronald

"Jon" <Jo*@martinsoun d.com> wrote in message
news:eW******** ******@tk2msftn gp13.phx.gbl...
Thanks for the reply. I would not have guessed that you could not control whether items internal to the assembly are exposed in the assembly manifest.

"Ronald Laeremans [MSFT]" <ro*****@online .microsoft.com> wrote in message

news:eo******** ******@TK2MSFTN GP11.phx.gbl...
That is not possible due to the current implementation of IJW. #pragma
unmanaged only controls wheteher the code is generated as native code or as IL, it doesn't affect metadata emission or prevent emission of thunks that enable calling from managed to unmanaged code and the other way around.

Ronald Laeremans
Visual C++ team

"Jon" <Jo*@martinsoun d.com> wrote in message
news:u0******** ******@TK2MSFTN GP09.phx.gbl...
For example, how do I prevent the following function from appearing in
the assembly manifest?

#pragma unmanaged
void Fn() {
int a = 1;
}

It is a large port, so transforming these global functions to statics
of newly defined classes would be quit a effort.



Nov 17 '05 #4
Jon
Thanks, compiling pure unmanaged units without the /CLR, greatly reduced the meta data pollution.
"Ronald Laeremans [MSFT]" <ro*****@online .microsoft.com> wrote in message news:OA******** ******@tk2msftn gp13.phx.gbl...
You can put them in a compiland that is compiled without the /CLR switch
altogether (instead of in a #pragma unmanaged block). That gets rid of the
meta data signature.

Note that in CLR terms these functions are not internal to the assembly. You
are seeing one of the side effects of combining a separate compilation
language with the CLR metadata model. At least a side effect of our current
implementation.

Ronald

"Jon" <Jo*@martinsoun d.com> wrote in message
news:eW******** ******@tk2msftn gp13.phx.gbl...
Thanks for the reply. I would not have guessed that you could not control

whether items internal to the assembly are exposed in the
assembly manifest.

"Ronald Laeremans [MSFT]" <ro*****@online .microsoft.com> wrote in message

news:eo******** ******@TK2MSFTN GP11.phx.gbl...
That is not possible due to the current implementation of IJW. #pragma
unmanaged only controls wheteher the code is generated as native code or as IL, it doesn't affect metadata emission or prevent emission of thunks that enable calling from managed to unmanaged code and the other way around.

Ronald Laeremans
Visual C++ team

"Jon" <Jo*@martinsoun d.com> wrote in message
news:u0******** ******@TK2MSFTN GP09.phx.gbl...
> For example, how do I prevent the following function from appearing in the assembly manifest?
>
> #pragma unmanaged
> void Fn() {
> int a = 1;
> }
>
> It is a large port, so transforming these global functions to statics of newly defined classes would be quit a effort.
>
>



Nov 17 '05 #5
Hello Jon,

Thanks for posting in the group.

Do you have any more questions on this issue? If yes, please feel free to
post here.

If you have any feedback on Microsoft product, please feel free to submit
it at:
http://register.microsoft.com/mswish...=EN-US&gssnb=1
We appreciate your input there, and look forward to building better
products with helpful ideas such as yours.

Thanks again for participating the community.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 17 '05 #6

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

Similar topics

0
6298
by: Nick Malik | last post by:
Instead of posting a problem, I will post a solution to a problem that I've seen posted many times. One which I just hit and solved. I've been using signed assemblies (have to... they are called by Biztalk over a COM Interop layer). Along the way, I changed one of the assemblies that my system depends on, and started getting the following error: General Information
12
2784
by: Pollux | last post by:
I'm having trouble doing someting apparently simple. I'm still not very familiar with Visual Studio 2003, so apologies if I've missed something obvious. Basically my problem is the following. I have 2 files that contain each one a very simple class. I compiled them as .netmodules. Both classes are under the same namespace. I then bundled these .netmodules files into a dll. This gives me an assembly of 3 files which was confirmed by...
0
5545
by: Namratha Shah \(Nasha\) | last post by:
Hi All, Assembly linker is a tool which is used to create an assembly by combining one or more .netmodules and resource files. In simple words an .netmodule is an IL file that does not have manifest in it .... you can say its an assembly without the manifest ... and hence a non -assembly file containing IL code. In the yesterday's example we saw how we can create the .resources file
5
4097
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in both projects. Both controls(dlls) have been signed using SN.exe and I've set up the appropriate .Net assembly permissions using those Strong Names The DLL's have been copied to the /bin directory in both web virtual directories.
3
4412
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 really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing version numbers on anything. The errors come and go with no apparent rhyme or reason. We do not...
0
1931
by: =?Utf-8?B?Q29saXZpZXI=?= | last post by:
If anyone can help me with this I would really appreciate it: I have an assembly into which I have linked a manifest file as a Win32 resource. This is necessary since I want to use a class in this assembly with registration-free COM interop from a Win32 application. I also want to use this assembly with a .Net application that I want to deploy using ClickOnce. However when I try to install the application from the deployment location I get...
3
4000
by: gourmet | last post by:
Hello! I need to restart the "Windows Audio Service" (audiosrv) via C#. I'm using the ServiceController Class to do this. It is no problem under XP and no problem under vista if UAC is disabled. But with enabled UAC i'm getting a "access refused" exception. I also tried to do it via console with "net start ..." but the same error appears. Three questions:
2
14466
by: =?Utf-8?B?Q2VzYXI=?= | last post by:
I have the ASP.NET 2.0 AJAX Extensions 1.0 installed (v1.0.61025). As to the web.config file, I'm using the one created using the ASP.NET AJAX-Enabled website ... This error is due to that I'm trying to use the AJAX control toolkit, but when I try and add the controls to the toolbar of VS2005 from the dll, I get this error: C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9953
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7502
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.