multi-file c++/cli .net assembly in ASP.NET web site

假如想象 提交于 2019-12-13 01:00:24

问题


I have a .NET assembly that I want to use in an ASP.NET web site. The assembly has the following characteristics:

  • written in C++/CLI
  • contains managed and unmanaged code
  • compiled to x86/x64 platforms (using the correct platform-specific assembly, so it's not believed to be an issue here)
  • compiled as a multi-file assembly linking several native dlls

When I try to compile I am getting an error stating:

Could not load file or assembly '...' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I can use the library reference without problems in an ASP.NET web application (such as MVC), but when I want to use it in an ASP.NET web site, I get this compilation issue.It seems to be something specifically related to the ASP.NET compiler.

How do I get my website to compile with this dependency?


回答1:


I don't see any compilation settings within Visual Studio to indicate one way or another...



来源:https://stackoverflow.com/questions/1654856/multi-file-c-cli-net-assembly-in-asp-net-web-site

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!