0

I have a wpf application in .net framework with x86 dependent library where it compiles and run with AnyCPU and prefer32 but true. When app is migrated to .net6.0 Same setup is not working. I am unable to load x86 library. Now app is forced to use x86 instead of any cpu. prefer32bit true does not have any significance. With this setup, app will have 2GB memory and i want to use 4GB memory.

Can i use AnyCPU + Prefer32bit=true and still load x86 dependent library for .net6.0 wpf app?

RM88
  • 1
  • 2
    If a library is x86-only, it wouldn't have worked in 64-bit in the previous version either. Because your previous version was using AnyCPU with prefer32, it would have been running as x86 at run-time. – Matthew Watson Feb 18 '22 at 09:39
  • @MatthewWatson: Thats right. Previously memory allocated for the app was 4GB , now with .net6.0 memory is limited to 2GB. Observed memory out of range exception in .net6.0 app. – RM88 Feb 18 '22 at 09:59
  • So your actual question is how to allocate enough memory? Maybe this is helpful: https://stackoverflow.com/q/934314/1136211 – Clemens Feb 18 '22 at 10:33

0 Answers0