MonoGame.Extended icon indicating copy to clipboard operation
MonoGame.Extended copied to clipboard

Importers / Processors not showing

Open joshk418 opened this issue 5 years ago • 20 comments

Sorry if this has been posted elsewhere, but I was having issues with the Importers and processors not showing up in the content pipeline. I figured this might be due to some recent changes.

I'm using Visual Studio Community 2017 with .NET 4.8, Monogame 3.7.1, and Monogame.Exteneded 3.7.0

Here are my references in the pipeline:

  • /reference:....\packages\MonoGame.Extended.Content.Pipeline.3.7.0\lib\netstandard2.0\MonoGame.Extended.Content.Pipeline.dll
  • /reference:....\packages\MonoGame.Extended.Tiled.3.7.0\lib\netstandard2.0\MonoGame.Extended.Tiled.dll

references

Here's my importer selection:

importers

joshk418 avatar Aug 28 '19 23:08 joshk418

This is probably the same issue that came up on the community forums recently.

I have implemented part of the fix in the develop branch by packaging the MonoGame.Extended.Content.Pipeline package differently. It's quite a complex issue though, so I'm not sure if that's enough to resolve it.

Could I get you to try building from source (just clone the repo and run build.ps1) and see if that resolves the issue for you?

craftworkgames avatar Aug 29 '19 01:08 craftworkgames

That seemed to have worked well by building from the master branch. The build.ps1 kept failing for some reason, but I just built each project in the solution individually and stored the DLLs in my game's root directory. Thanks for the help!

Also let me know if it was a bad idea to not use the build.ps1 (not sure if I missed important steps the way I did it)

joshk418 avatar Aug 29 '19 23:08 joshk418

The build.ps1 kept failing for some reason

Depends what the reason is I guess? If you post the error I should be able to explain what's going on.

I just ran it on a different computer and it worked okay. So in theory it should work for you. Although, there are some dependencies you need, like Visual Studio and you must to run it from a git repository.

I just built each project in the solution individually and stored the DLLs in my game's root directory.

There are many ways to get it to work and if you're happy with it then it's fine. The main problem with this approach is manually copying DLL's around can bit a pretty annoying if you need to do it a lot.

Also let me know if it was a bad idea to not use the build.ps1 (not sure if I missed important steps the way I did it)

The cake script (which is what runs when you execute build.ps1) does the following things:

  • generates a version number (from the commits in the git repository)
  • builds all the projects (Visual Studio will do this too)
  • runs the unit tests
  • creates NuGet packages

So basically, the main benefit is that you can create your own properly versioned NuGet packages locally and reference them that way.

The actual DLL's generated will be pretty much the same in every other way though..

craftworkgames avatar Aug 29 '19 23:08 craftworkgames

Ahh that was the problem. For some reason, I downloaded the repo instead of cloning it. It works after cloning it like you said. My bad haha. Thanks again for the help

joshk418 avatar Aug 30 '19 01:08 joshk418

I had the same problem that @joshk418 had; it seems that when the content build tool wants to load the reference, it doesn't find the referenced assemblies (mostly the MonoGame.Framework assemblies). I could solve the issue by putting the correct versions of the following assemblies into the monogame.extended.content.pipeline\3.7.0\lib\netstandard2.0 folder: MonoGame.Extended.dll, MonoGame.Extended.Tiled.dll, MonoGame.Framework.Content.Pipeline.dll and MonoGame.Framework.dll. I was just compiling a Tiled map, so for other types there may be more .dlls from MonoGame.Extended needed.

vividos avatar Oct 28 '19 13:10 vividos

I also encountered this yesterday. The way i fixed/worked around it was:

  1. Install nuget package for Monogame extended content pipeline.
  2. Copy all required dll files from their respective nuget folders into one folder, inside the project: Look at the picture below. Im not sure all these files are needed, I will need to test further later.
  3. Add MonoGame.Extended.Content.Pipeline.dll (from the folder you created in project, not nuget package folder) as a reference, in Content pipeline program.
  4. Importer for tiled worked, without pipeline crashing.

It seems to be a problem with monogame content pipeline, for all dll references that depend on other dll. There is an issue over at their repo too. I´m no expert in .net or C#, but one way to workaround could be to distribute the all the required dll files in one folder, inside the nuget package?

devenv_HMZkt8Ghgm devenv_SZiohRmIsH

fossegutten avatar Feb 08 '20 12:02 fossegutten

I think I am having the same issue as well. I made an issue on the monogame project here. I'll try @fossegutten work around when I get a chance to

AutumnEvans418 avatar Feb 08 '20 17:02 AutumnEvans418

This is definitely a Monogame issue. Surprised this hasn't been fixed yet as it prevents any monogame pipline references being loaded. Their proposed fix is to put all .dlls in the same folder but that doesn't work too well if you don't know what .dlls another .dll is referencing.

QuinnBast avatar Feb 08 '20 18:02 QuinnBast

