如何体现添加到.NET的DLL? [英] How to add manifest to a .NET DLL?

查看:211
本文介绍了如何体现添加到.NET的DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用在系统上注册一个COM DLL C#类库项目。我现在要部署的COM DLL作为一个边并排组装,所以我没有进行注册,或干扰可能使用不同版本的DLL的其他应用程序。

I have a c# class library project that uses a COM dll registered on the system. I now want to deploy the COM dll as a side-by-side assembly, so I don't have to register it, or interfere with other applications that might use a different version of the dll.

我已经加入app.manifest到C#项目中使用添加新项菜单,但我不知道下一步该怎么做。在项目属性/应用/图标和清单,清单下拉被禁用。我不知道如何让过去的。我添加了一个清单文件,为什么不能在下拉列表?

I have added app.manifest to the c# project using the add new item menu, but I'm not sure what to do next. In the project properties/application/icon and manifest, the manifest drop down is disabled. I don't know how to get past that. I've added a manifest file, why is it not in the dropdown list?

我有一个明显的COM DLL与C ++应用程序的工作,而且我认为我一直是原样。现在我需要知道如何编辑app.manifest为C#项目。我会通过添加已知良好的相关性元素开始。但我需要了解如何设置此教程,我没有看到它覆盖的任何地方。

I have a manifest for the COM dll that works with C++ applications, and I think I keep that as is. Now I need to know how to edit the app.manifest for the c# project. I will start by adding a known good dependency element. But I need a tutorial on how to set this up, I don't see it covered anywhere.

我使用VS2008

推荐答案

您肯定可以在.NET的DLL嵌入清单。应用程序的清单的内容并不都适用于装配,但也有一些。例如,UAC项是没有意义的组成部分清单,但assemblyIdentity一样。

You definitely can embed a manifest in a .net dll. The contents of an application manifest do not all apply to an assembly, but some do. For example, the UAC entries don't make sense for a component manifest, but assemblyIdentity does.

使用MT.EXE工具,你可以嵌入清单到一个dll:

Using the MT.EXE tool, you can embed a manifest into a dll:

嵌入:

mt.exe -manifest filename.dll.manifest -outputresource:filename.dll;#2

摘录:

mt.exe -inputresource:filename.dll;#2 -out:filename.dll.extracted.manifest

下面是对相关信息更多链接:

Here are more links on related info:

另一个DLL中嵌入例如:<一href="http://msdn.microsoft.com/en-us/library/ms235591(v=VS.100).aspx">http://msdn.microsoft.com/en-us/library/ms235591(v=VS.100).aspx

Another dll embed example: http://msdn.microsoft.com/en-us/library/ms235591(v=VS.100).aspx

一个的SxS演练:<一href="http://msdn.microsoft.com/en-us/library/ms973915.aspx">http://msdn.microsoft.com/en-us/library/ms973915.aspx

这篇关于如何体现添加到.NET的DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