Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

Edited Issue: "Nuget pack" ignores dependencies from packages.config [3097]

$
0
0
Assumption:

* There is a Visual Studio project (.csproj) without related solution (.sln) yet

If there isn't a packages folder in the "top-level" folder of the .csproj file folder, "Nuget pack" does not recognize the dependencies defined in the package.config next to a .csproj file.

To overcome this issue, you can place an empty solution (.sln) and a nuget.config (containing the path of the packages folder) on the top-level folder of the .csproj folder.

__Example:__

Assume you have the folder structure:

* MyProjects\MyProject\MyProject.csproj
* MyProjects\MyProject\packages.config

In order to make "nuget pack" recognize the dependencies defined in packages.config you have to place the following files in the MyProjects folder, otherwise it won't work:

* MyProjects\MyEmpty.sln
* MyProjects\nuget.config (containing path of packages folder)

So, the question is why is there this empty .sln or even the nuget.config with the path to the packages folder necessary? The packages.config next to the .csproj file should be totally sufficient for "nuget pack" to add the dependencies.

Viewing all articles
Browse latest Browse all 7612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>