配置 Visual Studio 2013 以允许 ASPNETCOMPILER 使用 x64 编译器进行预编译 [英] Configure Visual Studio 2013 to allow ASPNETCOMPILER to precompile using the x64 compiler

查看:19
本文介绍了配置 Visual Studio 2013 以允许 ASPNETCOMPILER 使用 x64 编译器进行预编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 VS2013 x64 项目中使用发布期间预编译"标志?无论我做什么,它都无法发布,因为它坚持使用x86 ASPNETCOMPILER.

How can I use the "Precompile during publishing" flag on a VS2013 x64 project? No matter what I do, it fails to publish because it insists on using the x86 ASPNETCOMPILER.

我想我曾经在 VS2012 中使用过这个,但是升级到 VS2013 后它不再工作了.

I think I used to have this working in VS2012, but after upgrading to VS2013 it is no longer working.

我记得修复涉及更改与 MSBuild 相关的文本文件,但老实说我对它不太了解,所以它有点模糊.

I recall the fix involving changing a text file related to MSBuild but I honestly don't know very much about it so it's a little hazy.

非常感谢任何帮助.谢谢!

Any help is greatly appreciated. Thanks!

推荐答案

这似乎是 Visual Studio 2013 中的一个错误.

This seems to be a bug in Visual Studio 2013.

Microsoft Connect - 使用 X64 平台时预编译错误

此处列出的解决方法有效,是将 Project/PropertyGroup xml 标记中的以下 xml 添加到发布配置文件(位于项目的 PropertiesPublishProfiles 目录中).

The workaround listed there works and is to add the following xml in the Project/PropertyGroup xml tag to the publish profile (located in the PropertiesPublishProfiles directory of your project).

<AspnetCompilerPath>C:WindowsMicrosoft.NETFramework64v4.0.30319</AspnetCompilerPath>

在应用上述解决方法之前,我收到此构建错误:无法加载文件或程序集 '****' 或其依赖项之一.尝试加载格式不正确的程序."- ASPNET编译器

I was getting this build error before applying the above workaround: "Could not load file or assembly '****' or one of its dependencies. An attempt was made to load a program with an incorrect format." - ASPNETCOMPILER

这篇关于配置 Visual Studio 2013 以允许 ASPNETCOMPILER 使用 x64 编译器进行预编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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