Skip to content

Problems starting sample application with new VS17 project structure #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DevSnobo opened this issue Feb 26, 2020 · 0 comments
Open

Comments

@DevSnobo
Copy link

Hello there,

I have been trying for a while to get a simple GTK# + Xamarin.Forms app running, but am still failing to do so.

I'm running Arch Linux and Jetbrains Rider. The gtk-sharp package was installed via pacman and the libs are present.

I took the sample provided in this repo and noticed the old project structure, so I created a new .NET Core 3.1 App project in the solution. Then I added the Xamarin.Forms project, the NuGet packages (Xamarin.Forms, Xamarin.Forms.Platform.GTK) and also the gtk-sharp libs (from /usr/lib/mono/gtk-sharp-3.0; atk-sharp, cairo-sharp, gdk-sharp, gio-sharp, glib-sharp, gtk-dotnet, gtk-sharp, pango-sharp) as dependencies. I also copy over the existing Program.cs file.
At this point, everything needed should be added. So I go ahead and build&run.

The result is:
"Unhandled exception. System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method. Type: 'Xamarin.Forms.Platform.GTK.FormsWindow'. Assembly: 'Xamarin.Forms.Platform.GTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'."

I am an absolute newbie with regards to GTK# and Xamarin.Forms and would appreciate any help. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant