Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Why do I receive this error when loading a solution in Runtime: Cannot cast type X to type X?

Updated on February 13, 2017

When loading a project in Runtime onto a workstation with both Studio and Runtime installed, you receive this error:

Cannot cast type X to type X.

This error can occur when loading a project in Runtime that uses a third-party DLL file and that DLL file is present in both the Studio program folder (C:\Program Files\OpenSpan\OpenSpan Studio) and the deployment package. The problem appears to be caused by .NET loading both copies of the file into memory and treating them as different assemblies.

To avoid this issue, remove the the DLL file from the Studio program folder and leave the copy in the deployment package. Leaving a copy of the DLL file in the deployment package lets you test the solution in the deployment environment.

Note: This error will only occur on machines that have both Studio and Runtime installed.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us