@QuinnBast I saw your post at monogame repo. You can see my workaround in the post above. It only takes a few minutes, hope it works for you guys also 😄

fossegutten avatar Feb 08 '20 21:02 fossegutten

If you've already added the .dll-reference the way it's spelled out here, the Pipeline Tool can't remove it. This is a issue with MonoGame, not .Extended. To fix this: -- First, open Content.mgcb in Notepad, and remove this part, between the "References" and "Content"-lines:

#-------------------------------- References --------------------------------#

Remove Everything here.

#---------------------------------- Content ---------------------------------#

-- Save the file in Notepad.

-- Then do what fossegutten suggests.

Version info:

  <package id="MonoGame.Extended" version="3.7.0" targetFramework="net472" />
  <package id="MonoGame.Extended.Content.Pipeline" version="3.7.0" targetFramework="net472" />
  <package id="MonoGame.Extended.Graphics" version="3.7.0" targetFramework="net472" />
  <package id="MonoGame.Extended.Tiled" version="3.7.0" targetFramework="net472" />
  <package id="MonoGame.Framework.Content.Pipeline.Portable" version="3.7.1.189" targetFramework="net472" />
  <package id="MonoGame.Framework.Portable" version="3.7.1.189" targetFramework="net472" />

(I haven't posted on an issue before, so if I've committed any faux pas, it's not with intent)

klnsem avatar Mar 06 '20 11:03 klnsem

Was trying to follow @fossegutten 's steps; but I cannot for the life of me find where this "Reference Editor" tool is.

SilenceOfTheLambdas avatar Jun 28 '20 16:06 SilenceOfTheLambdas

Was trying to follow @fossegutten 's steps; but I cannot for the life of me find where this "Reference Editor" tool is.

I think that's the one in the pipeline tool

Gixen avatar Jun 30 '20 11:06 Gixen

I would be OK with just adding/updating the documentation about "How to use content pipeline with MonoGame.Extended" to resolve this issue

lithiumtoast avatar Jun 30 '20 13:06 lithiumtoast

Experiencing this issue as well and still after following a few work arounds, including fossegottens, I am still unable to build the TMX files. At a a loss on what to do here other then just not use Tiled.

QuimbleyStudio avatar Oct 25 '20 23:10 QuimbleyStudio

Any news guys, experiencing the exact same issue :/

jamesdolan16 avatar Nov 01 '20 22:11 jamesdolan16

As it was mentioned before, this issue is not a MonoGame.Extended issue and more of a MonoGame issue.

I have set up a repo to which the problem is resolved: https://github.com/craftworkgames/MonoGame.Extended-samples

The problem is that MCGB does not understand NuGet packages. To overcome this the .mgcb needs a path reference to .dll from the NuGet package. In the above repo, I altered the path for NuGet packages to get restored by adding a nuget.config file and edited the .mgcb files to point to this new path where NuGet packages are. It's also possible to not alter the NuGet packages restore path ad use the default path in yor .mgcb files to resolve this problem.

lithiumtoast avatar Nov 02 '20 12:11 lithiumtoast

Since there is quite a bit of confusion about adding references, I made a video that shows how to do this

Note. I am using MonoGame 3.8 Here is the explanation on how to install it

janfokke avatar Nov 03 '20 10:11 janfokke

I've read through this thread and attempted all steps here, including the steps from fossegutten and going through the video from janfokke. Unfortunately, I still cannot import a fnt file. The Build Output indicates, "Couldn't find a default importer for '[path]/OpenSans32.fnt'! Also, the Settings for the .fnt file indicate "Invalid / Missing Importer" and "Invalid / Missing Processor". Please note that all five referenced dll files are in the same folder (Content/References) in my Project directory. Any suggestions? Note that I also cannot manually select the BMFontImporter or BMFontProcessor options that seem to be indicated by the instructions here: https://www.monogameextended.net/docs/features/bitmap-font/bitmap-font/.

Apologies if I'm missing something obvious here - I'm relatively new to Monogame and quite new to Monogame Extended.

image image image

bowbriers avatar Dec 02 '20 20:12 bowbriers

Update to my previous issue - my issue seems to be resolved by upgrading from Visual Studio 2017 to Visual Studio 2019 (presumably because VS 2017 did not support .NET Core 3.1, which is a prerequisite for version 3.8.0 of MonoGame.Extended)

bowbriers avatar Dec 04 '20 16:12 bowbriers

@lithiumtoast's work-around in this comment worked for me; see https://github.com/slanger/zelda-online/commit/f060f71994ba266163fd71277dc3fe03dacc9311. I'm happy with the result.

Looks like the documentation was updated with this work-around in https://github.com/craftworkgames/craftworkgames.github.io/commit/972ceaa330cfb1428d77c282331a8314de83dc1f. (Though, it's probably worth adding that a nuget.config file can move the location of NuGet packages to a more convenient location.)

slanger avatar Feb 13 '21 06:02 slanger