InternalsVisibleTo fails when mixed with WF4.0 Activity definitions and custom Activities - by Will Sullivan

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 588710 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 8/24/2010 8:40:27 AM
Access Restriction Public


I have two projects in the same solution, call them WorkflowDll and InternalsDll.  Both are signed.  

WorkflowDll contains workflow definitions and custom native activities.  That is, it contains .xaml files whose build action is set to XamlAppDef and classes that extend NativeActivity.  It also has other classes that reference internal types defined within InternalsDll.

InternalsDll has types defined as internal to the assembly that are used by WorkflowDll.  It is marked with the InternalsVisibleTo attribute to allow these types to be used by WorkflowDll.

Compile this solution and everything works.  HOWEVER, if you put that custom NativeActivity in that workflow definition, the build breaks with CS0122 errors--inaccessible due to protection levels.

I have attached a repro solution.
Sign in to post a comment.
Posted by Microsoft on 7/24/2012 at 9:56 PM
The WPF team has recently reviewed this issue and will not be addressing this issue as at this time the team is focusing on the bugs impacting the highest number of WPF developers. If you believe that this was resolved in error, please reactivate this bug with any necessary supporting details.

Posted by Will Sullivan on 9/8/2010 at 9:45 AM
Any movement on this?
Posted by Microsoft on 8/24/2010 at 7:34 PM
Thanks for your feedback.

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 Microsoft on 8/24/2010 at 5:04 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(
Posted by Will Sullivan on 8/24/2010 at 8:41 AM
This is, I believe, the definition of an edge case. What a freaky-ass bug!