Questions tagged [anycpu]

Any CPU is a build target for .net Applications which are compiled using the Visual-Studio IDE

97 questions
2
votes
1 answer

How I can re-run my C# AnyCPU application as 64 bit, if it's running as 32 bit (WOW64)?

I develop my application for 32 bit and 64 bit Windows. I have a problem: If my application is launched from a 32-bit process on 64-bit OS, my application will run as 32-bit. How I can re-run my C# AnyCPU application as 64 bit, if it's running as 32…
Aleksandr Vishnyakov
  • 1,872
  • 5
  • 23
  • 39
2
votes
0 answers

Running Kestrel in 64-bit mode with ASP.NET Core MVC web apps

With a ASP.NET Core MVC web app, is there a way to run the Kestrel web server in 64-bit (or AnyCPU) mode? If I change my app's target platform from the default x86 to either x64 or AnyCPU, it no longer runs, producing a…
2
votes
1 answer

Solace .Net API compiled for AnyCPU

Why isn't Solace .Net API targeting AnyCPU? I've compared both SolaceSystems.Solclient.Messaging.dll and SolaceSystems.Solclient.Messaging_64.dll assemblies in Reflector and they are absolutely identical except for one class SolaceNativeAPI which…
Konstantin Spirin
  • 20,609
  • 15
  • 72
  • 90
2
votes
1 answer

Is it advised to choose always the target AnyCPU for Xamarin projects?

When trying other target other than AnyCPU, I get more errors and the dependencies are more tricky to resolve. But when choosing AnyCPU target, I get less errors. Is it advised to choose always this target for Xamarin projects?
ProEns08
  • 1,856
  • 2
  • 22
  • 38
2
votes
2 answers

Build platform target AnyCPU EXE still shows 32bit header in 64bit machine

Not sure this has been asked before (I could not find any). I have simple console app/ESE and have the below settings. I'm running Windows 8, 63bit OS. And the EXE target framework .NET 4.5 However, when I compile this EXE, it still shows as a…
Spock
  • 7,009
  • 1
  • 41
  • 60
2
votes
0 answers

AccessViolationException in ComputeKeys

Firstly I apologise if this, to you, is obviously a hardware issue, and not a programming issue. If it is, hopefully we can migrate it to the appropriate place. I have a long-running web-services program (Any CPU), which has a whole bunch of data…
Moo-Juice
  • 38,257
  • 10
  • 78
  • 128
2
votes
2 answers

Run a ANYCPU Exe on 64bit System in 32 Bit Mode

is it Possible to Run a EXE witch is compiled as ANYCPU on an 64 BIT OS, but in 32bit Mode? is there a way to configure the start mode? thank you for any advice
Cajon
  • 53
  • 1
  • 4
2
votes
1 answer

Windows store app compilation errors after changing the target CPU

I wanted to add a Bing maps feature to my windows store app, which already runs perfectly. The problem is, that to add Bing maps, i have to change the running project configuration from 'any CPU' to ARM, x86 or x64. Once i do that all hell breaks…
Erez
  • 205
  • 3
  • 13
1
vote
1 answer

Assembly.Invoke() conflicts with x86 and AnyCPU

I'm using Assembly.Load() and then EntryPoint.Invoke(null, null) in order to run a .NET assembly in memory. This works, unless if the host process is x86 and the executed assembly is AnyCPU. In this case, the executed assembly gets executed in x86…
bytecode77
  • 14,163
  • 30
  • 110
  • 141
1
vote
1 answer

Possible reasons for assembly failing to load on production system?

Problem Assembly is loaded just fine in development, fail to be loaded on production. Details The assemblies quickfix_net.dll and quickfix_net_messages.dll (Quickfix.NET API) are failing to load on production systems throwing the following…
MichaelS
  • 7,023
  • 10
  • 51
  • 75
1
vote
0 answers

.NET Windows API call issue in a 64-bit process only

Context: I am porting some old VB.NET code from x86 to AnyCPU platform. Problem statement: In a class instance, I noticed a call to the kernel32 CreatePipe function would unexpectedly change, when run as a 64-bit process, the value of a totally…
CTZStef
  • 1,675
  • 2
  • 18
  • 47
1
vote
0 answers

Using regasm with AnyCPU DLL for both 32 bit and 64 bit using Inno Setup

I have a C# COM DLL that has been compiled with the setting Any CPU. At the moment I have put this into the script: [Run] Filename: "{dotnet40}\regasm.exe"; Parameters: "MSAToolsGMailClassLibrary.dll /codebase"; WorkingDir: "{app}"; Flags:…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
1 answer

Can't load a specific 32-bit assembly through Reflection

I'm using the library SharpShell to develop a simple shell extension (a property sheet) to display some information for .NET assemblies, see: This shell extension and SharpShell itself is not relevant to this question, but to explain my scenario so…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
1
vote
1 answer

StackFrame.GetFileLineNumber() behaviour varies based on assembly Platform and Optimisation flags

i'm trying to understand a problem and although I've read a lot, I can't seem to find any resources explaining this odd combination. After a bit of experimentation I've found that combinations of setting compiler optimisations on/off and building…
Xerxes
  • 309
  • 3
  • 12
1
vote
2 answers

CMake - Building C# without Prefer 32-bit Flag

I have a CMake project that creates a DLL from C++ and a C# Windows Forms executable that loads the DLL. I use the CMake generator: Visual Studio 15 2017 Win64 No matter what I do (one example would be setting compile option: /platform:anycpu), I…
MrD
  • 629
  • 1
  • 8
  • 22