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 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

After developing mini project with WCF duplex (Chat Service | Sms Service), I got
I´m developing a very memory-consuming app and want to use the largeHeap-Tag, which should
Developing server side code i finally got my eyes X-crossed trying to write -
When developing whether its Web or Desktop at which point should a developer switch
When developing a new web based application which version of html should you aim
Developing a project of mine I realize I have a need for some level
Developing a .net library based on an industry standard. The standard includes data structures
Developing an iPad website I tried to use the CSS property overflow: auto to
Developing for WM 6, I call CreateWindow with hWndParent set to the window I
Developing a bridge to use a cms with MongoDB I use a storage key,

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.