RicoSuter/NuGetReferenceSwitcher

Error while attempting to switch reference to project

corliss opened this issue · 4 comments

I'm trying to switch a particular assembly, Xamarin.Forms.Platform.UAP, to a project, so that I can debug into it. The source for this assembly is part of a public github repo.

I followed these steps:

  1. Cloned the Xamarin.Forms repo at https://github.com/xamarin/Xamarin.Forms
  2. Built the Xamarin.Forms and Xamarin.Forms.Platform.UAP projects in the cloned solution.
  3. To my own solution, added the external Xamarin.Forms.Platform.UAP project. At this point this project is part of my solution as well as the Xamarin.Forms solution.
  4. Opened Nuget Reference Switcher in my solution, and edited the entry for Xamarin.Forms.Platform.UAP to point to the above project.

At this point, this error occurs:

This reference cannot be removed from the project because it is always referenced by the compiler.

Any idea what's going on?
Thanks!

I have the same problem. I use Visual Studio 2015 and I tried to switch a reference from an Universal Windows Class Library (uwp).

Greets

Hitting same error in VS2017 and using .Net 4.6.2 class libraries :(

Same here .Net 4.7.1. Is there any additional info I can provide to help you debug/resolve this situation?

I'm not using UWP like the others. My solution has only class libraries, console apps, winforms apps, and unit test projects.

I'm now fully focusing on DNT which also provides this functionality but only for the new sdk-style csprojs: https://github.com/RSuter/DNT#switch-to-projects

Ideally we would fix/implement all this there as it is more future proof...