Solved

Platform independent code with .NET

Posted on 2013-01-14
2
383 Views
Last Modified: 2013-02-01
Hi All

I have a Visual Studio project which handles two platform projects. One for 32 bit and one for 64 bit. I would like to keep a single project and a single setup (Deployment) to install both 64 bit and 32 bit platforms. So I am currently using "Any CPU" in the project as platform.
Most of my codes are working fine. But when I add a reference to SAP Business One DI API and UI API, this makes problems. It has both 64 and 32 bit versions.

My question is How can I use both project and setup.exe (Deployment) as a single entity with these references. That means it must run for 32 bit platform with 32 bit SAP reference and for 64 bit platform, SAP 64 bit reference?. Any kind of Conditional compilation will help on tihs?

Advance thanks for your help
Yours sincerely.
0
Comment
Question by:gopalv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 38773891
here a full solution for your case:
Using Side-by-Side assemblies to load the x64 or x32 version of a DLL

the catch here is using custom assembly resolver which loads the right targeted dll for each platform.
0

Featured Post

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question