Dependabot-core: .NET: Updating NuGet packages through packages.config breaks project files (.csproj/.vbproj/etc)

Created on 2 Oct 2019  路  5Comments  路  Source: dependabot/dependabot-core

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

language-support Lnuget P1 bug 馃悶

Most helpful comment

We are also seeing this on our projects.

All 5 comments

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.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within seven days. Thank you for your contributions.

@stale this issue is still valid and breaking updates.

We are also seeing this on our projects.

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

https://github.com/ahwm/svn-manager/pull/34

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafaelrocha-hotmart picture rafaelrocha-hotmart  路  4Comments

bennycode picture bennycode  路  3Comments

LankyLou picture LankyLou  路  4Comments

ZebraFlesh picture ZebraFlesh  路  3Comments

christoferolaison picture christoferolaison  路  3Comments