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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:32:51+00:00 2026-05-30T16:32:51+00:00

I have an automated build process that I’d like to extend so I can

  • 0

I have an automated build process that I’d like to extend so I can build the libraries I am distributing via NuGet. Currently, running nuget.exe to create the packages is a manual operation.

What is the best way to setup VS 2010 so that my NuGet package (*.nupkg) file is the end result of a “Release” build?

Keep in mind that I have other files (content and tools) for some of the packages. And, in most cases, I have multiple projects merged into a single NuGet package to support .NET 4, Silveright and Phone 7.

(I should clarify that the existing “automated” process is a simple batch-file runner that builds a solution using the command line.)

UPDATE

I want to refresh this discussion because the issue has not been resolved. While the link @pravin supplied is helpful, it doesn’t address the fact that I have multiple projects in a single package as well as other contents like PowerShell scripts, configuration and source code transformations, etc.

The best example I can use is an assembly that has both a .NET 4 and Silverlight 5 version. These are distributed in the same package. I cannot use a post-build event to create the package because the package is dependent upon TWO projects.

  • 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-30T16:32:52+00:00Added an answer on May 30, 2026 at 4:32 pm

    One thing that might work well is to create a custom MSBuild .proj file. You could define a couple targets in the custom script, the first to execute the compile on your solution. A second target to execute following compilation would use the EXEC MSBuild task to invoke the nuget.exe command line utility. Then, you update your batch file-runner to execute the msbuild executable supplying your custom project file as an argument. You might already be using MSBuild in your batch script, which in that case it would simply be a matter of argument swapping. You could include your custom proj file in the solution items of your solution. If you did that you could easily add an external tool reference in Visual Studio to quickly test out your custom script to make sure it was building and producing the package like you hope.

    Sample MSBuild

    You can use this as a starting place:

    <Project DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
        <PropertyGroup>
          <SolutionFile></SolutionFile>
          <NugetExecutable>C:\PathToNuget\nuget.exe</NugetExecutable>
          <NuspecFile></NuspecFile>
        </PropertyGroup>
    
        <Target Name = "Compile">
            <MSBuild Projects="$(SolutionFile)" Properties="Configuration=Release" />
        </Target>
    
        <Target Name = "Package">
        <!-- You could use the MSBuild Copy task here to move the compiled code into
               a structure that fits your desired package format -->
          <Exec Command="&quot;$(NugetExecutable)&quot; pack $(NuspecFile)" />
        </Target>
    </Project>
    

    You’d then call this like:

    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" Build.proj /p:SolutionFile=PathToSolution\App.sln;NuspecFile=foo.nuspec
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We would like to have our TFS automated CI build and test process use
I have an automated build process that runs when no one in is in
I have a automated (Visual Build) build process that runs: A set of automated
I have an automated test running on my program that generates some large MPG
I have an automated deployment process for a Java app where currently I'm building
We have some nightly build machines that have the cuda libraries installed, but which
I have prior experience in build a automatic build process for .NET & Delphi
In our current database development evironment we have automated build procceses check all the
Our project is held in a SourceSafe database. We have an automated build, which
I have ASP.NET web pages for which I want to build automated tests (using

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.