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

  • Home
  • SEARCH
  • 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 7962811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:27:03+00:00 2026-06-04T05:27:03+00:00

In vs2008 (C#): I have : a main project (windows app) WCF Library WCF

  • 0

In vs2008 (C#):

I have :

  1. a main project (windows app)
  2. WCF Library
  3. WCF Host
  4. WCF Client (Windows app)

For testing my service with created client, I call my client form in my main proj and after getting the input requirement of service by this form, I start making response of service by calling my service contract method .

In this service I need to create a proper connection string with received parameter for request and I need my application startup path (D:\myProj.dll) to get access to an exe file. Unfortunately after using different kinds of codes that return this path, exactly at point of calling my service, I get another paths I don’t need (myproj, bin\debug or c:\programfiles\visual studio9\common7\IDE)

Can you help me ?

For additional info I have to say that I added this path by a command to post-build event of my service library and client.

Please help me to get access to this path (startup path of my project -> D:\myProj.dll)

Thank you in advance

  • 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-06-04T05:27:05+00:00Added an answer on June 4, 2026 at 5:27 am

    from MSDN

    path = System.IO.Path.GetDirectoryName(
              System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
    

    to get the path of a DLL your code is using:

    string fullPath = System.Reflection.Assembly.GetAssembly(typeof(MyClass)).Location;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a ClickOnce Solution with VS2008. My main project references another project
I have a windows forms project. It has a main form derived from System::Windows::Forms::Form
Using: C#, VS2008 I have the following main form class: [Main.cs] namespace Server {
In my VS 2008, for main project have this error for control/ form that
I have a project created with VS2010. I am running the project from VS2008.
i have installed SharePoint 2007 and VS2008 extension on my computer.i have created a
I am using VS2008. I have a project connect with a database and the
I have a .NET 2.0 windows forms app, which makes heavy use of the
I have a VS2005 project that contains a couple web service references. The project
I have an old MFC utility written with VS2008 project. We have used this

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.