[英]Compile pure x64 dll for C# Webform with Visual Studio 2015
I'm working with visual studio 2015 and .net 4.5.2 on a Windows 2012 server. 我正在使用Windows 2012服务器上的Visual Studio 2015和.net 4.5.2。 I'm trying to generate a pure x64 dll for a my webforms application. 我正在尝试为我的Webforms应用程序生成纯x64 dll。 I've followed the instruction found here: 我已按照此处的说明进行操作:
https://msdn.microsoft.com/en-us/library/zekwfyz4(v=vs.140).aspx https://msdn.microsoft.com/zh-CN/library/zekwfyz4(v=vs.140).aspx
The reason I'm doing this is because I need to call some x64 c++ routines which have been compiled with the /clr switch.. When I attempt to call my c++ routines from testpage.ascx.cs I get: 我这样做的原因是因为我需要调用一些用/ clr开关编译的x64 c ++例程。当我尝试从testpage.ascx.cs调用c ++例程时,我得到:
Could not load file or assembly 'arxTideEngine' or one of its dependencies. 无法加载文件或程序集“ arxTideEngine”或其依赖项之一。 An attempt was made to load a program with an incorrect format. 试图加载格式错误的程序。
I've used dependency walker to confirm that the dll generated for my webform application is still x86 even though everything else in the dll is x64. 我已经使用依赖关系遍历器来确认为我的Webform应用程序生成的dll仍然是x86,即使dll中的其他所有内容都是x64。
How can I get VS 2015 to generate a pure x64 dll for my webforms application? 如何获取VS 2015为Webforms应用程序生成纯x64 dll?
This issue appears to be related to the fact that the web app was running under IIS Express. 此问题似乎与Web应用程序在IIS Express下运行这一事实有关。 After creating a new web app that ran under IIS, the x64 compile worded as expected. 创建了在IIS下运行的新Web应用程序后,x64编译的措辞符合预期。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.