We have two automated build job that run whenever someone attempts to checkin a change to the source control. One for i386 and one for amd64. I've always took it for granted, but one of our new employees asked why do we need them both and I couldn't give an honest answer. So the question is can a C# code compile for i386 but fail for amd64 (or vice versa) ?
Asked
Active
Viewed 48 times
2
-
Do you care about just compilation, or other built steps including unit tests? – dbc Jan 04 '15 at 19:06
-
Do you use native libraries? – Gábor Bakos Jan 04 '15 at 19:06
-
Depend on what your project is doing, do you have any native or processor specific assemblies in your project that are referenced? Also do you have automated unit tests that run? – Scott Chamberlain Jan 04 '15 at 19:07
-
We're using managed C++. I guess that answers the question – Shmoopy Jan 04 '15 at 19:08
1 Answers
3
C# should compile fine in one go when set to "Any CPU"
However, when the code is dependent on externals that have been complied for either 32 or 64 bit then you might need to create two build processes.
An alternative could be to make a dynamic loader of the platform specific libraries that decides what library to load at run-time. The might be tricky but might enable you to merge the two build processes.