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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:58:30+00:00 2026-05-26T01:58:30+00:00

I want to programatically get a project output directory in a Visual Studio macro.

  • 0

I want to programatically get a project output directory in a Visual Studio macro.
I managed to get a string of the path (through prj.ConfigurationManager.ActiveConfiguration.Properties and looking at property OutputDirectory) but this string may contain macros such as $(foo) where foo is defined in a property sheet or whatnot.

How do I resolve this output directory string to the ‘real’ directory?

  • 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-26T01:58:30+00:00Added an answer on May 26, 2026 at 1:58 am

    I wrote this function for my macros which searches for full absolute output path by substring.

    Function FindOutBinaryNameByExtension(ByVal prj As EnvDTE.Project, ByVal extName As String) As String
        FindOutBinaryNameByExtension = Nothing
    
        Dim cm As ConfigurationManager = prj.ConfigurationManager
        If cm IsNot Nothing Then
            Dim ac As Configuration = cm.ActiveConfiguration
            For Each grpOut In ac.OutputGroups
                If grpOut.DisplayName = "Primary output" Then
                    Dim lst As Array = grpOut.FileURLs
                    For i As Long = 0 To lst.Length - 1
                        Dim fileName As String = lst.GetValue(i)
                        If fileName.Contains(extName) Then
                            FindOutBinaryNameByExtension = fileName
                            Exit Function
                        End If
                    Next
                End If
            Next
        End If
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to get the full address of user programatically using c# how can
i want to adjust the volume programatically like Get/SetMasterVolume in vista and xp? using
I want to programatically get a Sensor 's name. Say the name of the
I've been using the macro from this blog entry for attaching the Visual Studio
I want to programatically create an NSTextView. How can I determine the correct frame
I want to programatically enable TCP connections on SQL Server. I believe we can
How do I do if I want to programatically generate a set of buttons
A longwinded question - please bear with me! I want to programatically create an
I have a Bitmap that I want to enlarge programatically to ~1.5x or 2x
For example I want to be able to programatically hit a line of code

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.