Run the main asp.net project as x86 under visual studio 2015

I have a vs2015 solution containing the main asp.net project and setting up its project.json as follows:

{
  "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 http://+:12345",
  }
  [...]
}

I expect the application to create and run with the platform specified in project.json (FYI, I launch the application through the vs2015 debugger in the win10 / x64 window). However, win7-x64 is used instead . I see the win7-x64 output directory , and the invitational invitation header also points to it.

If I create and run directly through the command line with the runtime, it works.

So my question is: what else do I need to configure to run the main asp.net application on x86 from vs2015?

+4
3

2 :

  • () 64- .net SDK 32-. VS .
  • (local) .net SDK PATH. VS . dotnet, PATH.
+5

, , .

, , x86 x64.NET Core ( : 32 , ).

"buildOptions" "": "x86" "runtimes": "win7-x86" project.json ( x64 PATH).

, , , project.json .csproj( : Project.json).

, , (. .NET Framework):

enter image description here

:

enter image description here

, , , () Visual Studio.

, "active": dotnet --info .

+4

, :

visual studio 2015 " Microsoft Visual Studio 2015 3 (KB3165756)"

, .

MS .net core/vs2015 :)


:

( , ). , , @VictorHurdugaci:

  • , .net SDK x86

  • And to ensure the PATH order "C: \ Program Files (x86) \ dotnet \" before the "C: \ Program Files \ dotnet \" runtime, which is not guaranteed when installing a new package (I wanted to store both x86 and x64)

Thanks to VictorHurdugaci, at the end of the day you were absolutely right.

0
source

Source: https://habr.com/ru/post/1654619/


All Articles