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

The Archive Base Latest Questions

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

I am developing a nuget package which will set up the current project to

  • 0

I am developing a nuget package which will set up the current project to use my company’s assembly versioning standard. I’ve got it doing everything I want (so far) smoothly apart from adding in a custom build step.

Historically this has been done manually by editing the .csproj file directly and adding in a couple of new tags into the xml. These are …

  • Property Group
  • Target

It actually adds them in successfully, but i’ve done it by editing the xml rather than via the EnvDTE object in the $project parameter in install.ps1. But I get a message popping up asking my if I want to discard my changes.

I’ve added $project.Save() to my script just before I make the changes and that gets rid of the popup, and I just get the one telling me the project has changed and asking me if I want to reload it. Which is better, but still not quite perfect.

Is there a better way to do this?

  • 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-23T13:17:07+00:00Added an answer on May 23, 2026 at 1:17 pm

    You can also use the NuGetPowerTools package written by David Fowler (NuGet lead developer).

    Install-Package NuGetPowerTools
    

    Add it as a dependency to your package, then in the install.ps1 script, you can call:

    Add-Import "\Path\To\Import.targets" $project.ProjectName
    Set-MSBuildProperty "MyPropertyName" "MyPropertyValue" $project.ProjectName
    
    $value = Get-MSBuildProperty "MyPropertyName" $project.ProjectName
    

    Check out the code at https://github.com/davidfowl/NuGetPowerTools for more info.

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

Sidebar

Related Questions

Developing a Sencha Touch MVC app that pulls data from json store (thats set
Developing an app that people pay a monthly subscription to use. They can pay
Developing a chrome extension using javascript is one of my university projects. I don't
Developing an MVC application, i now need to have test other browser versions. Installed
Developing In: c# winforms without any Database Connections Description: In my DataGridView, columns were
Developing an interface generic I wished to declare a constructor in an interface but
Developing locally in Visual Studio 2010 my page looks great. When I deploy to
Developing an iPad PDF-Reader we decided to prepare high-res images of rendering intensive pages
Developing environment: GNU GCC (g++) 4.1.2 While I'm trying to investigate how to increase

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.