在visual studio 2015下启动一个asp.net核心项目作为x86

编程入门 行业动态 更新时间:2024-10-28 18:22:44
本文介绍了在visual studio 2015下启动一个asp核心项目作为x86的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个包含 asp 核心项目的 vs2015 解决方案,并将其 project.json 配置如下:

I have a vs2015 solution containing an asp core project and have configured its project.json as follow :

{ "buildOptions": { "emitEntryPoint": true, "preserveCompilationContext": true, "platform": "x86" }, "runtimes": { "win10-x86": {} }, "frameworks": { "net461": {} }, "commands": { "web": "Microsoft.AspNet.Hosting --ASPNET_ENV production --server Microsoft.AspNet.Server.Kestrel --server.urls +:12345", } [...] }

我希望应用程序能够在 project.json 中指定的平台上构建和运行 (仅供参考,我在 win10/x64 机器上通过 vs2015 调试器运行应用程序).但是,使用 win7-x64 运行时代替.我可以看到一个 win7-x64 输出目录,并且启动的提示标题也表明了这一点.

I am expecting the application to build and run with the platform specified in project.json ( FYI, I am running the app via vs2015 debugger on a win10/x64 box ). However, win7-x64 runtime is used instead. I can see a win7-x64 output directory and the prompt title launched indicates it too.

如果我通过指定运行时的命令行直接构建和运行,它可以工作.

If I build and run directly via command line specifying the runtime, it works.

所以我的问题是,我还需要配置什么才能从 vs2015 启动 x86 中的 asp 核心应用程序?

So my question is, what else do I need to configure to start the asp core app in x86 from vs2015 ?

推荐答案

有 2 个选项:

  • (全局)卸载 64 位 SDK 并安装 32 位 SDK.之后重启VS.
  • (本地)将新的 SDK 放在不同的文件夹中,并从控制台添加到您的 PATH 的路径.然后从那里开始VS.它将选择它在 PATH 上找到的第一个 dotnet.
  • 更多推荐

    在visual studio 2015下启动一个asp.net核心项目作为x86

    本文发布于:2023-11-11 13:45:11,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1578615.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:核心   项目   studio   visual   net

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!