1

I have a package "ABC 1.0" and trying to update it to ABC 2.0., The reference is being updated properly on the "packages.config" file., But this is not updating the .csProject file.

....\packages\ABCDAssembly.dll True

1 Answer 1

1

But this is not updating the .csProject file.

It was not that obvious from your question that NuGet not update the .csproj file. And How did you update your project? what is the version of your NuGet? Since there is no detail information, I will provide you what I have know for this question, hope this can give you some help.

  • How did you update your project?

    If you just edit the packages.config file to update the NuGet package from 1.0 to 2.0. It will not cause Visual Studio to make any changes to your project, just restore package. Also NuGet restore does not modify your project. NuGet restore just downloads the NuGet packages and makes them available for your project.

    Instead of editing the packages.config file, I suggest you can use the NuGet Package Manager in Visual Studio, or the Package Management Console, to update the NuGet package in the projects required.

    Or you can run an Update-Package -reinstall to force the NuGet packages to be uninstalled and installed again in the projects. That will fix the assembly references.

  • What is the version of your NuGet? If you are using NuGet 3.2, NuGet will not update the .csproj references. You can refer to the Issue 1483 for detail. So please update NuGet.

If I understand you incorrectly, please share us more detail info, or you can give us some screenshots.

Sign up to request clarification or add additional context in comments.

2 Comments

Nuget Version:- Nuget Package Manager - 3.4.4 How did you update your project:- I am following the below method to update the package manager. 1. Right click the project => Manage Nuget Package => Update or Browse => On the right section window, the package will be displayed., Selected a right version and Clicked the Install ( or update ) It is successfully updating the details in packages.config file, but this is not updating the details in the xxxx.csProj file. But this has to update the reference in the .csProj file.
@Kam, OK, Thanks for your reply. What does you mean "but this is not updating the details in the xxxx.csProj file. "? Does you mean that the version of Reference Include not update or the HintPath not update? Besides, is this package custom? if not, could you please share us the ID and version of this package to us so that we could reproduce this issue? Thanks.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.