Bug 30631 - Unable to build project after adding GTK# widget to non-GTK# project
Summary: Unable to build project after adding GTK# widget to non-GTK# project
Status: NEW
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: GTK# Designer ()
Version: Trunk
Hardware: PC All
: Low minor
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-06-01 09:29 UTC by Matt Ward
Modified: 2015-06-01 09:29 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 30631 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Matt Ward 2015-06-01 09:29:36 UTC
Note that you need Xamarin Studio 6.0.0.748 (master branch) or later to repro this otherwise you will run into bug #30457.

1) Create new C# console app.
2) Right click project and select Add - New File to open New File dialog.
3) Select Gtk - Widget. Enter a name for the widget and select OK.
4) Build the project.

Expected result:

Build succeeds.

Actual result:

3 build errors due to missing assembly references.

1) Widget.cs(6,23,6,29): error CS0012: The type 'GLib.InitiallyUnowned' is defined in an assembly that is not referenced. You must add a reference to assembly 'glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f'.
2) Widget.cs(6,23,6,29): error CS0012: The type 'Atk.Implementor' is defined in an assembly that is not referenced. You must add a reference to assembly 'atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f'.
3) Widget.cs(6,23,6,29): error CS0012: The type 'GLib.IWrapper' is defined in an assembly that is not referenced. You must add a reference to assembly 'glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f'.

References to gtk-sharp and gdk-sharp are added to the C# console project when adding a GTK# file to it. So we should be able to fix this bug also adding glib-sharp and atk-sharp at the same time.