Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32 bit not in good state and workarounds #1624

Closed
kili0fi opened this issue Jul 1, 2016 · 18 comments
Closed

32 bit not in good state and workarounds #1624

kili0fi opened this issue Jul 1, 2016 · 18 comments

Comments

@kili0fi
Copy link

kili0fi commented Jul 1, 2016

I am building 32 bit versions of everything in Asp.Net Core, because i have some legacy COM modules to support. 32 bit support is not well implemented, and has bugs. The solution consists of clean Asp.Net Core app with project.json, and from a .net module wrapping COM as .csproj.

  • Even when configuring the solution completely to x86, the ASp.Net project builds to net452/Win7-x64 folder, even when project.json BuildOptions has "platform": "x86".
  • File Libuv.dll is wrong, and i need manually to replace it from x86 nuget package. If not replaced, host.Run(); fails.
  • Publishing does not work for 32 bit config. I use manual command:
    dotnet publish "%CurrentPath%" --framework net452 --runtime win-x86 --output "%TargetPath%" --configuration Debug --build-base-path "%CurrentPath%\artifacts\bin\MyProject"
    I need to allow the publishing to build it, publish, and afterwards copy correct Libuv.dll.
@guardrex
Copy link
Contributor

guardrex commented Jul 5, 2016

IIRC you'll need to install 32 bit/x86 dotnet cli on your machine. Cross-compiling bitness to 32 from 64 is a known non-working scenario right now. See: aspnet/IISIntegration#214, https://github.com/dotnet/cli/issues/2922, and https://github.com/dotnet/cli/issues/2881.

@kili0fi
Copy link
Author

kili0fi commented Jul 5, 2016

32/64 bit should be just another project option. I do have x64 projects too. How do we do mixture of projects then?

@muratg
Copy link
Contributor

muratg commented Jul 5, 2016

@kili0fi You can install both 32bit and 64bit dotnet SDKs on your machine, side-by-side.

@kili0fi
Copy link
Author

kili0fi commented Jul 6, 2016

Tested, They can be installed side-by-side, but either one dominates depending on system PATH. So mixture of projects is possible, but it is really clumsy. This can be only temporary state. Either they should cross-compile or delegate to each other.

Installing x86 version fixes many things.

  • Output directory changed from -x64 to Win7-x86, as it should.
  • It now installs correct 32-bit libuv.dll.

But leaves room for improvement: None of these are showstoppers.

  • The aforementioned support for mixture of projects.
  • 32bit SDK is well hidden artifact. I suggest "Which version(s) i should install?" page.
  • Publishing from Visual studio still fails, because it searches exe from wrong "Win" directory instead of "Win7-x86":
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(149,5): Error : Could not find a part of the path 'D:\project\artifacts\bin\project\project\bin\Debug\net452\win\project.exe'.
    Running the publishing manually and enabling compilation fixes it.

@muratg
Copy link
Contributor

muratg commented Jul 6, 2016

cc @piotrpMSFT

@MatLeger
Copy link

MatLeger commented Jul 8, 2016

Where can the 32 bit SDK be found? As @kili0fi mentioned it appears to be a well hidden artifact.

@kili0fi
Copy link
Author

kili0fi commented Jul 8, 2016

whispers quietly @MatLeger , go to www.asp.net. then download page, then Other Downloads, link is under the big white bar below "Docker".

@kili0fi
Copy link
Author

kili0fi commented Jul 8, 2016

One more finding: I have in my solution a windows dll as csproj. After installing the x86 SKD, the main project, which is project.json, can't find the dll. I had to change in the csproj the output path of e.g. debug, x86 configuration, output path from bin\x86\Debug\ to bin\Debug\ .

Although project.json is nice and clean, i am not so fond of it, if it is TOO simplistic, and can't be tweaked to actually work. We have solutions consisting of tens of modules. Their builds must work.

@kili0fi
Copy link
Author

kili0fi commented Jul 8, 2016

@guardrex , i see this issue might have fitted better into cli section. Bear with me while i am learning the ropes. Before this open-source stuff i just kicked closest MS arse. Above is my last finding before vacation. Feel free to close this issue if it's a duplicate.

@guardrex
Copy link
Contributor

guardrex commented Jul 8, 2016

@kili0fi They'll cross-reference fine this way. The original issue is well known. Right now, they have it at the 1.0.0-prevew3 milestone (14% complete). If you can find a workaround, that seems like a good idea given where preview3 is at.

@jamesqo
Copy link

jamesqo commented Jul 8, 2016

I also seem to be experiencing this issue; dotnet publish -c Release with a win10-x86 RID in the project.json says that it's not compatible with any of the target runtimes (all 64-bit).

@john-luke-laue
Copy link

@kili0fi I'm also trying to build my .NET Core Web Application using the x86 version of the SDK, but I can't seem to point dotnet to use the x86 version. I installed the x86 SDK from here, and it's sitting in C:\Program Files (x86)\dotnet

When I open my project in Visual Studio 2015, I get the error:
The project is configured to use .NET Core SDK version 1.0.0-preview2-003131 which is not installed or cannot be found under the path C:\Program Files\dotnet. These components are required to build and run this project. Download the version of .NET Core SDK specified in global.json or update the SDK version in global.json to the version that is installed.

Here is my global.json:

"sdk": {
    "version": "1.0.0-preview2-003121",
    "architecture": "x86"
  }

Any ideas about how to fix this?

@kili0fi
Copy link
Author

kili0fi commented Sep 15, 2016

@john-luke-laue , i suggest you look at your system PATH. Studio can't select which SDK it uses. Move the (x86) directory before the 64-bit version. If studio finds the 64-bit version first, it delegates to it, and it in turn fails to make correct x86 build.

If you give in command prompt command
dotnet --info
the last line should be
RID: win81-x86
when it finds the x86 version. If it says
RID: win81-x64
then the 64-bit version is first in path.

@Alxandr
Copy link
Contributor

Alxandr commented Jun 19, 2017

Is this still the case?

@ms0713
Copy link

ms0713 commented Nov 10, 2017

@Alxandr Exactly how to achieve this ? "Move the (x86) directory before the 64-bit version". What I did was, removed dotnet folder from C:\Program Files(x86)\dotnet. But then my VS solution was not able to pick up dotnet from C:\Program Files\dotnet. Can you help?

@muratg
Copy link
Contributor

muratg commented Nov 10, 2017

@ms0713, @kili0fi is talking about the order in the PATH environment variable.

@Eilon
Copy link
Member

Eilon commented Apr 3, 2018

Closing this issue because it isn't clear to me if there is an issue remaining. If you feel there's still an issue, please re-open this issue or log a new issue with complete details of the problem. Thanks!

@Eilon Eilon closed this as completed Apr 3, 2018
natemcmaster pushed a commit that referenced this issue Nov 14, 2018
- Renamed KestrelHttpParser to HttpParser
- Removed the generic virtual dispatch as it turns out to be an
order of magnitude slower than regular virtual dispatch. This change
means we also lose the inlining of Frame.OnStartLine and Frame.OnHeader.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants