Search code examples
nant

How to make nant build 32 bit assemblies


I have a Visual Studio project that was originally configured to build using the Release|Any CPU build configuration.

I need to change this so all the assemblies are built using Release|x86.

I can change this in Visual Studio but how do I specify the equivalent in my nant build script?

EDIT: I am building my assemblies using the csc task.


Solution

  • My experience might be outdated (did this 3 years ago), but the NAnt <csc> documentation still supports it: this is not possible in a simple way.

    We've solved this by running corflags on the output assembly after build to set the 32BIT flag. You can do this from NAnt, with the <exec> task. CorFlags is installed as part of the SDK, so you should have it already.