Cannot add reference to portable F# library from portable C# library - by miegirl

Status : 

 


10
0
Sign in
to vote
ID 761306 Comments
Status Active Workarounds
Type Bug Repros 6
Opened 9/5/2012 12:18:54 PM
Access Restriction Public

Description

Visual Studio 2012 RTM does not allow to add references to portable F# libary projects from portable C# library projects via the Add Reference dialog. Even when target profiles match.

It compiles perfect when project reference added manually into the csproj file (via ProjectReference element) but displays the "Unable to add a reference to project 'Projectname'" warning and marks the reference with yellow exclamation mark.
Sign in to post a comment.
Posted by miegirl on 11/25/2014 at 5:38 AM
Not sure about other VS versions but I just tested this in VS 2015 Preview and it appears to be fixed at last.
Posted by Rich Turner [Bitcrazed] on 5/9/2014 at 3:15 PM
Sadly, this issue continues to persist in Visual Studio 2013 Update 2!!

I asked StackOverflow how to overcome this issue, but nobody appears to know how: http://stackoverflow.com/questions/23111782/how-do-i-add-a-reference-to-f-portable-library-from-c-sharp-portable-class-libr

Is anyone from Microsoft able/willing to comment?
Posted by John Lewicki (outlook.com) on 10/28/2013 at 1:05 PM
Sadly this appears to still be an issue in Visual Studio 2013. Fortunately the posted workaround still works, but it is most vexing to have that yellow exclamation mark cheekily taunting you from the References list.
Posted by miegirl on 4/18/2013 at 11:02 PM
The issue still persists in VS 2012 update 2.

For JohannesRudolph I post details on how to add reference manually in workarounds, be sure to follow this instruction (it looks bad however since line breaks are not preserved there).
Posted by JohannesRudolph on 4/17/2013 at 1:16 AM
Also: Contrary to the opener of this bug, I cannot get the reference to work properly even if I add the assembly reference manually by adding the project reference to the csproj file. I can use F# code from the C# assembly without problems, but the manually added reference is not displayed in the "References" section of the C# project in Solution Explorer and IntelliSense is not working for using the classes exposed by the F# assembly.
Posted by JohannesRudolph on 4/17/2013 at 1:12 AM
I can confirm this issues still persists, using Visual Studio 2012 SP1. Even if I manually change both the F# and C# portable library project to use TargetFrameworkProfile 47 the issue still persists.
Posted by miegirl on 2/11/2013 at 10:47 PM
No, the problem reproduces when both F# and C# use profile 47. I have stated this in description by the words "Event when target profiles match".
Posted by Donna [MSFT] on 2/11/2013 at 3:15 PM
Thank you for your feedback. It seems the problem you are experiencing is due to the fact that F# portable libaries only support profile 47. If you manually change to a different profile, some behaviors may work, but this is not a scenario that we have tested or support.

The recommended way to use F# portable libraries from C# portable libraries is to make both of them use Profile 47.
Posted by Bin [MSFT] on 9/5/2012 at 10:44 PM
Thank you for submitting feedback on Visual Studio 11 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Helen [MSFT] on 9/5/2012 at 12:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)