Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET: Updating NuGet packages through packages.config breaks project files (.csproj/.vbproj/etc) #1422

Open
skolima opened this issue Oct 2, 2019 · 6 comments
Labels
F: configuration-file F: language-support Issues specific to a particular language or ecosystem; may be paired with an L: label. L: dotnet:nuget NuGet packages via nuget or dotnet T: bug 🐞 Something isn't working

Comments

@skolima
Copy link

skolima commented Oct 2, 2019

In "legacy" .NET Classic Framework, using NuGet reference format packages.config, NuGet will automatically update the .csproj files to import .props files included in the package. Dependabot does not follow this behaviour currently, leading to broken imports - the import is left as it was, pointing to the previous version of the package.

Sample package using this behaviour: https://www.nuget.org/packages/Microsoft.Net.Compilers

image

Sample diff when upgrading via Visual Studio:

image

Longer explanation how the .props files are handled - on Stack Overflow

relates to #541

@skolima skolima changed the title .NET: Updating Microsoft.Net.Compilers through packages.config skips updating projects .NET: Updating NuGet packages through packages.config skips updating projects Oct 2, 2019
@skolima
Copy link
Author

skolima commented Oct 2, 2019

I've just realised this is more serious: the updated for projects using packages.config are currently completely broken. This is because those projects have a <Reference> with <HintPath> in the project file that needs to be updated at the same time - and right now Dependabot doesn't do this.

See the sample diff how it should look:
image

Dependabot only generates the second part, ignoring the project file.

@skolima skolima changed the title .NET: Updating NuGet packages through packages.config skips updating projects .NET: Updating NuGet packages through packages.config breaks project files (.csproj/.vbproj/etc) Oct 2, 2019
@feelepxyz feelepxyz added T: feature-request Requests for new features T: bug 🐞 Something isn't working and removed T: feature-request Requests for new features labels Oct 23, 2019
@rebelagentm rebelagentm added the L: dotnet:nuget NuGet packages via nuget or dotnet label Oct 30, 2019
@stale stale bot added the stale label Dec 29, 2019
@skolima

This comment was marked as outdated.

@zlepper
Copy link

zlepper commented Feb 3, 2020

We are also seeing this on our projects.

@infin8x infin8x added F: language-support Issues specific to a particular language or ecosystem; may be paired with an L: label. P1 labels Jul 20, 2020
@ahwm
Copy link

ahwm commented Aug 19, 2020

Here's an example where I ran into this. I keep having to add my own manual commits to make the build work

ahwm/svn-manager#34

ahwm added a commit to ahwm/svn-manager that referenced this issue Aug 21, 2020
@asciimike asciimike removed the P1 label May 14, 2021
@shuebner
Copy link

shuebner commented Oct 20, 2021

I do not think they will fix this. Migrating to the SDK style project format (independent of target framework) should be a workable solution, though. Or use nukeeper.

@xvitaly
Copy link

xvitaly commented Jul 23, 2022

Reported in 2019 and still broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: configuration-file F: language-support Issues specific to a particular language or ecosystem; may be paired with an L: label. L: dotnet:nuget NuGet packages via nuget or dotnet T: bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants