Weird Content.Load issue...

Hi,

Quick question. I’ve written a customer importer/processor/reader/writer to handle a new DCC format.

Everything builds properly, however calls to Content.Load<MyCustomContentType> fails with a ::
System.InvalidCastException was unhandledexception.

However calling Content.Load<object> executes the customer reader.

Any idea why I can’t successfully call the typed Content.Load???

Have you investigated the cast issue?

Did you write a custom reader and writer? If so make sure you have the right type in ContentTypeReader.TargetType. You can look at MG source to see how it should be. If not make sure your processor returns the same type you’re trying to load at runtime.

Hi,

Yes, I’ve written the custom reader and writer. The writer works fine, and generates xnb files are expected. The reader reads in those file, no problem.

Since yesterday, things have worsened. Now the error I am getting is Could not find ContentTypeReader Type. Please ensure the name of the Assembly that contains the Type matches the assembly in the full type name: blah. This is occurring even though the ContentTypeReader assembly name is definitely being returned in ::GetRuntimeReader

I believe this has to do with how the projects are being referenced, and some conflict are occurring even though they do not appear to be explicit errors.

Currently, there is the game solution, engine solution, content extension solution and DCC tool solution. Right now there are the same classes in the DCC tool and extension solution, because for some reason the project doesn’t build if the reference is defined ( dunno… ).

In general, what are the best projects for solution management with Monogame when extension solutions and shared classes are required???