明显再次罢工 [英] Manifest strikes again

查看:76
本文介绍了明显再次罢工的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过几次令人沮丧的尝试包装本机DLL wa C ++ / CLI

DLL后,我终于得到了一个程序集进行编译,但却找不到*运行时*

错误。该应用程序很好。显示测试对话框。单击创建包装类的

按钮会导致异常,而不是在

按钮的事件处理程序中,而是在Main()中的Application.Run()中。

错误:


! System.IO.FileNotFoundException未处理

Message ="找不到指定的模块。 (例外来自

HRESULT:0x8007007E)"


我最初认为这条消息完全是废话,但是在

研究这个我发现了一些类似的事件。显然

这再次与清单文件有关。


主题:

http://forums.microsoft.com/MSDN/Sho ... 30243& SiteID = 1

是指提交给Microsoft的错误报告:
http://tinyurl.com/f78bv


不幸的是,MS将错误报告关闭为''设计'。'为什么MS会

将它视为''按设计''超出我的范围,而且我不能理解他们的推荐(可以是任何人吗?)。他们的解决方法(复制/

将清单从DLL重命名为C#app文件夹)不起作用,

当然。


有没有人知道这里发生了什么或如何到处

这个?


PS:平台是VS2005,XP专业版, 32位,奔腾,所有标准的东西。

上面线程中的某个人说这些.NET语言不是这两个应该兼容的吗?<

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. Clicking on the
button that creates the wrapper class causes an exception, not in the
button''s event handler, but in Application.Run() within Main(). The
error:

! System.IO.FileNotFoundException was unhandled
Message="The specified module could not be found. (Exception from
HRESULT: 0x8007007E)"

I initially thought the message was complete nonsense, but on
researching this I found a number of similar incidents. Apparently
this relates, once again, to a manifest file.

The thread at:

http://forums.microsoft.com/MSDN/Sho...30243&SiteID=1
refers to a bug report submitted to Microsoft:
http://tinyurl.com/f78bv

