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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:47:58+00:00 2026-06-04T20:47:58+00:00

Earlier this week I posted a question about how to effectively share files amongst

  • 0

Earlier this week I posted a question about how to effectively share files amongst multiple web applications within a solution. NuGet was offered as a solution and after some time I was able to implement a solution, but I have one issue that is currently blocking me from finishing it.

At this point I have two web application projects:

  1. Project.Common.Presentations
  2. Project.Website.Presentations

Each time the Project.Common.Presentations project is build, a new NuGet package with a higher version is created. This package is used in my main web project Project.Website.Presentations. Initially I add the project.common.presentations NuGet package to this project through the GUI. Right after that I setup a pre-build eveny where I do a NuGet update from the command line to pull in the latest version of the Project.Common.Presentations package.

But somehow using NuGet update in the command line adds a reference to my project using a location that’s not actually on disk, leading to this issue:

Could not resolve this reference. Could not locate the assembly “Project.Common.Presentations”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

This is how I set up the structure:

  • I generated a NuSpec file for my Project.Common.Presentations project using the .csproj file.
  • As a post-build event in my Project.Common.Presentations, I use: $(ProjectDir)nuget.exe pack -sym $(ProjectPath). This builds a new NuGet package every time the project is build. Before this build-event is executed I use a script to delete the old NuGet packages.
  • As a pre-build event in my Project.Website.Presentations I use: $(ProjectDir)NuGet.exe update $(ProjectDir)packages.config

The first rebuild all is run, my .csproj file is updated with a dll reference to my package, all is fine and good. The second time I run rebuild all, the .csproj file is updated again, but it references a different folder with a newer version of the package but the folder somehow is not on the drive. When I use the GUI “Manage NuGet packages” to update the NuGet package this problem does not occur, everything works fine.

Removing the pre-build event, and updating the package manually works fine. But having to do something manually each time you build is not something I enjoy. Using the Package Manager Console to uninstall and install the package also works fine. Is there a way to incorporate Package Manager Console action into a pre-build event? Thanks in advance for the information.

  • 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-04T20:48:00+00:00Added an answer on June 4, 2026 at 8:48 pm

    The basic idea of using NuGet for something like this is to share the relatively static (seldom changing) artifacts among all the projects in your solution. I personally used NuGet to also include a common master page – all my files went in the NuGet Content folder.

    All my common functionality went in library projects, which obviated the need for build scripts of any kind.

    Ref: Multiple web applications projects within a visual studio solution

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

Sidebar

Related Questions

I posted a question about this earlier, but I have more information now and
Earlier this week I ask a question about filtering out duplicate values in sequence
This question relates to this question which I asked earlier this week. The answer
Ok, I asked about this very error earlier this week and had some very
I posted a thread about this earlier and have made some progress but now
I asked a question earlier this week and i got this statement as the
I use token authentication in Devise (I think; using omniauth-facebook ). Earlier this week,
Inspired by this earlier stack overflow question I have been considering how to randomly
I posted this earlier on wordpress.stackexchange.com. However, never got a reply. Hence, trying my
I had posted this earlier on Stack Overflow, but couldn't get a positive result.

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.