Monogame: MonoDevelop: Invalid Configuration Mapping (Fedora 29)

Created on 13 Dec 2018  ยท  7Comments  ยท  Source: MonoGame/MonoGame

I am on Fedora 29 and have mono installed from the Mono project's custom repo. I have installed MonoGame 3.7.1. I am using MonoDevelop v7.7 (build 1869)

MonoDevelop's about page:

=== MonoDevelop ===

Version 7.7 (build 1869)
Installation UUID: 2805de41-8b57-4629-bd45-5cc3256a0651
GTK+ 2.24.32 (Breeze theme)

=== Mono Framework MDK ===

Runtime:
Mono 5.16.0.220 (tarball Mon Nov 26 17:05:57 UTC 2018) (64-bit)

=== NuGet ===

Version: 4.7.0.5148

=== .NET Core ===

Runtime: /usr/share/dotnet/dotnet
Runtime Version: 2.2.0
SDK: /usr/share/dotnet/sdk/2.2.101/Sdks
SDK Version: 2.2.101
MSBuild SDKs: /usr/lib/mono/msbuild/15.0/bin/Sdks

=== Build Information ===

Release ID: 707001869
Git revision: f0f3d1d931d44682f076dde486ecec835f705b8d
Build date: 2018-11-29 14:54:14-05

=== Operating System ===

Linux
Linux 4.19.7-300.fc29.x86_64 #1 SMP Wed Dec 5 22:21:07 UTC 2018 x86_64

=== Enabled user installed extensions ===

MonoGame Extension 3.7.0.1

Output of mono --version

Mono JIT compiler version 5.16.0.220 (tarball Mon Nov 26 17:05:57 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        Interpreter:   yes
        LLVM:          yes(3.6.0svn-mono-/)
        GC:            sgen (concurrent by default)

When using the MonoGame addin, the project is created just fine, but it is always appended by '.Desktop'. For example, if I make projectfoo, the actual project is renamed to projectfoo.Desktop. And there is a warning that that reads _Invalid configuration mapping_ that shows up next to the project name (but not the solution) in MonoDevelop. Opening the solution file in MonoDevelop does not allow the project to build. I get the error:

Thread finished: Finalizer #2
Cannot open assembly '/home/brian/Projects/monogame/monogame/bin/DesktopGL/Any CPU/Debug/monogame.Desktop.exe': No such file or directory.

Finally, if I open the .csproj file directly, instead of the .sln file in MonoDevelop, I can work with the software, and it builds and runs just fine. The downside is that it creates another .sln file in the same directory as the .csproj file.

I don't know why this does this. I also don't know if there is a command line build or project generator I should be using instead. Any help would be appreciated.

I have attached a screenshot of what the MonoDevelop window looks like. This is right after I started a new MonoGame project using the addin. I have not edited any of the files

image

And the window when I click on the red 'X'

image

And lastly, the output of tree in the project directory

.
โ”œโ”€โ”€ monogame
โ”‚ย ย  โ”œโ”€โ”€ app.manifest
โ”‚ย ย  โ”œโ”€โ”€ bin
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ DesktopGL
โ”‚ย ย  โ”‚ย ย      โ””โ”€โ”€ Any CPU
โ”‚ย ย  โ”‚ย ย          โ””โ”€โ”€ Debug
โ”‚ย ย  โ”œโ”€โ”€ Content
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ Content.mgcb
โ”‚ย ย  โ”œโ”€โ”€ Game1.cs
โ”‚ย ย  โ”œโ”€โ”€ Icon.bmp
โ”‚ย ย  โ”œโ”€โ”€ Icon.ico
โ”‚ย ย  โ”œโ”€โ”€ monogame.Desktop.csproj
โ”‚ย ย  โ”œโ”€โ”€ obj
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ Any CPU
โ”‚ย ย  โ”‚ย ย      โ””โ”€โ”€ Debug
โ”‚ย ย  โ”‚ย ย          โ””โ”€โ”€ monogame.Desktop.csprojAssemblyReference.cache
โ”‚ย ย  โ”œโ”€โ”€ Program.cs
โ”‚ย ย  โ””โ”€โ”€ Properties
โ”‚ย ย      โ””โ”€โ”€ AssemblyInfo.cs
โ””โ”€โ”€ monogame.sln

Most helpful comment

http://community.monogame.net/t/building-directory-contains-space/11230

Solution:
This is an old topic but I do have a trick that works if anyone still needs to know.

When starting a new solution - uncheck "[] Create project directory within the solution directory" (don't really need it anyway) and you may notice a red X beside "MyProjectName.Desktop" (for example) that says "invalid configuration" when you hover over the X.
1) Right click on it
2) Tools >> Edit
3) Ctrl-H (replace ALL) "Any CPU" with "AnyCPU" [no space]
4) File >> Save, Clean All, rebuild - should work.

All 7 comments

Hey @briguyjm!
I can replicate this issue. Damn, these MD templates have broken a lot before, that's always frustrating.

I also don't know if there is a command line build or project generator I should be using instead.

There isn't one yet, but we're working on dotnet new support. There are unofficial dotnet new templates available.

@cra0zy Can these be installed with CLI or only from source right now?
Considering this add-in is broken and we don't have any other official way to generate a project on Linux, maybe we should add the dotnet new solution to the official docs. Also we should fix this of course.

@cra0zy Can these be installed with CLI or only from source right now?
Considering this add-in is broken and we don't have any other official way to generate a project on Linux, maybe we should add the dotnet new solution to the official docs. Also we should fix this of course.

I have compiled the official templates:

dotnet new --install MonoGame.Templates.CSharp
dotnet new mgdesktopgl

Also this is a duplicate of #6227, as such closing.

Dude use JetBrains Rider :)

Rider doesn't work, it can't find the target framework for a Cross Platform application

@briguyjm if you need some help figuring it out, I recommend posting on the forum (with some more information so people can actually help): http://community.monogame.net

The templates generated by MonoDevelop cannot be used because once generated MonoDevelop incorrectly modifies the .csproj file causing it to be invalid.

http://community.monogame.net/t/building-directory-contains-space/11230

Solution:
This is an old topic but I do have a trick that works if anyone still needs to know.

When starting a new solution - uncheck "[] Create project directory within the solution directory" (don't really need it anyway) and you may notice a red X beside "MyProjectName.Desktop" (for example) that says "invalid configuration" when you hover over the X.
1) Right click on it
2) Tools >> Edit
3) Ctrl-H (replace ALL) "Any CPU" with "AnyCPU" [no space]
4) File >> Save, Clean All, rebuild - should work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SenpaiSharp picture SenpaiSharp  ยท  3Comments

Jjagg picture Jjagg  ยท  5Comments

rds1983 picture rds1983  ยท  5Comments

NET-D3v3l0p3r picture NET-D3v3l0p3r  ยท  3Comments

MontyHimself picture MontyHimself  ยท  5Comments