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 6861533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:32:49+00:00 2026-05-27T02:32:49+00:00

My Project1 is here \Project1\Bin\Debug\application.exe and my dlls are in \Project1\Debug\3rdparty.dll How to get

  • 0

My Project1 is here
\Project1\Bin\Debug\application.exe
and my dlls are in
\Project1\Debug\3rdparty.dll

How to get path that include this dll in my code?

[DllImport("????????/3rdparty.dll")]

what should i write at question marks (?????)
My solution includes other c++ projects inside. So whenever i compiled c++ project, it refresh dll in project1\Debug (some how i am not familiar with c++)
I need to use that dlls in DllImport [Path].
If i tried to add reference, it gives me error.
This might be really easy question, but i am not able to solve it for some reason.

Anwered by Hans Pasant in comment section :

Change the Output Directory setting in the C++ project to $(SolutionDir)bin\$(ConfigurationName) so that the native DLL ends up in the same folder as your managed program. Just use [DllImport(“3rdparty.dll”)] in your C# code. – Hans Passant

  • 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. Editorial Team
    Editorial Team
    2026-05-27T02:32:49+00:00Added an answer on May 27, 2026 at 2:32 am
    1. In the ‘Solution Explorer’, right click on ‘References’.
    2. Click ‘Add Reference’.
    3. Select the ‘Browse’ tab and select your 3rdparty.dll.
    4. After its added, right click the 3rdparty.dll under ‘References’ and change ‘Copy Local’ to true.
    5. Then just specify your DllImport like normal [DllImport("3rdparty.dll")]

    This will only work if its a .NET assembly. Since it looks like you are using a C++ DLL, you will need to look at Using C++ Class DLL in C# Application

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

Sidebar

Related Questions

I Have a folder in this path C:\Users\XXX\Desktop\Original\XXX\bin\Debug\Backup And when I save my project
I'm trying to debug and step through an Android application that segfaults. I've tried
I'm using CleanProject for cleaning my project file( get rid of resharper, bin/debug files
I am trying to reuse one code in ios application . That code has
I have a project here that connects to an in-production database and grabs tables
I have a bare-bones sample project here: http://dl.dropbox.com/u/7834263/ExpandingCells.zip In this project, a UITableView has
I've downloaded the .zip of this project here: https://github.com/SteveDunn/Gleed2D And I installed Visual Studio
I’ve been following the e-commerce tutorial located here: http://netbeans.org/kb/docs/javaee/ecommerce/intro.html Code repo of project here
Update: A sample project reproducing this bug can be found here at Microsoft Connect
I saw that there's many, many thread about this on the web, also in

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.