Unable to resolve Type message from Pipeline.exe

I am looking into why I am getting the message about unable to resolve type when processing xml files. I have reproduced this error in a single xml file which Iv uploaded.


If anyone can see a ‘hole’ in this xml please let me know so I don’t waste time looking at code.

Ok. So. Checking where the message originated gives me that the System.Xml treats xml asset type as if it is a system data type eg byte, int, etc which in this case makes RolePlayingGameData.Weapon invalid.
It looks like I will have to change my xml but before I do I will look into what Asset is all about.

Are you trying to build an Xml file with the MGPT into a class ? If so, cf:

if not, you will have to handle it yourself, then don’t use an importer, and just copy it to the output ?

Quick find done. :slight_smile:
This Asset is part of the XnaContent xml definition which states
‘Marks the asset. The Type attribute specifies the corresponding namespace and class of the matching data type.’
So its an app data type not a system data type.
I am now considering the possibility that xna pipeline uses its own Xml not the system Xml and will look into that next as, currently, the code has using of System.Xml.

More user caused problems?
I think the pipeline tool needs to be run in the IDE.
Having tried that I get a new message
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
I will look into getting that information next.

Looks like I need to be able to run Pipeline in Debug mode. I will see if I can attach to it from my project. If I can that may be the answer to the question about a debug option that I’ve seen elsewhere.

Umm. Thinking…
I already have the classes in code so it looks like I don’t need the xml in the project.
I just need the sound and graphics which the pipeline is able to handle but with more thought I think the sound was previously processed to produce the xap file which pipeline cant handle so I might need to process that onwards with something else for that (as well as find out out what was used to create that file).
Thank you.

Further investigation. this specific app I am porting reads the xml in order to setup the game so I do need them.
I will proceed with them in xml format for now excluding them from the pipeline process.
So… No solution to the use of pipeline for xml for now…
I will be back. :wink:

I have been through some samples and a tutorial and come to the same situation with the pipeline failure.
I have located where the message is originated and will start the detailed investigation and look for a solution.

Yet another hole I’ve fallen into.
I now get an unhandled exception when opening the mgcb file.
Its occurring in the pipelinetype module when doing the asm.Getypes().
As this is inside a System.Type I’m a bit stuck as to how to proceed.
The assembly its having issues with is monogame.framework.
That assembly displays ok when I use ildasm.
Anyone any ideas?

OK. So. Status is> Have noticed a number of error messages in the output of my test project so decided to try to confirm that the only error in my MonoGame is the one I am working on.
Opening and running the test for windows has come up with other errors and I will process my way through those in order to eliminate the errors I am seeing in my test.
So Far there are test errors in Builder, DybamicSound and GraphicsDeviceManager sections and I will proceed with resolving those next.

So far there are 3 sets of failures.

  1. Content builder. Was failing with file not found. Now fails with content builder failed which is what I wanted to see. The code had 2 Asserts. The firs was to check the result of the builder and the second the existence of a file.
    The second was running even when the build had failed.
    Add if to check result is true before checking for the file.
  2. Loads of fails in the Graphics SharpDX section which I will look into later.
  3. Sound device check for capping of number of samples. Number was set to 33 and comments state expecting 32 but test states failed as it expects 16. Need to change the test expected results to reflect the code.
    I am satisfied that the content builder process is now expecting as expected so will go back to trying to determine root cause.

I intend to return to the Graphics section failures at a later date.

Status: I have resolved the problem with loading. It was to do with missing or mismatched assemblies.
The build still fails but this time with some additional Exception handling added to MGCB.exe we get a list and its complaining about versions of SharpDX.Mathematics and SharpDX.Direct3D12 DLLs. Attempts to rebuild SharpDX to get a SharpDX.Mathematics revealed a problem with the SharpDX build process which is using SharpGen to generate some code and the generated code is faulty.
I will be working on that problem next.

Success. I have run the SharpDX build process successfully and my test app built so now the problems I had have gone.
I will continue with my development activity until I am satisfied that a migration does work and then go through with removing the debug add ins I used so the source is clean again.
Will run another build/test to confirm all still good and then see about getting SharpDX back into Git etc.

Submitted previous update too soon.
Got Unable to load type message again in pipeline.
More digging required.

OK. A Question. Anyone care to enlighten me what this is:

foundType = (from assembly in AppDomain.CurrentDomain.GetAssemblies()
from type in assembly.GetTypes()
where type.FullName == typeName || type.Name == typeName
select type).FirstOrDefault();

To me it looks a bit like a database lookup.
I found it in the IntermediateSerialiser in the content pipeline and its erroring with null reference.

Looking at it again it looks like a nested foreach with extended options.
I will look at foreach and get educated.

I have found and fixed the cause of the unresolved types for xml files and am doing some more extensive testing. Its looking good so far.
Test case 1 was 1 file and 2 was 208 and all good.
More testing to do and code tidy up before attempting integration into Git.

Returning after some attempts to get my ported game ported.
I enede up having to start agina due to my lack of understanding of the way MonoGame works.
I came back to this problem and found two things.

  1. the unable to resolve type error does not set the errorcount. I will work on this next.
  2. I had forgotten to add the reference to the class dll in the MGCB project properties.
    That’s handy as its an easy setup to arrange a test of the error.

Ok. I have identified where the type matching occurs and why the error is not counted. The error return is for a null value rather than a not found.
the version of pipeline I am using in debug mode shows the xml type that failed in the output and sets the error count to show it failed.
I will have to figure out how much of this and the ‘trace’ type messages I have added need to be retained for the release version. May have to introduce a ‘verbose’ mode and trigger it via the project properties like pass thru debug is.