Unfortunately, MS closed the bug report as ''by design.'' Why MS would
regard it as ''by design'' is beyond me, and I can''t make much sense of
their recommendation (can anyone?). Their workaround (copying/
renaming the manifest from the DLL to the C# app folder) did not work,
of course.

Does anyone have any idea what''s going on here or how to get around
this?

PS: Platform is VS2005, XP Pro, 32-bit, Pentium, all standard stuff.
Someone in the thread above said "weren''t these .NET languages
supposed to be compatible?"

推荐答案

您好,


一般来说,当您的本机DLL不是'时,您会遇到此错误在与包装程序集相同的

目录中。因此,将您的本机DLL复制到包装程序集的

目录中。最好是使用相同的输出

目录(在VS的项目属性中)用于

本机库的项目以及包装器的项目。 />
Hello,

Generally you have this error when your native DLL isn''t in the same
directory as your wrapper assembly. So copy your native DLL in the
directory of your wrapper assembly. The best is to use the same output
directory (in the project properties of VS) for the project of your
native library and for the project of your wrapper.


你必须在你的DLL中嵌入清单(使用MT.EXE),或者你必须使用静态C链接
运行时库。请注意,在第一种情况下,如果目标机器

没有VS2005或SDK,则需要使用您的应用程序部署C运行时istalled。在后一种情况下,由于运行时间是静态链接的,因此不需要



Willy。


" _iycrd" < _i **** @ spamtrap.com>在留言中写道

news:v2 ******************************** @ 4ax.com ......

|经过几次令人沮丧的尝试,用C ++ / CLI包装本机DLL

| DLL,我终于得到了一个汇编来编译,只是为了找到*运行时*

|错误。该应用程序很好。显示测试对话框。点击

|创建包装类的按钮会导致异常,而不是在

|中按钮的事件处理程序,但在Main()中的Application.Run()中。

|错误:

|

| ! System.IO.FileNotFoundException未处理

| Message =&无法找到指定的模块。 (例外情况来自

| HRESULT:0x8007007E)"

|

|我最初认为这条消息完全是废话,但是在

|研究这个我发现了一些类似的事件。显然

|这再次涉及一个清单文件。

|

|主题是:

|

| http://forums.microsoft.com/ MSDN / Sho ... 30243& SiteID = 1

|是指提交给Microsoft的错误报告:

| http://tinyurl.com/f78bv

|

|不幸的是,MS将错误报告关闭为''设计'。'为什么MS会为
|将它视为按设计是超出我的,我无法理解

|他们的推荐(可以吗?)。他们的解决方法(复制/

|将清单从DLL重命名为C#app文件夹)不起作用,

|当然。

|

|有没有人知道这里发生了什么或如何到处

|这个?

|

| PS:平台是VS2005,XP专业版,32位,奔腾,所有标准的东西。

|上面的帖子中有人说不是这些.NET语言

|应该兼容吗?"

|
You have to embed the manifest in your DLL (using MT.EXE), or you have to
link with the static C runtime library. Note that in the first case, you
need to ''deploy'' the C runtime with your application if the target machine
doesn''t have VS2005 or the SDK istalled. In the latter case this isn''t
needed as the run-time is statically linked.

Willy.

"_iycrd" <_i****@spamtrap.com> wrote in message
news:v2********************************@4ax.com...
| 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. Clicking on the
| button that creates the wrapper class causes an exception, not in the
| button''s event handler, but in Application.Run() within Main(). The
| error:
|
| ! System.IO.FileNotFoundException was unhandled
| Message="The specified module could not be found. (Exception from
| HRESULT: 0x8007007E)"
|
| I initially thought the message was complete nonsense, but on
| researching this I found a number of similar incidents. Apparently
| this relates, once again, to a manifest file.
|
| The thread at:
|
| http://forums.microsoft.com/MSDN/Sho...30243&SiteID=1
| refers to a bug report submitted to Microsoft:
| http://tinyurl.com/f78bv
|
| Unfortunately, MS closed the bug report as ''by design.'' Why MS would
| regard it as ''by design'' is beyond me, and I can''t make much sense of
| their recommendation (can anyone?). Their workaround (copying/
| renaming the manifest from the DLL to the C# app folder) did not work,
| of course.
|
| Does anyone have any idea what''s going on here or how to get around
| this?
|
| PS: Platform is VS2005, XP Pro, 32-bit, Pentium, all standard stuff.
| Someone in the thread above said "weren''t these .NET languages
| supposed to be compatible?"
|


" VS2005或SDK"应阅读VS2005或.NET V2。


Willy。


" Willy Denoyette [MVP]" <无线************* @ telenet.be>在留言中写道

新闻:哦************** @ TK2MSFTNGP09.phx.gbl ...

|你必须在你的DLL中嵌入清单(使用MT.EXE),或者你必须

|链接到静态C运行时库。请注意,在第一种情况下,你

|如果目标机器需要''部署''C运行时与您的应用程序

|没有VS2005或SDK。在后一种情况下,这不是
|运行时需要静态链接。

|

|威利。

|

| " _iycrd" < _i **** @ spamtrap.com>在消息中写道

|新闻:v2 ******************************** @ 4ax.com ...

||经过几次令人沮丧的尝试,用C ++ / CLI包装本机DLL

|| DLL,我终于得到了一个汇编来编译,只是为了找到*运行时*

||错误。该应用程序很好。显示测试对话框。点击

||创建包装类的按钮会导致异常,而不是在

||中按钮的事件处理程序,但在Main()中的Application.Run()中。

||错误:

||

|| ! System.IO.FileNotFoundException未处理

|| Message =&无法找到指定的模块。 (例外情况来自

|| HRESULT:0x8007007E)"

||

||我最初认为这条消息完全是胡说八道,但在

||上研究这个我发现了一些类似的事件。显然

||这再次涉及一个清单文件。

||

||主题是:

||

|| http://forums.microsoft.com/ MSDN / Sho ... 30243& SiteID = 1

||是指提交给Microsoft的错误报告:

|| http://tinyurl.com/f78bv

||

||不幸的是,MS将错误报告关闭为''设计'。'为什么MS会为
||将它视为按设计是超出我的,我无法理解

||他们的推荐(可以吗?)。他们的解决方法(复制/

||将清单从DLL重命名为C#app文件夹)不起作用,

||当然。

||

||有没有人知道这里发生了什么或如何到处

||这个?

||

|| PS:平台是VS2005,XP专业版,32位,奔腾,所有标准的东西。

||上面线程中的某个人说不是这些.NET语言

||应该兼容吗?"

||

|

|
"VS2005 or the SDK" should read "VS2005 or the .NET V2".

Willy.

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:Oh**************@TK2MSFTNGP09.phx.gbl...
| You have to embed the manifest in your DLL (using MT.EXE), or you have to
| link with the static C runtime library. Note that in the first case, you
| need to ''deploy'' the C runtime with your application if the target machine
| doesn''t have VS2005 or the SDK istalled. In the latter case this isn''t
| needed as the run-time is statically linked.
|
| Willy.
|
| "_iycrd" <_i****@spamtrap.com> wrote in message
| news:v2********************************@4ax.com...
|| 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. Clicking on the
|| button that creates the wrapper class causes an exception, not in the
|| button''s event handler, but in Application.Run() within Main(). The
|| error:
||
|| ! System.IO.FileNotFoundException was unhandled
|| Message="The specified module could not be found. (Exception from
|| HRESULT: 0x8007007E)"
||
|| I initially thought the message was complete nonsense, but on
|| researching this I found a number of similar incidents. Apparently
|| this relates, once again, to a manifest file.
||
|| The thread at:
||
|| http://forums.microsoft.com/MSDN/Sho...30243&SiteID=1
|| refers to a bug report submitted to Microsoft:
|| http://tinyurl.com/f78bv
||
|| Unfortunately, MS closed the bug report as ''by design.'' Why MS would
|| regard it as ''by design'' is beyond me, and I can''t make much sense of
|| their recommendation (can anyone?). Their workaround (copying/
|| renaming the manifest from the DLL to the C# app folder) did not work,
|| of course.
||
|| Does anyone have any idea what''s going on here or how to get around
|| this?
||
|| PS: Platform is VS2005, XP Pro, 32-bit, Pentium, all standard stuff.
|| Someone in the thread above said "weren''t these .NET languages
|| supposed to be compatible?"
||
|
|


这篇关于明显再次罢工的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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