I would like to build a x64 package of a project I wrote in monodevelop. I can change the project compiler options from x86 to x64, but if I do this, I get the error:
Error CS0016: Could not write to file `AudioCuesheetEditor', cause: AMD64 (CS0016) (AudioCuesheetEditor)
How can I build packages for x64 systems?
Thank you for help!
Use the any cpu configuration
You'll get x64 on a 64-bit operating system, x86 on a 32-bit operating system. Automagic provided by the just-in-time compiler.
BUT On windows x86 with anycpu there is no problem. Using windows x64 will crash becaus gtk-sharp has no x64 build. So on windows x64 you have to build x86.
Related
I'm trying to debug an application deployed on an x64 server, but I cant find the x64 remote debuging
this link https://visualstudio.microsoft.com/downloads/#remote-tools-for-visual-studio-2022 only offers AMD64, ARM64 or x86
Am I missing something
Stupidly didnt consider AMD64 ... as you were, I'll show myself out then ...
I was looking for MSBuild.exe, and I found it in two slightly different places:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\MSBuild.exe
What's the difference between them and which should I use?
What's the difference between them?
The MSBuild.exe has two versions, 32-bit and 64-bit.
On 32-bit machines, the MSBuild.exe exists in the path: C:\Program Files\..\..\Bin\MSBuild.exe
On 64-bit machines, there are two version of MSBuild.exe tool. The 32-bit tools will be under: Bin\MSBuild.exe and the 64-bit tools under: Bin\amd64\MSBuild.exe
If you want to know some differences between these two versions, you can refer to the blog: Building on Cross targeting scenarios and 64-bit MSBuild.
which should I use?
To answer this question, you should to know the differences between 32-bit program and 64-bit program. You can refer this document for detail.
If the assembly is configured for Any CPU then it will run as x64 on a 64-bit machine and as x86 on a 32-bit machine.
If the assembly is configured for x86 then it will run as WOW64 on a 64-bit machine (i.e. a 32-bit process) and as x86 on a 32-bit
machine.
If the assembly is configured for x64 then it will run as x64 on a 64-bit machine and will fail to run on a 32-bit machine
So you should use Bin/MSBuild.exe, which can be run on 64-bit machine and as x86 on a 32-bit.
Besides, Visual Studio build is equivalent to running 32-bit MSBuild.
Thank you for any and all help... I've never seen this bug before... I have several vendor supplied DLLs for talking to a Signature Capture Device. We build our C# windows app platform target set to "any cpu" on an XP x86 machine. When the application is run on Win7 32-bit computer it works fine. When it is run on Win7 64bit computer it fails.
Running the Visual Studio 2010 debugger on Win 7 x64 in "Debug mode" works fine. Running in Release mode on Win7 x64 fails.
I can change the platform to target x64 then Release mode gives "interops made for a different target platorm." When I delete and recreate the interops for 64 bit target I get "ActiveX not properly registered".
Thank you in advance.
Make sure you module not depends of 32 bits libs.
Use Dependency Walker or Fuslogvw.exe to diagnose module load fail.
To interop 32/64 bits COM see Access x86 COM from x64 .NET
My solution was to change the Project->Properties->Build->Platform Target from "any cpu" to "x86". The application now runs on win7 64 bit and 32 bit and XP x86.
My machine has the latest Oracle ODP.NET x64 installed (xCopy version). My machine is x64. I don't know if the target machines will be x86 or x64 so I have set the build properties to AnyCPU in VS 2012. There is a default checkbox active "prefer 32-bit"
Compilation is OK but when I run the code it says it can't find the assembly. Unchecking "prefer 32-bit" solves this problem.
But what is causing this? I would assume that prefering 32-bits is okay but that it would use x64 if that's the only option.
Any ideas?
"Any CPU" with "Prefer 32-bit" will run as a 32-bit process on 64-bit machines. And because a 32-bit process can't load the 64-bit ODP.NET assemblies (and native DLLs too), it throws the exception you mentioned.
You can read more about the "Prefer 32-bit" setting here: https://stackoverflow.com/a/12066861/631802
I have the source code for a 32-bit dll (Windows) that I am trying to re-compile as a 64 bit dll. I have been told that the app "can compile in VC++ 64-bit mode to target AMD64 or Itanium processors running Windows 64 bit Server."
I am trying to decipher this: if it runs on Windows 64 bit server, should it also run on x64 bit Windows?
AMD64 and x64 and x86-64, and Intel64 and EM64T are essentially same thing, with different names.