Skip to content

What is the function of "nugetPackages" in .nx-dotnet.rc.json? #609

Answered by bcallaghan-et
Tungsten78 asked this question in Q&A
Discussion options

You must be logged in to vote

Nx has a "single version policy" by default to ensure that (in a JS workspace), all projects use the same versions of npm packages. We wanted to adopt a similar policy for .NET projects contained within an Nx workspace. However, .NET requires that all packages used by a given project must be listed in that project's .csproj file. The solution we reached was to create a separate file, .nx-dotnet.rc.json, which contains a full list of all packages installed in all projects, along with the version number of those packages. The first time you install a package via nx-dotnet, it asks for the version number and saves it to that file. On subsequent installs to other projects, nx-dotnet pulls the…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by AgentEnder
Comment options

You must be logged in to vote
2 replies
@AgentEnder
Comment options

@AgentEnder
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants