.net - Is it possible to specify nuget local server source for individual solution? -


i wondering how specify nuget local server single solution don't want add on visual studio level. when push code bitbucket , wants bamboo use source nuget, want specify somewhere in solution.

nuget local source

the above link think proposing solution problem. have tried nuget.config file still using default nuget source. , not sure put nuget.targets file.

may might wrong where. can please guide me? possible or not. , should do. thanks.

you can specify nuget sources in nuget.config file. file part of solution , configuration used on build server not depend on whatever settings have in visual studio.

first step enable nuget package restore (which have). right-click on solution in solution explorer , select enable nuget package restore. add .nuget folder in solution , in folder find file nuget.config.

nuget solution folder

then need modify nuget.config file adding local nuget repository:

<?xml version="1.0" encoding="utf-8"?> <configuration>   <packagesources>     <add key="nuget official package source" value="https://nuget.org/api/v2/" />     <add key="local package source" value="http://server/nuget.server/nuget/" />   </packagesources>   <solution>     <add key="disablesourcecontrolintegration" value="true" />   </solution> </configuration> 

you need adjust value attribute of local package source point local nuget server.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -