nuget


Creating Multiple Nuget Packages from a Visual Studio Solution


I have a Visual Studio 2015 Solution which contains multiple projects. Some of these projects reference each other. Example
Solution
Project A
Project B - references Project A
On teamcity, I want to create nuget packages for each of these projects, such that when Nuget is generating a package from Project B, I want it to be aware that Project A has a Nuget package and reference that Nuget package instead of having to use the -IncludeReferencedProjects flag.
Is this possible? If yes, how?
Using VS 2017 (or the dotnet cli tooling - labelled ".net core SDK") you can build libraries using the new sdk-based csproj tooling that have exactly that behaviour: Each project will produce a separate NuGet package and project references will be replaced with NuGet dependencies.
To do that, use the .NET Standard Library project template (or dotnet new lib on the commandline) - if you want to build your libraries for the .NET Framework, change the content of the <TargetFramework>element in the csproj file from netstandard1.4 to e.g. net461 (there just isn't a .NET Framework library template (yet?) that uses the new project system / tooling).
To build nuget packages you then use dotnet pack or msbuild /t:Packin your CI build (there is a TeamCity plugin for building with the .net core tools as well. See https://blog.jetbrains.com/teamcity/2016/11/teamcity-dotnet-core/).

Related Links

FAKE Nuget packaging creates file as ReadOnly
How to delete package in monodevelop, if it is impossible to restore it?
Visual Studio 2013 - NuGet loads Restsharp 105.0 with Twilio library. Twilio is dependent on 104.4
How to use nuget with Visual Studio for phpproj type project
Creating a NuGet package programatically
Deciding which referenced assemblies should be added to frameworkAssemblies
Nuget restore on monodevelop Ubuntu - references seem to not work?
nuget: “The replacement token 'id' has no value”
Xamarin NuGet package constraints do not appear to be working
Loading a NuGet assembly in T4 Template
Nuget server sometimes not found package
Updating Pre-release dependencies using nuget
What is the correct place for Nuget Change Log specification?
Nuget Dependencies not getting installed
Nuget fails to install specific version
Visual Studio checks out all projects file after enabling of the nuget package restore

Categories

HOME
uml
developer-tools
google-spreadsheet
ms-access-2016
tivoli
soa
pyqt4
g++
project-intu
datastage
jsonpath
stellar.js
scrolltop
heat
forgot-password
html5-appcache
foreign-keys
symfony-console
sigma.js
charles
selinux
cgbitmapcontext
data.stackexchange.com
moses
slidetoggle
stackexchange
android-maps
linked-data
browser-sync
uitapgesturerecognizer
paragraph
sql-server-2000
database-comparison
clickjacking
yowsup
reactivekit
connection-pool
opensmpp
news
datacachefactory
flask-login
vugen
reindex
java-bytecode-asm
modelsim
webjars
jodd
hclust
shopping
http-status-code-401
jparsec
crouton-os
state-restoration
tfs-workitem
qt5.2
xenomai
include-guards
google-books
extjs-grid
toolkit
iced-coffeescript
wso2greg
sha512
google-refine
snackbar
zend-currency
cakephp-2.7
filesplitting
contrast
human-computer-interface
universal-image-loader
verold
winginx
tinyxml
syndicationfeed
ie8-compatibility-mode
windows-phone-8-sdk
cnf
insert-id
fb.ui
nokia-s40
iboutlet
usertype
hibernateexception
box2d-iphone
htdocs
creole
clrstoredprocedure
presentation-layer
tabpanel
django-piston
echo3
glui
dojo-dnd
wcf-proxy

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile