question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Moving Dependencies to csproj is a bad idea

See original GitHub issue

I’ve seen this blog entry (https://blogs.msdn.microsoft.com/dotnet/2016/10/19/net-core-tooling-in-visual-studio-15) that details moving the dependencies to the XML inside of csproj and I think this is a really bad idea. I am for moving most of what is inside project.json to csproj, but the great experience of editing the project.json for dependencies is going to slow people down, even if you do support intellisense. It’s just going to push people to use the PowerShell extensions or the VS Nuget UI both of which are a big step back.

This means we’re going from the simple and sublime:

"Microsoft.AspNetCore.Mvc": "1.0.0"

to:

 <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.0" />

This is even a step back from the XML file from prior versions since the csproj has to be reloaded to make these changes. Please reconsider this.

My suggestion is to keep the dependencies as a nuget.json or packages.json instead.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:57
  • Comments:29 (15 by maintainers)

github_iconTop GitHub Comments

11reactions
bricelamcommented, Oct 20, 2016

Personally, I’m happy to see NuGet finally become a first-class citizen in the .NET project/build system. The real issue is that MSBuild needs to support additional file formats besides just XML…

5reactions
davkeancommented, May 2, 2018

Sorry folks, we have no intention of moving back to project.json. PackageReference is here is to stay.

For those using the new bits, having <PackageReference/> as items is quite powerful. Here’s a few of the things you can do with them:

Share package references across a solution Condition them Unify package versions across a solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Best way to maintain .NET project dependencies and ...
If the choice of the NuGet server is a must the easiest way to do it it is to use common output directory...
Read more >
Dependency Management in Visual Studio: NuGet and Beyond
In this post, we will be looking at how to best manage dependencies for your .NET projects using Visual Studio and NuGet (the...
Read more >
Managing Dependencies in .NET: .csproj, .packages.config ...
Get an overview of the artifacts involved in .NET dependency management, how they interact, and how to use them.
Read more >
Upgrading an existing .NET project files to the lean new ...
It's useful to do this because, frankly, things go wrong and it's not pretty! Then its called (unfortunately) with another command "csproj-to- ...
Read more >
Introducing Central Package Management - The NuGet Blog
Central Package Management. Dependency management is a core feature of NuGet. Managing dependencies for a single project can be easy.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found