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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:16:11+00:00 2026-06-10T22:16:11+00:00

I have a solution with a number of projects. The main project’s assembly’s version

  • 0

I have a solution with a number of projects.

The main project’s assembly’s version is inspected in a post-build event and the release notes associated with that version are extracted from Trac RSS and stored as an XML file to be shipped with the application. This is done in a post-build event.

The main assembly’s project’s post-build event:

Powershell -File "$(SolutionDir)scripts\makereleasenotes.ps1" $(TargetPath) $(ProjectDir)

This works fine in VS.

When we build deployments, however, a number of other steps happen and so there is a command-line msbuild which is run from a double-click which does the build and packages up a deployment.

When run from this process, the post-build step doesn’t appear to be running.

This is the command script we use:

set app_main=%CD%
msbuild app.msbuild /target:Release;Cleanup

The app.msbuild has a target which then includes other targets:

<Target Name="Release" DependsOnTargets="CreateDir;BuildRelease;CopyFiles"/>

and:

<Target Name="BuildRelease" > 

    <MSBuild Projects="App.Web.Application.sln" Properties="Platform=$(Platform);Configuration=Release; 
             OutDir=$(ReleaseDir)\$(DTResult)\$(ReleaseConfiguration)\" 
             Targets="Clean;Rebuild"> 
             <Output ItemName ="OutputFiles" TaskParameter="TargetOutputs"/>

    </MSBuild>

    etc.

So you can see that our external msbuild script delegates to the solution, and there are no individual projects being compiled in our build.

Is a subordinate project’s post-build script supposed to run when a solution is set as a target in an msbuild script?

If so, what is stopping mine from running?

If not, I’m assuming I will have to run it separately, and provide equivalent parameters for the project-level macros (which the powershell script is using to inspect the assembly and write out the release notes XML)?

  • 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-10T22:16:13+00:00Added an answer on June 10, 2026 at 10:16 pm

    The problem was caused by spaces in the paths of the builds and the macros (specifically $ProjectDir which ends in a ). The build script set the path to include spaces of the form “yyyy MM dd HH-mm”. This the parameters to the Powershell were invalid when spearated by those spaces.

    You cannot just add double quotes to the parameters in the post-build, because the $(ProjectDir) marco expands to DRIVE:\something\something\ and when you put “” around this, you just end up with “DRIVE:\something\something\” which actually expands the trailing \” to ” instead of \ – which completely messes it up.

    Ended up just removing the spaces so that the parameters were whole and did not need to figure out how to get the quotes working in the post-build script.

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

Sidebar

Related Questions

In Visual Studio 2008, I have a solution with a number of projects. Each
I have a VS solution containing several projects. While debugging a particular project all
I have a solution with a number of projects in.. One of these projects
We have a Visual Studio 2008 solution with a large number of projects in
I have a VC2010 C# Solution, with a number of projects in it. So
I have a solution with multiple projects and a website. On each project I
I have a solution with a number of libraries + web site on folder.
I am trying to find number of unique characters in a String. Solution have
I have a solution file with has more than 30 projects in it. Different
I have a Solution called Framework which is a C# assembly for my business

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.