Bug 12304 - Can't do code completion in C# when types are defined in F#
Summary: Can't do code completion in C# when types are defined in F#
Status: RESOLVED UPSTREAM
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: 4.0.9 (from master)
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-05-20 11:41 UTC by James Moore
Modified: 2015-01-14 23:48 UTC (History)
3 users (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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED UPSTREAM

Description James Moore 2013-05-20 11:41:53 UTC
If you have an solution with an F# iOS library project and a C# iOS project, the C# editor doesn't offer any types defined in F# for code completion.  The code will compile and run.
Comment 1 James Moore 2013-05-20 11:42:57 UTC
=== Xamarin Studio ===

Version 4.1.2 (build 2)
Installation UUID: 6dda1873-b6da-4249-934b-53ec9898b482
Runtime:
	Mono 3.0.10 ((no/eff4cb5)
	GTK 2.24.18
	GTK# (2.12.0.0)
	Package version: 300100000

=== Apple Developer Tools ===

Xcode 4.6.2 (2067.2)
Build 4H1003

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.7.4
Android SDK: /Users/james/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
Java SDK: /usr

=== Xamarin.iOS ===

Version: 6.3.4.36 (Trial Edition)
Hash: 9eb42f8
Branch: 
Build date: 2013-11-04 10:49:08-0400

=== Build Information ===

Release ID: 401020002
Git revision: 0fb88a5b486ca8644238e49de32b5c5eb983305d
Build date: 2013-05-06 20:35:00+0000
Xamarin addins: 59d33fcc272e0d0f7211811131eb05d1f994a6b4

=== Operating System ===

Mac OS X 10.8.3
Darwin imac.restphone.com 12.3.0 Darwin Kernel Version 12.3.0
    Sun Jan  6 22:37:10 PST 2013
    root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
Comment 2 Mikayla Hutchinson [MSFT] 2013-05-20 12:46:50 UTC
This is technically a bug in the F# addin - it does not properly integrate with MonoDevelop's type system.

I guess we could work around it by detecting such project types and parsing the compiled dll.
Comment 3 Mike Krüger 2013-05-21 00:10:57 UTC
It's in the F# binding anyways.

Reported upstream: https://github.com/fsharp/fsharpbinding/issues/156
Comment 4 PJ 2013-06-24 16:18:55 UTC
This bug was marked as fixed for Xamarin Studio 4.0.9, which is currently in the beta channel. Try it out!
Comment 5 Mikayla Hutchinson [MSFT] 2013-06-24 16:30:59 UTC
This wasn't marked as fixed, it was marked as upstream.
Comment 6 Dave Thomas 2013-07-05 17:08:11 UTC
@Michael How is it a bug in the F# addin?  Shouldn't the compiled F# dll be able to be read from F#.  e.g if a C# project used a F# nuget assembly?
Comment 7 Mikayla Hutchinson [MSFT] 2013-07-09 20:05:52 UTC
Yes, external dlls are parsed by reading the IL, and it would be possible to do this for languages that don't integrate with the type system. The downside is that the type information in the IDE will not be current - if you edit a projects source files, the type system can't be updated until the  project has been compiled. So for example, go to type wouldn't work on a newly defined type until the project had been compiled.
Comment 8 Mike Krüger 2013-07-10 00:35:04 UTC
Can the F# addin use types from the c# project ?
For a .NET language plugin adding a NRefactory integration is needed - all other approaches are messy.
Comment 9 Dave Thomas 2013-07-10 03:08:02 UTC
@Mike Yes the F# addin can show types from C# and F# projects.
Comment 10 laygr 2015-01-14 23:48:57 UTC
My life sucks because of this.