Any CPU is a build target for .net Applications which are compiled using the Visual-Studio IDE
Questions tagged [anycpu]
97 questions
0
votes
2 answers
Including 64 bit-only assemblies in a WinForms project
We have a large WinForms application that we will not be re-writing (in WPF for example) any time soon. Microsoft continues to actively support Winforms.
We generally have our Winforms build configuration set to AnyCPU for development, and the…

Kevin MacDonald
- 650
- 8
- 21
0
votes
1 answer
Sentinel HASP returns NoApiDylib for 64bit DLL
Since my solution should be buildable for AnyCPU I had to choose the right Hasp DLL during runtime. This works quite nice with the proxy pattern. When I use the 32bit hasp_net_windows.dll everything works fine and I am able to login to the dongle…

Hafflgav
- 1
- 1
0
votes
0 answers
Is there a 64-bit SQLite.dll?
I have SQLite in my app that I pulled using NuGet. It is version 1.0.108. Is this anyCPU or is it 32-bit? There are many posts discussing that the DLL is bit specific.
dumpbin says it's 32-bit DLL. But my app (set to anyCPU) runs fine in 64-bit mode…

David Thielen
- 28,723
- 34
- 119
- 193
0
votes
1 answer
.NET Software running on x64 but compiled on x86 for Any CPU (VS2008)
I have a problem, whereby I’m getting runtime errors with a compiled program. This works fine in the development environment (x86), but not on the production environment (which is x64).
I found this article, which seems to imply that compiling…

Paul Michaels
- 16,185
- 43
- 146
- 269
0
votes
1 answer
CefSharp NuGet package, AnyCPU cannot find files
I am currently trying to write a small service, which uses CefSharp (v57.0.0) to render HTML to a PDF file and followed the instructions to use "Any CPU" in my project (Feature Request - Add AnyCPU Support).
In my project I used the following…

Octoate
- 459
- 1
- 6
- 18
0
votes
1 answer
Compiling as AnyCPU produces assembly with 32BIT flag set on 64-bit machine
I've created a brand new .NET 4.5 WinForm project in Visual Studio 2013 on a 64-bit machine. After compiling, I run corflags in the .exe and the 32BIT flag is set.
Version : v4.0.30319
CLR Header: 2.5
PE : PE32
CorFlags : 131075
ILONLY …

Jeff B
- 8,572
- 17
- 61
- 140
0
votes
1 answer
C# deployment on whatever machine X86, X64 or AnyCpu
I am a C# programmer. In my company we develop a program that, with a single executable, is deployed on various machines.
My boss says that the only way to do that is to make a X86 executable that if working on X86 machines will surely work on X64…

Patrick
- 3,073
- 2
- 22
- 60
0
votes
0 answers
What is the simplest way to create a Mixed (Native and Managed) Assemblies using Visual studio 2013
I have an assembly which I guess is built in x64 and I want to reference that in a project with Any CPU configuration.
But When I reference that .net assembly to the prject with Any CPU platform, I get the following warning
warning MSB3270: There…

VivekDev
- 20,868
- 27
- 132
- 202
0
votes
1 answer
Determine if program was built with AnyCPU
After reading
this comment
If it is built in "any cpu", it will show up as 32bit in dumpbin headers.
I would like to know how I can tell a regular 32-bit program from an
AnyCPU program. I would prefer
to do this from the command line if possible.…

Zombo
- 1
- 62
- 391
- 407
0
votes
3 answers
When should I compile my c# code with /platform:x64
Reading Microsoft explanation for different option for /platform, I found that when I use /platform:anycpu, it will run as 32 bit application on 32 bit system and 64 bit on 64 bit systems.
So why should I force it to use for example x64?
Is there…

mans
- 17,104
- 45
- 172
- 321
0
votes
1 answer
Compiler warns about mismatch in processor architecture, while corflags claims otherwise
The compiler gives the following warning:
warning MSB3270: There was a mismatch between the processor
architecture of the project being built "MSIL" and the processor
architecture of the reference "NationalInstruments.DAQmx", "x86".
When I…

bas
- 13,550
- 20
- 69
- 146
0
votes
0 answers
MS Access 2013: Attempted to read or write protected memory. This is often an indication that other memory is corrupt
We are running windows 8 64 bit and MS Office 2013 64 bit on a virtual machine. I got this error when I am trying to query the access database with parameters in the query string. The stack trace is:
at…

Xiaosu
- 605
- 1
- 9
- 21
0
votes
2 answers
VS2012 How to set output directory for C#'s AnyCPU configuration to x86 and x64 folders for respective solution configs?
I have a solution which contains two C++ and two C# projects. For the solution I have a Win32 configuration, which has the two C++ files as Win32 and the two C# files as AnyCPU. The x64 solution has C++ as x64 and C# as AnyCPU.
For the Win32…

Michael C
- 33
- 2
- 4
0
votes
0 answers
Release build Windows Phone 8 library for Any CPU change to x86
Strange configuration which I can't seem to understand.
I have a Windows Phone 8 library that I want to build for Any CPU, this works fine when I am selecting Debug, but soon as I choose Release configuration changes the platform to x86.
I can…

George Taskos
- 8,324
- 18
- 82
- 147
0
votes
1 answer
Force a C# WinForms app built with AnyCPU to debug as a 32 bit process
I have a C# project build with AnyCPU. We also dynamically load a feature which currently relies on 32 bit native DLLs. With this feature switched off the application runs quite happily as a 64 bit application. Consequently, Visual Studio determines…

Mike Thompson
- 6,708
- 3
- 32
- 39