Exception when adding assembly reference to CSharpProjectAssembly

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 9 years ago by Christel
Version: 14.1.0601
Platform: .NET 4.5
Environment: Windows 7 (64-bit)

We use a CSharpProjectAssembly.

During the Startup of the Application a lot of assembly references (loaded from Application) will be added to the ProjectAssembly.

This works perfect.

Later in the Application a dynamic assembly will be created and is safed in the temp-Directory of the Admin User.

This dynamic created assembly should then be added to the project assembly as well.

Calling 'ProjectAssembly.AssemblyReferences.AddFrom(path)' will cause this exception:

It is illegal to reflect on the custom attributes of a Type loaded via ReflectionOnlyGetType


Strange enough this happens only on machines, where no Actipro License is installed.

Or is there another thing, that may be  different?

Do you have any idea, what's the reason about this exception?
(In the dynamic created assembly are not any other special attributes as in the assemblies, added at the startup of the application) 


Thanks for your really appreciated help!!

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Christel,

The license shouldn't make any difference here since it's the same code, whether you have one or not.  The only difference that might be related is that on developer machines, it's installing our assemblies to the GAC whereas when you deploy your app, the assemblies are likely not in the GAC and are local in the app's bin folder.  I'm not sure why that would change anything but it could possibly be related.

Do you have a new simple sample project you could email our support address with that would show this exception so we can debug it?  Please reference this thread and rename the .zip file extension of what you send so it doesn't get spam blocked.  Thanks!

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.