c++.netxmlmsbuildunreal-engine5

Jet brains Rider compile error with unreal engine while building, xml namespace


0>UnrealBuildTool.csproj(1,1): Error MSB4041 : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

I have tried everything i looked everywhere on google nothing helped i installed 3.1 net core and i have also i made sure i have .net 6 installed i confirmed the version of msbuild

I have no idea what is wrong!

Screenshot 1

Screenshot 2

I have tried all the msbuilds the one that gives me the least errors is the 4 and it only gives me this xml error

I looked at all the errors when using msbuild 17 and searched about them for a fix couldnt find any!

Screenshot 3


Solution

  • so i have found the new fix for this issue!

    the nuget.config file is not correct with rider but is correct with vs 2022

    what you need to change is simple!

    first clear your nuget cash in vs by going to debug -> options then search for nuget in general of nuget you will find the option to clear storage after you clear the storage click ok and save then go to the path of nugget which will be found here %appdata%\NuGet\NuGet.Config open it with notepad or vs then change it to the code down below and the problem is fixed!

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <!-- Define the package sources, nuget.org and contoso.com. -->
      <!-- `clear` ensures no additional sources are inherited from another config file. -->
      <packageSources>
        <clear />
        <!-- `key` can be any identifier for your source. -->
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
        <add key="contoso.com" value="https://contoso.com/packages/" />
      </packageSources>
      
      <!-- Define mappings by adding package patterns beneath the target source. -->
      <!-- Contoso.* packages and NuGet.Common will be restored from contoso.com,
           everything else from nuget.org. -->
      <packageSourceMapping>
        <!-- key value for <packageSource> should match key values from <packageSources> element -->
        <packageSource key="nuget.org">
          <package pattern="*" />
        </packageSource>
        <packageSource key="contoso.com">
          <package pattern="Contoso.*" />
          <package pattern="NuGet.Common" />
        </packageSource>
      </packageSourceMapping>
    </configuration>