Forum Visual Studio

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

After reinstalling VS, I get error The type name 'Widget' does not exist in the namespace 'Android'

AdreamAdream Member ✭✭
edited August 2020 in Visual Studio

After I reinstalled my Visual Studio 2019 Community Edition, my Xamarin.Forms project stopped working. Now I get a lot of simmilar errors like this :
The type or namespace name 'Util' does not exist in the namespace 'Android' , The type or namespace name 'Views' does not exist in the namespace 'Android' …..
A new project, for the same target API works fine. I already tried restoring nuget packages and cleaning solution. How could I fix it without migrating all my code ?

Answers

  • AnubhavRanjanAnubhavRanjan INXamarin Team Xamurai

    @Adream I would suggest to compare the .csproj files of both the Old and New Projects and check the differences.

  • jezhjezh Member, Xamarin Team Xamurai
    edited August 2020

    You can try to delete the bin folders and the obj folders and rebuild it. If that doesn’t work ,try restarting VS .

  • AdreamAdream Member ✭✭

    @AnubhavRanjan I don't see any major differences between them.

    @jezh I forgot to mention, that I already tried that with no luck.

  • AdreamAdream Member ✭✭

    Didn't find a real solution, so I used a workaround. I created a new project and moved all my code there, now it works.

  • jezhjezh Member, Xamarin Team Xamurai
    edited August 2020

    Congrats, creating a new project and moving all of the code there is also a common solution. Since you have resolved your issue, could you please mark this thread as answered? Thanks in advance.

Sign In or Register to comment.