Forum Visual Studio

How to fix a migration form packages.config to packageReference that went wrong ?

luk8luk8 Member

Hello,

I have migrated successfully my .iOS project from packages.config to packageReference and when I tried to do the same for the .Droid project, VS2019 said it was successful but something went wrong, VS2019 crashed and now I have a malfunctioning Droid project because of assembly references issues:

  • I have thousands of errors that appeared in the Error list (essentially "The type or namespace.... could not be found)
  • When I try to migrate again, it says "operation failed"
  • All references are gone, they are empty entities without any related path

The iOS project is ok, the "packages.config" file has disappeared and the references have path.
It's certainly not due to the fact that it's a Droid project.

I'm sure it's easy to fix, can someone help, Please ? :)

PS: I have the latest version of everything, just downloaded VS2019, Xamarin forms 4.6, all Nuget Packages up to date.




Best Answer

  • luk8luk8
    Accepted Answer

    Problem solved: I found an old backup and copied packages.config and project.csproj.
    Then I started the migration again and it worked fine.

    I tried to modify myself those two files but the amount unique NuGet packages listed there was so big that it was impossible to do it by hand.

Answers

  • luk8luk8 Member
    Accepted Answer

    Problem solved: I found an old backup and copied packages.config and project.csproj.
    Then I started the migration again and it worked fine.

    I tried to modify myself those two files but the amount unique NuGet packages listed there was so big that it was impossible to do it by hand.

Sign In or Register to comment.