0

My shared project has no packages.config, so where is it storing the packages that it uses?

Also, when I edit references, the tabs are empty - I can't select anything.

What's going on here?

Ian Warburton
  • 15,170
  • 23
  • 107
  • 189
  • 2
    Shared projects have no direct references themselves (packages, assembly references, etc..), the project that "references" them have the external packages, assembly references, etc.. So need Json support, add Newtonsoft to **all** the project(s) that includes the shared project, and now you can use Newtonsoft within your shared code. – SushiHangover May 05 '18 at 16:33

1 Answers1

2

Shared Projects let you write common code that is referenced by a number of different application projects. The code is compiled as part of each referencing project and can include compiler directives to help incorporate platform-specific functionality into the shared code base.

Source: official documentation where you could find all the details.
Beside that there are few related thread on SO, like this one.

P.S.: Official Xamarin documentation nicely covering the code sharing options.

EvZ
  • 11,889
  • 4
  • 38
  • 76
  • How do I reference Mono.Android without a version range? – Ian Warburton May 05 '18 at 16:33
  • So why doesn't ____ANDROID____ compiler directive work in my shared project if it's not a proper project? – Ian Warburton May 05 '18 at 16:47
  • What do you mean by not working? Please check https://learn.microsoft.com/en-us/xamarin/cross-platform/app-fundamentals/building-cross-platform-applications/platform-divergence-abstraction-divergent-implementation#android – EvZ May 05 '18 at 18:32