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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:45:17+00:00 2026-05-25T13:45:17+00:00

I created a MSBuild script for our CI process and in this script I

  • 0

I created a MSBuild script for our CI process and in this script I use a MSBuild task to compile the solution:

<PropertyGroup>
    <MyOutPath>Output</MyOutPath>
</PropertyGroup>

<MSBuild
    Projects="MySolution.sln"
    Targets="Clean;Rebuild"
    Properties="OutputPath=$(MyOutPath)\%24(AssemblyName)">
</MSBuild>

I want the c# project files to use an output path like

  • Output\MyAssemblyName1 for the project MyAssemblyName1
  • Output\MyAssemblyName2 for the project MyAssemblyName2

The AssemblyName property is from the C# project file and I want it to be expanded in the OutputPath property when building the project.

Right now, %24(AssemblyName) just produce Output\$(AssemblyName) on the filesystem which is not what I want.

Not surprisingly, using $(AssemblyName) expands to nothing in the “parent” MSBuild file.

Is there any way to defer the resolution of the AssemblyName property later in the target project file?

Also, I do not want to modify the .csproj file as I want the least impact from the CI system.

  • 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-25T13:45:18+00:00Added an answer on May 25, 2026 at 1:45 pm

    You could import the .csproj project file directly into your MSBuild script using the Import element. This way you could reference the AssemblyName property directly:

    <Import Project="MyProject.csproj" />
    <Message Text="The assembly name is $(AssemblyName)" />
    

    If you need to import the contents of a .sln solution file, first you’ll have to convert it to an MSBuild project file by setting the MSBuildEmitSolution environment variable to 1 and run MSBuild on the solution file. This will generate a MySolution.sln.proj file, which you can then import into your script like described before:

    <SetEnv Name="MSBuildEmitSolution" Value="1" />
    <MSBuild Projects="MySolution.sln" Targets="Build" />
    <Import Project="MySolution.sln.proj" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my Ncover task portion in my MSBuild script <UsingTask TaskName=NCoverExplorer.MSBuildTasks.NCover AssemblyFile=$(Libraries)\NCoverExplorer.MSBuildTasks.dll/> <Target
Since I started using MSBuild for our projects, I've created several .proj scripts that
I have created an MSBuild tasks for building my projects, but for various reasons
I have created a task for MSBuild that is to be used by developers
There is a MSBuild script, that includes number if Delphi and C# projects, unit
I am attempting to write a build script for our source tree. This tree
I have a very odd issue, where I've created a custom MSBuild task that
I am trying to create a msbuild script that will compile and place a
I have a project with this in its MSBuild script: <Target Name=AfterBuild> <GenerateBootstrapper ApplicationFile=MyApp.msi
I have created a msbuild file which will build a solution file(NOTE: not a

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.