Bug 14694 - [VS2012] VB.NET projects included as project references cannot see types from one another (PCL only?)
Summary: [VS2012] VB.NET projects included as project references cannot see types from...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 3.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2013-09-12 14:49 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-02-06 13:29 UTC (History)
6 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 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 FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2013-09-12 14:49:54 UTC
Filed on behalf of a user.

## Steps to reproduce
1. Open attached test case.
2. Build RefIssue.Droid project.


## Result
Build error: "Type 'IMyPlugin' is not defined" in file "PluginConsumer.vb"

This type is defined in the RefIssue.Portable.Plugins project, and used by PluginConsumer.vb in the RefIssue.Portable project. Both of these are VB.NET PCL projects.


## Work-around
Remove the project reference for RefIssue.Portable, and replace it with a reference to the compiled DLL for RefIssue.Portable. This DLL should be available in the Libs\PCLs directory after the first attempt to build the project.


## Version information
Windows 7 x64
Visual Studio 2012
Xamarin.Android 4.8.03082
Comment 2 Jonathan Pryor 2013-09-13 17:35:29 UTC
What's "funny" is that this is IDE-specific: I can build with `msbuild` at the command line without any error at all, it's only within VS2012 that it fails.

Note: I only tested VS2012, not VS2010 or VS2013.

Xamarin Studio 4.0.3 refuses to load the .sln.
Comment 6 PJ 2013-11-19 16:38:26 UTC
This bug was targeted for a past milestone, moving to the next active non-hotfix milestone.
Comment 7 Guillaume 2014-01-30 14:51:26 UTC
Any news for a fix on this issue included in the release 4.10.1 or the beta 4.10.2?
Comment 9 Brendan Zagaeski (Xamarin Team, assistant) 2015-02-06 13:28:27 UTC
If I add the 2 key lines from `Activity1.cs`:

> var test1 = new ProjectBridge();
> test1.Bar.PluginInstance.TestMethod();

... into a console C# project in Visual Studio, add all of the PCL library projects as references (no Xamarin projects involved), and run the app, then I get the same runtime error mentioned in comment 5 and comment 8:

> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

This bug report was filed to fix a build error. I have a suspicion the sample project wasn't intended to _run_ successfully. The build error has now been fixed, so I believe this bug can be marked as resolved fixed.

Thanks!