Need to update shared C# code using NuGet

Need to update shared C# code

We have four .NET MVC applications which use a shared C# file located in each of the four solutions at:

AppName.Web.Models.SharedClasses

and I am adding a new C# class.

I have yet to configure the NuGet package so it can be deployed across each solution and currently am using copy/paste to get the same code tested in each solution.

What can you tell me about the NuGet process?

Would I:

1) create the final source code in the shared project?
2) generate a NuGet package for those shared source files?
3) upload it to some server?
4) Using Visual Studio, opened for each target solution, update the NuGet containing the shared files?

Recompile each of four solutions and commit the updated code?

I am a bit unsure of this process.

Thanks.
newbiewebSr. Software EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
Are you hosting actually at NuGet.org, or are you setting up a private NuGet server? I believe NuGet.org open-sourced their server, but you'd have to read through their docs to figure out how to set it up.

Generally the process is to compile your code--preferably on a build server--to ensure that it works, and then package your code using the nuget -pack command. You can optionally package debug symbols as well. You publish the packaged NuGet to your hosting server, and then your consumers can update via Visual Studio (provided they have configured the NuGet server properly within their own Visual Studios).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
newbiewebSr. Software EngineerAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Document Management

From novice to tech pro — start learning today.