0

I have a project with a structure like this:

/MyProduct
    MyProduct.sln
    /Web
        Web.csproj
        Web.Something.csproj
        Web.sln

    /Other
        Other.csproj
        Other.Something.csproj
        Other.Something.Else.csproj
        Other.sln

So there is one "overall" solution (that basically has references to web.csproj, web.something.csproj, other.csproj etc.....

Then, in each of the dir, there is a solution to manage that particular set of projects

My problem is with nuget.

If I open (for example) Web.sln and build, it works as expected, downloading the packages etc... storing them at the same directory level as Web.sln (in packages folder)

However, if I open MyProduct.sln - it stores them at the root (in packages folder)

Am I missing a step?

What should I be doing in this scenario?

1 Answer 1

1

It sounds like your problem would be solved by explicitly specifying the repository path, as described in the NuGet Configuration Settings, for all the solutions in your project structure:

<config>
    <add key="repositorypath" value="C:\Temp" />
</config>

Allows you to install the NuGet packages in the specified folder, instead of the default "$(Solutiondir)\Packages" folder. This key can be added to the NuGet.config file manually or using the NuGet.exe Config -Set command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.