Bug 44976 - F#: Can't add reference to an F# PCL from F# Forms PCL
Summary: F#: Can't add reference to an F# PCL from F# Forms PCL
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: F# Add-in ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Jason Imison
Depends on:
Reported: 2016-10-03 13:04 UTC by Jason Imison
Modified: 2016-10-20 13:13 UTC (History)
3 users (show)

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

Working screenshot (271.98 KB, image/png)
2016-10-09 18:28 UTC, Jason Imison
Project reference screenshot (244.91 KB, image/png)
2016-10-09 18:42 UTC, Jason Imison
First time trying to add a reference (79.65 KB, image/png)
2016-10-20 10:44 UTC, Jason Imison
Same dialog after restarting XS (79.65 KB, image/png)
2016-10-20 10:45 UTC, Jason Imison
First time trying to add a reference (84.30 KB, image/png)
2016-10-20 10:46 UTC, Jason Imison
Working in VS (188.49 KB, image/gif)
2016-10-20 13:06 UTC, Jason Imison
Working in Windows (185.86 KB, image/gif)
2016-10-20 13:13 UTC, Jason Imison

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 44976 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:

Description Jason Imison 2016-10-03 13:04:43 UTC
1) Create C# Froms app
2) Add C# PCL
3) Add F# PCL
4) Try to add a reference from the C# PCL to the F# PCL
-> In the reference dialog you will see: Incompatible framework Definition: :NETFramework=v4.5;Profile=Profile78)

See https://forums.xamarin.com/discussion/comment/216184#Comment_216184 for further information
Comment 1 Jason Imison 2016-10-05 22:33:06 UTC
Tried to reproduce with this solution - https://github.com/nosami/bug44976

Couldn't reproduce
Comment 2 Kai 2016-10-07 13:47:31 UTC
In your Github repo you reference a C# PCL from a F# PCL. That works. But You cannot reference a F# PCL from your C# PCL. I tried it with Version 6.1.1 (build 15)

1. Remove reference in fspcl to the cspcl
2. Try to add a reference in the cspcl to the fspcl
Comment 3 Jason Imison 2016-10-09 18:28:46 UTC
Created attachment 17949 [details]
Working screenshot

I updated the repo to reference F# from C#. Notice that I am just referencing the dll output from the F# project. There is an issue (already on my radar) that F# project references aren't working from C# projects.
Comment 4 Jason Imison 2016-10-09 18:42:14 UTC
Created attachment 17950 [details]
Project reference screenshot

Still not seeing what you are seeing though with the project reference.

If I switch over the reference to be a Project reference instead of an Assembly reference, the reference is added fine, but there are red squiggles in the editor. It builds fine though.
Comment 5 Kai 2016-10-20 08:10:20 UTC
Anything that I can do to help you to reproduce it? I can reproduce the problem on 2 computers. The only difference that I see is that my startup project is Droid as I do not have a Mac. And maybe the OS Culture is different (DE-de) but that shouldn't be a problem.
Maybe we can talk on slack or you can have a look remotely?
Comment 6 Jason Imison 2016-10-20 10:25:04 UTC
I tried again and I'm seeing the same thing now. Will fix.
Comment 7 Kai 2016-10-20 10:40:40 UTC
Great, let me know if I can help you somehow.
Comment 8 Jason Imison 2016-10-20 10:44:27 UTC
Created attachment 18133 [details]
First time trying to add a reference
Comment 9 Jason Imison 2016-10-20 10:45:43 UTC
Created attachment 18134 [details]
Same dialog after restarting XS

So... this issue goes away after restarting XS. It only fails the first time.
Comment 10 Jason Imison 2016-10-20 10:46:56 UTC
Created attachment 18135 [details]
First time trying to add a reference

I uploading the wrong image first time, oops
Comment 11 Kai 2016-10-20 11:00:03 UTC
I restarted it a couple of times. Always the same problem...
Are you on xamarinchat.slack.com? My username is kct. If you like you can have a look remotly via TeamViewer.
Im using Win10 as OS if case that is another difference
Comment 12 Jason Imison 2016-10-20 11:04:16 UTC
I didn't even know about xamarinchat.slack.com :) I'm on fpchat and fssf slacks though.

Let me investigate why it doesn't work the first time on OSX first - it's probably the same issue on Win!0
Comment 13 Kai 2016-10-20 11:07:11 UTC
I'm on fssf slack, too. Just ping me if you'd like to see the reproduction steps. I used your repo and updated to the latest XS and Xamarin beta
Comment 14 Jason Imison 2016-10-20 13:06:10 UTC
Created attachment 18138 [details]
Working in VS

So, this is working fine for me in VS2015 on Win10
Comment 15 Jason Imison 2016-10-20 13:13:35 UTC
Created attachment 18139 [details]
Working in Windows

It worked in XS on Windows too, but only after I removed the fspcl reference and added it back.