ipjohnson / Grace

Grace is a feature rich dependency injection container library
MIT License
337 stars 33 forks source link

Package install fails for Xamarin Android project in VS 2017 #73

Closed RandomEngy closed 7 years ago

RandomEngy commented 7 years ago

When trying to add Grace 6.0.0 to a Xamarin Android project in VS 2017, I get this error:

Failed to add reference. The package 'Grace' tried to add a framework reference to 'System.Collections' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance. Error HRESULT E_FAIL has been returned from a call to a COM component.

I was also getting this error in 5.1.0.

ipjohnson commented 7 years ago

Sorry about that I'll take a look at it this evening, I was trying to list only the dependencies the package needed and apparently didn't come up with a set that works for everything.

There shouldn't be anything that's not supported so it should just be a matter of picking the correct target and dependencies to publish with.

Just so I have another package to look at do you have any other nuget packages that are installing correctly? I've not worked with the Xamarin Android platform so it might be helpful to see a package that is happily installing.

RandomEngy commented 7 years ago

https://github.com/dsplaisted/PCLStorage https://www.nuget.org/packages/Xam.Plugin.Connectivity/

These are a couple that I use with Xamarin targets.

ipjohnson commented 7 years ago

Perfect thanks. I'm getting 2017 installed right now so I can test it out. Hopefully it's really just a matter of targeting MonoAndriod in the project.json file.

ipjohnson commented 7 years ago

Ok looks like it was much easier than I originally thought. The PCL profile 259 target was being picked up instead of the .net standard 1.0.

I've deleted the profile 259 target and released a beta to nuget. I was able to create a android project in VS 2017, added Grace, and was able to export and locate an instance.

RandomEngy commented 7 years ago

Looks like the new version works, thanks! Very impressed by the instant turnaround on these issues.

ipjohnson commented 7 years ago

Thanks I try and be responsive as I'm on the other end of things sometimes.

I'll probably roll out a 6.0.1 final release this weekend along side some performance tweaks for ASP.Net core support.