RicoSuter / NuGetReferenceSwitcher

Visual Studio extension to switch between NuGet and project references.
http://nugetreferenceswitcher.org
Microsoft Public License
208 stars 69 forks source link

Error while attempting to switch reference to project #22

Open corliss opened 7 years ago

corliss commented 7 years ago

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!

NF-Dusty commented 7 years ago

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

iiq374 commented 6 years ago

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

LorneCash commented 5 years ago

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.

RicoSuter commented 5 years ago

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...