sameerkapps / SecureStorage

118 stars 32 forks source link

Can't Add to Project #19

Closed dgerding closed 7 years ago

dgerding commented 7 years ago

Hi, I have Xamarin Forms project using .net Standard 1.4 target.

I can add SecureStorage via Nuget but the Xamarin Forms project throws intellisense and compile time errors complaining it can't find/see SecureStorage. For example, either of the following lines don't work:

using SecureStorage;

SecureStorage.Current.HasKey("ApplicationId") ? "Y" : "N";

With responses like: Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'SecureStorage' could not be found (are you missing a using directive or an assembly reference?) Wordbahn.FormsApp C:\Wordbahn\Wordbahn.FormsApp\App.xaml.cs 26 Active

I already had the Microsoft.NETCore.Portable.Compatibility project added and other PCL nugets work correctly.

I then tried download and building the repo and added the different assemblies to the respective Xamarin Forms and target platform projects. Same problem. The xamarin forms app doesn't see the SecureStorage types.

Any ideas?

Thanks, Dave Gerding

dgerding commented 7 years ago

Oops - never mind. Somewhere in the documentation I saw using SecureStorage. I think maybe the sample code?

My bad code should have been:

using Plugin.SecureStorage;

CrossSecureStorage.Current.HasKey("ApplicationId")? "Y" : "N";

Thanks!