Can't run monogame project on arch linux

I keep getting an error whenever I run dotnet build
50 Replies
paperClip
paperClip2mo ago
change the framework to dotnet 8 inside the .csproj and also change the monogame version to the latest one or, if you dont want to use the latest version of monogame with dotnet 8 you can install dotnet 6 instead
Protogen Posting
Protogen PostingOP2mo ago
it is that framework
paperClip
paperClip2mo ago
what do you see when you run dotnet --list-sdks
Protogen Posting
Protogen PostingOP2mo ago
8.0.110 [/usr/share/dotnet/sdk] here's the csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<PublishReadyToRun>false</PublishReadyToRun>
<TieredCompilation>false</TieredCompilation>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<None Remove="Icon.ico" />
<None Remove="Icon.bmp" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Icon.ico" />
<EmbeddedResource Include="Icon.bmp" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Assets\Content.mgcb" />
</ItemGroup>
<ItemGroup>
<TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
</ItemGroup>
<ItemGroup>
<Folder Include="Assets\ExampleContent\" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<PublishReadyToRun>false</PublishReadyToRun>
<TieredCompilation>false</TieredCompilation>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<None Remove="Icon.ico" />
<None Remove="Icon.bmp" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Icon.ico" />
<EmbeddedResource Include="Icon.bmp" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Assets\Content.mgcb" />
</ItemGroup>
<ItemGroup>
<TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
</ItemGroup>
<ItemGroup>
<Folder Include="Assets\ExampleContent\" />
</ItemGroup>
</Project>
paperClip
paperClip2mo ago
also update the monogame version
Protogen Posting
Protogen PostingOP2mo ago
where do I find the most recent version?
paperClip
paperClip2mo ago
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.2.1105" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.2.1105" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.2.1105" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.2.1105" />
Protogen Posting
Protogen PostingOP2mo ago
YAY DIFFERENT ERROR
paperClip
paperClip2mo ago
ok this looks like a content pipeline issue could you tempoarily remove <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.2.1105" /> and see if it builds then add it back
Protogen Posting
Protogen PostingOP2mo ago
that makes it build and adding it back makes it not build
paperClip
paperClip2mo ago
add it back and run dotnet new tool-manifest go into .config/dotnet-tools.json and change it to this
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.2.1105",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.2.1105",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.2.1105",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.2.1105",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.2.1105",
"commands": [
"mgcb-editor-mac"
]
}
}
}
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.2.1105",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.2.1105",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.2.1105",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.2.1105",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.2.1105",
"commands": [
"mgcb-editor-mac"
]
}
}
}
did that work?
Protogen Posting
Protogen PostingOP2mo ago
different error now yay :3
paperClip
paperClip2mo ago
geez whats the error
paperClip
paperClip2mo ago
ok you need to setup linux shader compilation this part is a bit iffy
Protogen Posting
Protogen PostingOP2mo ago
uhhh how do I do that-
paperClip
paperClip2mo ago
this is for unbuntu, so it might be different on arch the Setup Wine For Effect Compilation yea its using apt might have to do it manually
Protogen Posting
Protogen PostingOP2mo ago
all of that stuff was on pacman so it might be fine
paperClip
paperClip2mo ago
i forgot that was the name of the arch package manager
Protogen Posting
Protogen PostingOP2mo ago
ok new error I think
paperClip
paperClip2mo ago
i think its the same issue
paperClip
paperClip2mo ago
No description
paperClip
paperClip2mo ago
it wants to use wine to run the shader compiler
Protogen Posting
Protogen PostingOP2mo ago
I have wine though??
paperClip
paperClip2mo ago
did you do the other steps?
Protogen Posting
Protogen PostingOP2mo ago
looked in winetricks and I cant find the d3d compiler nvm its there now uh how do I do that last one?
paperClip
paperClip2mo ago
do you know how to set an enviroment variable? /home/protogenposting/.winemonogame set MGFXC_WINE_PATH to that
Protogen Posting
Protogen PostingOP2mo ago
ah ok
paperClip
paperClip2mo ago
tbh i forgot where that file is to set enviroment variables on terminal startup
Protogen Posting
Protogen PostingOP2mo ago
bruh how do I set an enviormental variable I keep trying to set it but when I do printenv it doesnt show up there
paperClip
paperClip2mo ago
what are you doing to set it?
Protogen Posting
Protogen PostingOP2mo ago
env MGFXC_WINE_PATH=/home/protogenposting/.winemonogame
paperClip
paperClip2mo ago
add it to the bottom of ~/.profile b/c otherwise its only for the current session add MGFXC_WINE_PATH="/home/protogenposting/.winemonogame"
Protogen Posting
Protogen PostingOP2mo ago
ok I'm gonna try rebooting rq back from the reboot, that did not fix it
paperClip
paperClip2mo ago
did you add this
Protogen Posting
Protogen PostingOP2mo ago
to ~/.profile?
paperClip
paperClip2mo ago
yes
Protogen Posting
Protogen PostingOP2mo ago
I did
paperClip
paperClip2mo ago
the end of .profile what does say echo $MGFXC_WINE_PATH
Protogen Posting
Protogen PostingOP2mo ago
nothing
paperClip
paperClip2mo ago
weird
Protogen Posting
Protogen PostingOP2mo ago
I put it there though??
No description
paperClip
paperClip2mo ago
i think this is the wrong file wait no just run export MGFXC_WINE_PATH="/home/protogenposting/.winemonogame" normally in terminal and then run echo $MGFXC_WINE_PATH
Protogen Posting
Protogen PostingOP2mo ago
the echo works but the build still fails wait holdon OK SOMETHING ELSE IS HAPPENING IT BUILT YEAH
paperClip
paperClip2mo ago
WOOOO
Protogen Posting
Protogen PostingOP2mo ago
ok now it looks like the only issues were the result of my friend so it should be good now THANK YOU
paperClip
paperClip2mo ago
yay looks like you guys put a lot of work into this game so far a ton of assets

Did you find this page helpful?