[Solved] Can't Build Content Since Windows 10 & Visual Studio 2019

I had to bite the bullet and install Windows 10.

Before I did I tried my MG project in VS2019 and it worked just fine so I was hopeful there wouldn’t be any problems.

Since actually installing Win10 the code itself does still build fine but none of the content does. Clicking the Content.mgcb just opens a screen of text like I was opening it in a text editor.

On this forum I saw it suggested to install some C++ redistributes which I tried but that didn’t do much.

First error when building is:

The command ““C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe” /@:“D:\Projects\MonoGame\RealmsOfFantasy\RealmsOfFantasy\Content\Content.mgcb” /platform:Windows /outputDir:“D:\Projects\MonoGame\RealmsOfFantasy\RealmsOfFantasy\Content\bin\Windows” /intermediateDir:“D:\Projects\MonoGame\RealmsOfFantasy\RealmsOfFantasy\Content\obj\Windows” /quiet” exited with code 387.

I’ve tried installing VS 2017 and the templates for that too. But same thing.

Any ideas please?

Thanks

Ok Progress… Right clicking the Content.mgcb and picking MonoGame Pipeline Tool (Set as Default) solved the problem of the content manager not opening.

Seeing the file as text was actually useful since it made me realise that my customer processors where referenced using a drive letter that no longer exists in this Window 10 build. The Pipeline tool does now see my processors and some content builds.

Unfortunately most of it doesn’t.

I picked a few content files at random and they still open just fine in 3DS Max 2019.

Seems to be the same error for all the content that doesn’t build:

Processor ‘EffectProcessor’ had unexpected failure! System.DllNotFoundException: Unable to load DLL ‘d3dcompiler_43.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Maybe even if this stuff is obvious to some people maybe it’ll help someone. Any help would be appreciated too :slight_smile:

Ok most of the content now builds after installing:

https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=35

But not all. Getting there…

Well it builds now at least but fails to the actual main program.cs with a FileLoadException:

“{“Could not load file or assembly ‘SharpDX.DXGI, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”:“SharpDX.DXGI, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1”}”

Not sure why yet and I’m too tired to figure it out tonight. Maybe I’m close to getting this stuff working in Windows 10 with VS 2019 hopefully.

Hmm ok not as easily solved as I’d hoped.

If I make a new MG Project from vs 2019 it runs ok.

My Project compiles but has the error:

Could not load file or assembly ‘SharpDX.DXGI, Version=2.6.3.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference.

I checked the MG and it was pointing to C:\Program Files (x86)\MonoGame\v3.0\Assemblies\Windows8. The template’s version was using C:\Program Files (x86)\MonoGame\v3.0\Assemblies\Windows so I changed it to that and the reference (in the content processors).

Same error. Stuck for now. Any ideas anyone?

Solved. After adding all my references to a a fresh project in vs2019 it still compiled and ran.

But I noticed it was set at “x86” rather than “Any Cpu”. Switching my project to “x86” made it work straight away.

Ideally I want to ship my game to PS4 as well as PC but i’ll worry about that when it’s finished.

Maybe this might be useful to someone anyway.

1 Like