jfversluis / FilePicker-Plugin-for-Xamarin-and-Windows

FilePicker Plugin for Xamarin and Windows
MIT License
157 stars 80 forks source link

Under WPF the FilePicker can't be found #122

Closed ChristianKleineidam closed 5 years ago

ChristianKleineidam commented 5 years ago

In my App the FilePicker works in UWP/Android/iOS/macOS. When I click on the button for the FilePicker on XPF I get the error:

Exception thrown: 'System.IO.FileNotFoundException' in MyProject.dll
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in MyProject.dll
Could not load file or assembly 'Plugin.FilePicker, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Does the XPF plugin need any special setup? Does it work for other people?

Specifications

vividos commented 5 years ago

I tried it out with the sample project, but before the change to use multi-targeting. Can you also reproduce the error with the sample project? What .NET framework does the WPF project target?

ChristianKleineidam commented 5 years ago

I tested with the 4.6.1 and 4.6.2 .NET frameworks. I created a sample project that compiles WPF and gets a System.NotImplementedException.

ChristianKleineidam commented 5 years ago

When I try to build the sample project in the FilePicker project I get the error:


Severity    Code    Description Project File    Line    Suppression State
Error   CS2001  Source file 'C:\Users\Christian\source\repos\FilePicker-Plugin-for-Xamarin-and-Windows-1\samples\Plugin.FilePicker.Sample.Forms\WPF\Properties\Resources.Designer.cs' could not be found.   Plugin.FilePicker.Sample.Forms.WPF  C:\Users\Christian\source\repos\FilePicker-Plugin-for-Xamarin-and-Windows-1\samples\Plugin.FilePicker.Sample.Forms\WPF\CSC  1   Active
vividos commented 5 years ago

Found the initial error; there was no .NET Framework assembly, so under WPF the ".NET Standard" version was used, which has no implementation. Will be fixed when #124 is merged.

ChristianKleineidam commented 5 years ago

Great, it now works for me.

vividos commented 5 years ago

Thanks for verifying!