Bug 30711 - AppKit does not exist
Summary: AppKit does not exist
Status: NEEDINFO
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2015-06-03 07:13 UTC by sjoerd222888
Modified: 2015-06-05 12:58 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 30711 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:
NEEDINFO

Description sjoerd222888 2015-06-03 07:13:37 UTC
Creating new a project for MonoMac does create a project which does not compile. It yields the error for MainWindow and MainWindowController: 
The Type or namespace name 'AppKit' does not exist in ... do you miss an assembly reference?

I would expect the IDE to create a compilable project from the dialog.

Tested on Mac OS X 10.10.3 with Xamarin Studio 5.9.2 (Build 4)
Comment 1 Chris Hamons 2015-06-03 08:42:57 UTC
@sjoerd - Can you provide steps to reproduce?

When I create a MonoMac or Xamarin.Mac Classic application, I get a buildable project that references using MonoMac.AppKit;

When I create a Xamarin.Mac Unified project, I get a buildable project that references using AppKit;
Comment 2 sjoerd222888 2015-06-04 10:44:48 UTC
I cannot reproduce doing the following:

Start Xamarin Studio. Create new Solution. Create new project. Select Othe(Miscellaneous: MonoMac (Open Source)/Cocoa App (C#). 

But I can reproduce with:
Checkout the repo Xilium.CefGlue (bitbucket). Open Xamarin. Open the solution. Right-click on the solution and click Add New Project. Select again MonoMac (OpenSource) / Cocoa App (C#).
Now the build fails with the error: "The type or namespace name 'AppKit' does not exist ..."

So it happens on an existing solution. Would there be a reason for this to happen due to some solution settings? (I would not expect that)
Comment 3 Chris Hamons 2015-06-04 10:49:47 UTC
This type of issue is better handled on the forum, as it is a "why is this not working", not a "this is broken, and here is proof".

https://forums.xamarin.com/categories/mac

But to answer you question. The "raw" namesakes, like

using AppKit;
using Foundation;

are only in the Unified Xamarin.Mac projects. 

In the (unsupported) open source MonoMac bits and Xamarin.Mac Classic, it is

using MonoMac.AppKit;
using MonoMac.Foundation;
Comment 4 sjoerd222888 2015-06-04 11:34:26 UTC
I was not looking for an answer and your answer is completely unrelated. The IDE in fact creates the project with the correct using directives.

I wanted to report that if you add a MonoMac (OpenSource) project to an existing solution it will not create a compilable project which I would expect from the IDE.

Creating a project in an empty solution on the other hand gives you a compilable project.


I am sorry if I was not clear enough.
Comment 5 Chris Hamons 2015-06-05 12:58:17 UTC
@sjoerd I'm having trouble reproducing you issue. Could you attach a solution showing the issue.