Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 无法在使用VS 2015安装的Windows 10上以64位模式运行ASP.NET项目_C#_Asp.net_Visual Studio 2015_64 Bit_Windows 10 - Fatal编程技术网

C# 无法在使用VS 2015安装的Windows 10上以64位模式运行ASP.NET项目

C# 无法在使用VS 2015安装的Windows 10上以64位模式运行ASP.NET项目,c#,asp.net,visual-studio-2015,64-bit,windows-10,C#,Asp.net,Visual Studio 2015,64 Bit,Windows 10,我们最近(昨天)升级到了Windows 10和Visual Studio 2015 如果我们编译到“任意CPU”,我们的ASP.NET项目将运行得非常好 我们现在在两台不同的机器上测试了它,编译到x64会产生错误 Exception Details: System.BadImageFormatException: Could not load file or assembly 'OurDLL' or one of its dependencies. An attempt was made to

我们最近(昨天)升级到了Windows 10和Visual Studio 2015

如果我们编译到“任意CPU”,我们的ASP.NET项目将运行得非常好

我们现在在两台不同的机器上测试了它,编译到x64会产生错误

Exception Details: System.BadImageFormatException: Could not load file or assembly 'OurDLL' or one of its dependencies. An attempt was made to load a program with an incorrect format.
我已经搜索了很长一段时间,我发现的大多数故障排除都是针对反向问题的。也就是说,有人试图在64位计算机上运行32位ASP应用程序,并收到此错误

我已经做了所有的事情,比如删除所有的obj、bin文件夹等等

我还删除了计算机上的所有临时.NET文件,并从Framework64目录运行了aspnet_regiis.exe

有人经历过吗


编辑:在编译到x64时,通过第三人/第三台计算机确认ASP.NET项目在使用VS2015的Windows 10中不工作。它开始看起来像是一个VS2015 bug。

我们已经检查了几次,所以很明显它在某个时候被恢复为默认值,而VS仍然没有给出警告或在编译期间更改此选项的选项

无论如何:

Tools > Options > Projects and Solutions > Web Projects > 'Use the 64 bit 
version of IIS Express for websites and projects'
虽然我们已经检查过了,但我决定再检查一次


因此,如果您要升级到VS2015/Windows 10,并使用ASP.NET项目,您可能需要检查此设置几次,尤其是在执行任何.NET更新/Web工具/VS修复时。

您必须为项目启用64x

工具->选项…->项目和解决方案->Web项目->将64位版本的IIS Express用于网站和项目->确定

这将启用64位