Search

Type unification in Microsoft.Bcl fails by Stephen Cleary

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 773453
Opened: 12/4/2012 1:25:21 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
If a non-portable library (e.g., net45) references a portable library that returns a type provided by Microsoft.Bcl, then I get the following errors:

...\PortableClassLibrary1.dll : warning CS1684: Reference to type 'System.Tuple`2' claims it is defined in 'd:\Temp\Projects\ClassLibrary5\packages\Microsoft.Bcl.1.0.11-beta\lib\net40\System.Runtime.dll', but it could not be found
...\ClassLibrary1\Class1.cs(12,20,12,61): error CS0570: 'PortableClassLibrary1.Class1.Test()' is not supported by the language
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

1) Create a portable library (win8+net4+sl4+wp71).
2) Install Microsoft.Bcl 1.0.11-beta.
3) Create a method returning Tuple<int, int>.
4) Create a non-portable library (net45).
5) Reference the portable library.
6) Create a method returning Tuple<int, int> which just calls into the portable library's method.
7) Attempt to compile.

Product Language

English

Operating System

Windows 7 SP1

Operating System Language

English

Actual results

Error messages:

...\PortableClassLibrary1.dll : warning CS1684: Reference to type 'System.Tuple`2' claims it is defined in 'd:\Temp\Projects\ClassLibrary5\packages\Microsoft.Bcl.1.0.11-beta\lib\net40\System.Runtime.dll', but it could not be found
...\ClassLibrary1\Class1.cs(12,20,12,61): error CS0570: 'PortableClassLibrary1.Class1.Test()' is not supported by the language

Expected results

Compiles successfully.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 1/8/2013 at 3:05 PM
Thanks for the bug report, I've confirmed that this is a real issue - we're missing a type forward in System.Runtime.dll for Tuple<T1, T2>.

This will be fixed by the next update of the package.
Posted by Microsoft on 12/10/2012 at 2:26 AM
Thanks for your response. We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Stephen Cleary on 12/5/2012 at 5:27 AM
OK, I uploaded it to:

https://sftus.one.microsoft.com/choosetransfer.aspx?key=9415c965-6590-4d5f-8331-614ff9c106df
Password: Z1_)G37MTk
Posted by Microsoft on 12/4/2012 at 7:07 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

Please submit this information to us within 4 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 12/4/2012 at 1: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)
Sign in to post a workaround.