简体   繁体   English

使用Visual Studio 2015编译C#Webform的纯x64 dll

[英]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.

相关问题 Visual Studio 2012:在DLL项目中使用MASM x64 - Visual Studio 2012: Using MASM x64 in DLL Project 生成英特尔兼容的x64位dll(C#) - generate Intel compatible x64 bit dll (C#) 如何构建 RDKits C# Wrappers — Visual Studio 2019 x64 - How can I build RDKits C# Wrappers — Visual Studio 2019 x64 强制C#app编译为x64而不是AnyCpu - Force C# app to compile as x64 instead of AnyCpu c#visual studio使用目标anycpu构建exe,但在调用进程平台(x86 / x64)上确定其平台(x86 / x64) - c# visual studio build exe with target anycpu but that determines its platform(x86/x64) on the calling process platform(x86/x64) 如何在Visual Studio 2015,x64配置中生成单元测试 - How to Generate unit tests in visual studio 2015,x64 configuration VisualStudio C#x64,为什么AddReference选项,.NET选项卡指向x86 DLL而不是x64? - VisualStudio C# x64, why AddReference option, .NET tab points to x86 DLL instead of x64? Visual Studio C# 目标平台 x86 但 nuget package 在我看来是 x64 - 程序运行时出错 - Visual Studio C# target platform x86 but nuget package seems to me x64 - error when program runs 参考Shell32.dll并编译为x64? - Reference Shell32.dll and compile as x64? 在VS2010中针对x86和x64处理器编译C#项目 - Compile a C# project in VS2010 both for x86 and x64 processors
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM