Can't run monogame project on arch linux

I keep getting an error whenever I run dotnet build
50 Replies
paperClip
paperClip2w 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 PostingOP2w ago
it is that framework
paperClip
paperClip2w ago
what do you see when you run dotnet --list-sdks
Protogen Posting
Protogen PostingOP2w 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
paperClip2w ago
also update the monogame version
Protogen Posting
Protogen PostingOP2w ago
where do I find the most recent version?
paperClip
paperClip2w 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 PostingOP2w ago
YAY DIFFERENT ERROR
paperClip
paperClip2w 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 PostingOP2w ago
that makes it build and adding it back makes it not build
paperClip
paperClip2w 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 PostingOP2w ago
different error now yay :3
paperClip
paperClip2w ago
geez whats the error
paperClip
paperClip2w ago
ok you need to setup linux shader compilation this part is a bit iffy
Protogen Posting
Protogen PostingOP2w ago
uhhh how do I do that-
paperClip
paperClip2w 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 PostingOP2w ago
all of that stuff was on pacman so it might be fine
paperClip
paperClip2w ago
i forgot that was the name of the arch package manager
Protogen Posting
Protogen PostingOP2w ago
ok new error I think
paperClip
paperClip2w ago
i think its the same issue
paperClip
paperClip2w ago
No description
paperClip
paperClip2w ago
it wants to use wine to run the shader compiler
Protogen Posting
Protogen PostingOP2w ago
I have wine though??
paperClip
paperClip2w ago
did you do the other steps?
Protogen Posting
Protogen PostingOP2w ago
looked in winetricks and I cant find the d3d compiler nvm its there now uh how do I do that last one?
paperClip
paperClip2w ago
do you know how to set an enviroment variable? /home/protogenposting/.winemonogame set MGFXC_WINE_PATH to that
Protogen Posting
Protogen PostingOP2w ago
ah ok
paperClip
paperClip2w ago
tbh i forgot where that file is to set enviroment variables on terminal startup
Protogen Posting
Protogen PostingOP2w 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
paperClip2w ago
what are you doing to set it?
Protogen Posting
Protogen PostingOP2w ago
env MGFXC_WINE_PATH=/home/protogenposting/.winemonogame
paperClip
paperClip2w 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 PostingOP2w ago
ok I'm gonna try rebooting rq back from the reboot, that did not fix it
paperClip
paperClip2w ago
did you add this
Protogen Posting
Protogen PostingOP2w ago
to ~/.profile?
paperClip
paperClip2w ago
yes
Protogen Posting
Protogen PostingOP2w ago
I did
paperClip
paperClip2w ago
the end of .profile what does say echo $MGFXC_WINE_PATH
Protogen Posting
Protogen PostingOP2w ago
nothing
paperClip
paperClip2w ago
weird
Protogen Posting
Protogen PostingOP2w ago
I put it there though??
No description
paperClip
paperClip2w 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 PostingOP2w ago
the echo works but the build still fails wait holdon OK SOMETHING ELSE IS HAPPENING IT BUILT YEAH
paperClip
paperClip2w ago
WOOOO
Protogen Posting
Protogen PostingOP2w ago
ok now it looks like the only issues were the result of my friend so it should be good now THANK YOU
paperClip
paperClip2w ago
yay looks like you guys put a lot of work into this game so far a ton of assets
Want results from more Discord servers?
Add your server