Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 130985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:02:03+00:00 2026-05-11T06:02:03+00:00

I want to load one of four separate C# assemblies based upon what the

  • 0

I want to load one of four separate C# assemblies based upon what the build target is. This is going into a webservice with .net framework 3.0.

possibilities:

32-bit debug: AmtApiWrapper32d.dll

32-bit release: AmtApiWrapper32.dll

64-bit debug: AmtApiWrapper64d.dll

64-bit release: AmtApiWrapper64.dll

Those wrappers are a separate C++ project that wrap a C Native DLL that I wrote. C/C++ is my usual platform so please excuse me if this is a nubs question.

All of the wrapper DLLs contain the exact same functions and same prototypes. They’re used for many other purposes besides this one, so unless this is really terrible, the setup stays the same.

So, i want to load one of them at compile time. I’ve looked over stuff like reflection, GetDelegateForFunctionPointer, and some other stuff, and they all seem similar but overly complicated for this simple task. Any suggestions? THANKS

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:02:03+00:00Added an answer on May 11, 2026 at 6:02 am

    It’s definitely possible, but you’ll have to wade into the build file.

    You’d want something like:

    <ItemGroup Condition=' '$(Configuration)' == '32-bit debug' '>   <Reference Include='AmtApiWrapper32d'> </ItemGroup> <ItemGroup Condition=' '$(Configuration)' == '32-bit release' '>   <Reference Include='AmtApiWrapper32'> </ItemGroup> <ItemGroup Condition=' '$(Configuration)' == '64-bit debug' '>   <Reference Include='AmtApiWrapper64d'> </ItemGroup> <ItemGroup Condition=' '$(Configuration)' == '64-bit release' '>   <Reference Include='AmtApiWrapper64'> </ItemGroup> 

    I suggest you unconditionally get one of them working, and then look at exactly what the reference looks like.

    That’s if you want to add it as a build-time reference. If you want to use it in a P/Invoke declaration, just use #if SYMBOL/#endif around the appropriate attribute.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hai, I am using Java GWT. In this i want to load one html
I want to load one or more DLLs dynamically so that they run with
I'm working on an iOS app where I want to load one view if
Quick Explanation One Silverlight (3.0) project with several XAML pages. I want to load
I want show annotation view (above one of my pin) after load map. For
I want to load the data into session so that when the next button
I have four different server and a load balancer. I want to use captcha
Im using EMGU (opencv wrapper) for image processing. I want to load images one
I want to load array of Images one by one from drawable. At a
at first sorry my bad English I want load model in my plugin controller

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.