`XmlImporter` Could not load assembly `System.Runtime`

Hi,

I was trying to add some XML content to my game using the content pipeline, but it just didn’t decide to work.
I have this XML

<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:ns="Microsoft.Xna.Framework">
  <Asset Type="Portal2DXML.LevelData">
    <LevelName>The Beginning</LevelName>
    <LevelID>1</LevelID>
  </Asset>
</XnaContent>

Which corresponds to this class

public class LevelData 
{
    public string LevelName;
    public int LevelID;
}

When i try to dotnet build it mgcb throws a lot of System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
I’m on Artix Linux targeting net6.0.

Thanks in advance,
tags.

Hey there, did you solve this issue? I think the link below might help.
Check the .NET CLI tab option under the file requirements description.
Perhaps choosing version 6 for the package?

https://www.nuget.org/packages/System.Runtime

I would download the dll file for the Runtime and place it on the same directory of the project, when packaging for Linux distros (currently I’m using a Windows for the development). But as the issue happens when you’re building the project, perhaps you could test if the System.Runtime file is at the same directory where either the mgcb or the dotnet binary is.

Ended up reinstalling windows which seems to have fixed the problem.
Thanks anyways though! :smiley: