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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:41:33+00:00 2026-05-28T01:41:33+00:00

I have this command in a post build event: if $(ConfigurationName) == Release $(SolutionDir)Tools\NuGet.exe

  • 0

I have this command in a post build event:

if $(ConfigurationName) == Release “$(SolutionDir)Tools\NuGet.exe” pack “$(ProjectDir)MyProject.Contracts.nuspec”

This works just fine when I compile in Visual Studio. But when my build runs this it fails. That is because someone somewhere thought it was a good idea to have builds on TFS not run the same as a build on a dev machine.

In this case it is the fact that all output files are grouped into a common “Binaries” folder.

So, my question is this:

Is there a property I can use (instead of ProjectDir) that will allow me to reference the output location of the build?

Meaning that it will point to the binaries folder when running a TFS build and point to my normal output when doing a normal Visual Studio based build.

I tried $(OutDir) but it equated to “bin\Release\”
UPDATE: I tried to use $(OutDir) but Visual Studio fails with the partial path it provides. Is there something that could be used with $(OutDir) to give a full path for both Visual Studio and TFS builds?

In case it matters:

  • TFS version is TFS 2010 (Latest releases installed)
  • Build Machine and Dev Machine are both running Windows 7 and VS 2010 Ulitmate
  • 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-28T01:41:33+00:00Added an answer on May 28, 2026 at 1:41 am

    $(OutDir) should resolve to your bin\debug or bin\release etc for local builds, on the build server this will be resolved to the Binaries folder.

    So yes, $(OutDir) should be the right one to use.

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

Sidebar

Related Questions

I have a project with a post build event: copy $(ProjectDir)DbVerse\Lunaverse.DbVerse.*.exe $(TargetDir) It works
This command in the Visual Studio 2010 Post-build event for %f in ($(ProjectDir)$(OutDir)*.dll) do
I have a project that has a post-build event that xcopies a DLLs to
I have the following as my post-build event in a C# .NET 4.0 project
I know you can have post build command line events... executing a batch file,
In VS 2010, I have a post-build event copying project assemblies into a common
I have this command that I run everyday via cron: find /home/get/public_html/videos -daystart -maxdepth
I have this command that I run every 24 hours currently. find /var/www/html/audio -daystart
I have this command in a Rails controller open(source) { |s| content = s.read
So I have this code that takes care of command acknowledgment from remote computers,

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.