Skip to content

Instantly share code, notes, and snippets.

@Arefu
Last active April 30, 2024 01:04
Show Gist options
  • Save Arefu/8d902c100009f92c1a7221ac28e7b4fe to your computer and use it in GitHub Desktop.
Save Arefu/8d902c100009f92c1a7221ac28e7b4fe to your computer and use it in GitHub Desktop.
Install XNA On VS2019

Step One

Read this

Step Two

Put this instead.

<Installation InstalledByMsi="false">
    <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.VSWinDesktopExpress" />
    <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Pro" />
    <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Premium" />
    <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Ultimate" />
    <InstallationTarget Version="[14.0,17.0)" Id="Microsoft.VisualStudio.Community" />
    <InstallationTarget Version="[14.0,17.0)" Id="Microsoft.VisualStudio.Enterprise" />
  </Installation>

Version 17 is for VS19 (Helpful I know)

@mertguner
Copy link

hi
Thank you for this document.
I did all steps. but i didn't work 5. step.
I got this error in my project. "Error loading pipeline assembly "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Microsoft.Build.Framework.dll""

@Arefu
Copy link
Author

Arefu commented Jun 10, 2019

This doesn't seem to be related to the changes here, but have you tried anything like this: dotnet/msbuild#1831 ?

@tomon123
Copy link

Hello,
Solution for error:
"Error loading pipeline assembly "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Microsoft.Build.Framework.dll""
in VS 2019

  1. Run "Developer Command Prompt for VS 2019" as Administartor (from system command line)
  2. Run command:
    cd C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin
    or
    cd C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\
  3. Run command:
    gacutil /i Microsoft.Build.Framework.dll

@tomon123
Copy link

One more thing:
First do it:
http://flatredball.com/visual-studio-2019-xna-setup/
and then run gacutil command

@koopthekoopa
Copy link

koopthekoopa commented Sep 26, 2020

I do the gacutil command and this error appears:

Failure adding assembly to the cache: The system cannot find the file specified.

EDIT: I did the usage right too. gacutil /i Microsoft.Build.Framework.dll
ANOTHER EDIT: nvm i have to do: cd C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin so, fixed

@isral
Copy link

isral commented Sep 6, 2022

Is it working on VS2022?
On create new project, I get "The system cannot find the file specified. (Exception from HRESULT 0x80070002)".
I already do gacutil.

@Arefu
Copy link
Author

Arefu commented Sep 6, 2022

I haven't bothered to check, hold the line caller I'll see if I can wrangle my memory to get it working.

@SimonDarksideJ
Copy link

The MXA installs for installing XNA Game Studio are still on the XNA Game Studio Archive here
https://github.com/SimonDarksideJ/XNAGameStudio/wiki/GettingStarted
There are still only catalogued up to the 2017 version, but it's not that hard to unpack the MSIX installers and update them to newer versions (seen it working in VS2019) but the Visual Studio Team are deprecating older features that the XNA GS depends on as far as I know, so the better route is to still use the versions compatible with these installers for accessing XNA content.

The archive is still slowly updating XNA content to MonoGame, but it's slow progress with only one hand on the wheel ;D

@KliminVD
Copy link

KliminVD commented Nov 9, 2022

Is it working on VS2022? On create new project, I get "The system cannot find the file specified. (Exception from HRESULT 0x80070002)". I already do gacutil.

I have the same problem now. Did you find any solutions or not yet?

@isral
Copy link

isral commented Nov 9, 2022

Is it working on VS2022? On create new project, I get "The system cannot find the file specified. (Exception from HRESULT 0x80070002)". I already do gacutil.

I have the same problem now. Did you find any solutions or not yet?

I have no solution yet, but you can use Windows Form Project then reference XNA dll.
If you only use Texture2D or SoundEffect, you can use FromStream Method (I tried this).
Or you can use other techniquess to create .xnb, either google it or maybe use MonoGame Content Builder to create .xnb (I didn't try this).

Maybe it's possible to decompile vsix and force it to create .xnb using some googled techniques, but I didn't try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment