Forums

Cannot locate nested CLR type message

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Cannot locate nested CLR type message

Postby torial » Wed Feb 17, 2010 10:53 pm

I am porting some C# code that inherits from the BasicDesignerLoader class, and I get the following error:

error: Cannot locate nested CLR type "System.ComponentModel.Design.Serialization.BasicDesignerLoader+ReloadOptions" (simple name is "ReloadOptions").


The MSDN documentation is: http://msdn.microsoft.com/en-us/library ... 80%29.aspx

Is this a Cobra specific issue? Also, is there an easy workaround?
torial
 
Posts: 229
Location: IA

Re: Cannot locate nested CLR type message

Postby Charles » Wed Feb 17, 2010 11:10 pm

It's probably a bug in Cobra's reading of DLLs. But first remind me if you're using a release, or the latest source. (And if from source, do an update and install if you haven not in awhile.)

Unfortunately, this type of bug does not have a good workaround.

Let me know about the above.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Cannot locate nested CLR type message

Postby Charles » Thu Feb 18, 2010 12:22 am

Can we get this down to a small example? What assemblies do I need to reference?
use System.ComponentModel
use System.ComponentModel.Design

class A inherits System.ComponentModel.Design.Serialization.BasicDesignerLoader
pass

class P
def main
pass
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Cannot locate nested CLR type message

Postby torial » Thu Feb 18, 2010 8:07 pm

Here's a basic repeat. I will test this code on my computer that has the latest from SVN (this computer just has the last release that was made).

Code: Select all
%% args -ref:System.Design

use System.ComponentModel
use System.ComponentModel.Design
use System.ComponentModel.Design.Serialization

class A inherits BasicDesignerLoader
    pass

class Program
    def main
        pass
torial
 
Posts: 229
Location: IA

Re: Cannot locate nested CLR type message

Postby torial » Thu Feb 18, 2010 10:40 pm

I confirmed it happens w/ the latest version of Cobra ( at least a few days old). as well.
torial
 
Posts: 229
Location: IA

Re: Cannot locate nested CLR type message

Postby Charles » Fri Feb 19, 2010 3:25 pm

A fix is forthcoming.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Cannot locate nested CLR type message

Postby Charles » Fri Feb 19, 2010 4:25 pm

Fixed. When reading DLLs, the compiler was not picking up non-public nested types.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 44 guests