Visual Studio 2017 - Conditional Build depending on server architecture

Asked

Viewed 23 times

0

Wanted a help on conditional compilation in visual studio, I have an SAP library that I use in my environments I need to reference the correct version of this DLL depending on the architecture of the server, for example:

I have some old web sites that are still hosted on 32-bit machines, in this case I need to compile a library that I developed in 32bits to be able to publish in production.

I already have other newer sites that are hosted on another server that the architecture is 64 bits, but in order to use the same library I have to point to the version of 64 bits Dlls and compile.

Before you say anything, it doesn’t solve I set my project to Anycpu, it doesn’t work.

What I would like to know is if there is any way to automate this and avoid that every time I compile the project reference to the correct architecture, I searched and found the link insert link description here below, but not working it ignores the directives and always compiles with 32-bit Dlls

Example Found

inserir a descrição da imagem aqui

  • Why AnyCPU doesn’t work?

  • DLL documentation, is an SAP dll the project in which it is referenced has to be 32 or 64 bits... already tried with Anycpu but does not scroll...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.