[SOLVED] .tmx TiledMap File has no importer and processor

Hello,

I am trying all day to get my tiled map file working somehow.
I am always getting the error that it hasn’t found an importer for that file, as I don’t have the correct one.

I tried the solutions that others had in other posts. But I might be to stupid as I don’t get it working.

I saw recomendations to add something into the Content.mgbc file or checking for updates/installing the Monogame.Extended.Tiled

Here are some Screenshots that might help:




Maybe someone could help me.

Sry if it a stupid mistake, still very new to this :wink:

Ok I found an article here which I tried now which has something to do with adding the .dll files in the Monogame Pipeline Tool.
Here is the post: [SOLVED] Cant find a default importer for tiled .tmx files - #3 by thefrostwyrm

WHen I add the Extended.Content.Pipeline.dll alone it didn’t do anything so I thought I should do the same with the Extended.Tiled but when I try to add it I get this error instantly:

System.Reflection.ReflectionTypeLoadException: Mindestens ein Typ in der Assembly kann nicht geladen werden. Rufen Sie die LoaderExceptions-Eigenschaft ab, wenn Sie weitere Informationen benötigen.
bei System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
bei System.Reflection.Assembly.GetTypes()
bei MonoGame.Tools.Pipeline.PipelineTypes.ResolveAssemblies(IEnumerable`1 assemblyPaths)
bei MonoGame.Tools.Pipeline.PipelineTypes.Load(PipelineProject project)
bei MonoGame.Tools.Pipeline.PipelineController.ResolveTypes()
bei MonoGame.Tools.Pipeline.PipelineController.OnReferencesModified()
bei MonoGame.Tools.Pipeline.CellRefs.Edit(PixelLayout control)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Windows.Threading.DispatcherOperation.Invoke()
bei System.Windows.Threading.Dispatcher.ProcessQueue()
bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei MonoGame.Tools.Pipeline.Program.Main(String args)

Might help somehow so I posted it as well

The latest develop version has a dependency fix for the content processor. If you can, update and see if that fixes your issue.

It looks like you’re using version 1.1

I’m not sure what version we introduced the TMX importer but you could try installing a pre-release package. Keep in mind however that the pre-release packages are under development and could have breaking changes at any time.

Alternately, you could get the source code from github and build your own NuGet packages. Just run the build.ps1 powershell script.

1 Like

I tried the method with the pre-release using the NuGet first but it throws an error.

It says that I try to install a package which is using the .NetFramework 4.5 but it can’t find any assembly reference or installatio file that is compatible with the framework.
So as far as I could read out I tried to install .Net v4.5 which I can’t install as I already have higher versions on my system, which I guess should include the older stuff.

So I tried the GitHub version which only opens a powershell window and then throws some red error(to fast to read) and closes.

Which version of MonoGame are you using? Have you tried the latest develop version?

1 Like

Just installed the latest version Development Build of MonoGame. Not it shows the correct importer and processor.
But when I tried to start the game it said that the processor ‘TiledMapProcessor’ had an unexpected failure, so I thought that I might need the latestest dev build of the MonoGame.Extended stuff, where I came into the v4.5 problem again

This is probably because your project is targeting .NET Framework 4.5. Go into your project properties and change the target framework to something higher than 4.6.1.

This is because MonoGame.Extended now a .NET Standard 2.0 library and will only work against .NET Standard 2.0 compatible frameworks as shown here.

I realize this might be a little confusing if you’re new to the .NET world. There’s a lot of change going on these days since Microsoft made C# open source. It’s all good though, we need to keep things moving forward.

Ok that fixed that problem with updating to the latest dev build.

Now I have the problem with the importer and processor again. They have vanished so I am stuck at the kinda beginning again :confused:

This seems to be a bug in the pipeline tool since iteration 3.7.

We have also some other users reporting this problem:

With one of the latest updates i’m also getting this bug, despite that building worked for me. But I can imagine that having multiple custom importers using the same file extension can lead to build errors.

Edit: if you are using the most recent dev build the custom importer and processors should be displayed and working again. Are you sure that you are using this build?

I guess so.
I downloaded the latest dev build which is version 3.8.0.76.

I also tried differend versions of MonoGame.Extended with non working.

EDIT:

Somehow I have an importer and processor again, but still having issues with the importer.


Are there any special settings to make in the Tiled Editor?

Ah, okay, I also didn’t see that change immediately. But nice that custom importer and processor are now showing up for you too.

Regarding the “TiledMapImporter” exception I can’t help you as I have no experience with MonoGame.Extended, but I hope that someone else here can help you with that.

1 Like

OK I somehow it stopped working again. I don’t have a importer/processor again. Tried it on a freshly installed VM with no luck either.

I am kind a frustrated atm…

So quick update and maybe a solution.

I installed the latest dev build (v3.8.0.76) of MonoGame and build the latest MonoGame.Extended stuff myself as it currently doesn’t work with NuGet as talked about here on this thread:

Here are some of the things I did to resolve this issue.

Disclaimer, I’m using .NET Core SDK 6.0 and VS Code.

Installed the MonoGame Content Pipeline assembly from the console:

dotnet add package MonoGame.Extended.Content.Pipeline --version 3.8.0

Added this line to Content.mgcb:

#-------------------------------- References --------------------------------#
/reference:C:\Users\danny\.nuget\packages\monogame.extended.content.pipeline\3.8.0\tools\MonoGame.Extended.Content.Pipeline.dll
#---------------------------------- Content ---------------------------------#

Added/updated these lines in my .csproj file

  <ItemGroup>
    <PackageReference Include="MonoGame.Extended" Version="3.8.0" />
    <PackageReference Include="MonoGame.Extended.Content.Pipeline" Version="3.8.0" />
    <PackageReference Include="MonoGame.Extended.Entities" Version="3.8.0" />
    <PackageReference Include="MonoGame.Extended.Tiled" Version="3.8.0" />
    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
  </ItemGroup>