stride3d / stride

Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
https://stride3d.net
MIT License
6.65k stars 958 forks source link

Cannot Start Stride: Could not find a compatible version of MSBuild #756

Open ShaheedLegion opened 4 years ago

ShaheedLegion commented 4 years ago

Release Type: Official 4.0.0.1-beta03-1036

Version: 4.0.0.1-beta03-1036

Platform(s): Windows 10

Describe the bug Installer goes through perfectly - no complaints, but when trying to launch Stride, I get an error dialog with the text: Could not find a compatible version of MSBuild.

System.InvalidOperationException: Could not find a MSBuild installation (expected 16.0 or later) at Stride.Core.Assets.PackageSessionPublicHelper.FindAndSetMSBuildVersion() at Stride.GameStudio.Program.d__12.MoveNext()

To Reproduce Steps to reproduce the behavior:

  1. Install from xenko website for Windows 10 Run installer - let it complete, run the launcher. Try to launch the "latest" version it installs for you automatically.

Expected behavior I expected the Game Studio to launch.

Screenshots image

Log and callstacks If any, please attach here any log or callstack (preferably in a .txt file using GitHub drag and drop)

Additional context I have VS 2017 installed, and some version of build tools. From reading the other issues like this, I found that the version required is lower than the version I have - I think.

image

I've also tried the gacutil /u Microsoft.Build.Tools fix mentioned on a different ticket, found the vs2017 dll and registered it - still no dice.

I've already spent a significant amount of time struggling - uninstalling this and going for Godot - it worked the first time I tried to use it.

ghost commented 4 years ago

System.InvalidOperationException: Could not find a MSBuild installation ( expected 16.0 or later) at Stride.Core.Assets.PackageSessionPublicHelper.FindAndSetMSBuildVersion() at Stride.GameStudio.Program.d__12.MoveNext()

As the error mention, you need version 16.0 or later. Visual Studio 2017 is version 15.9, version installed for you is 15.9.23.

Visual Studio 2019 is 16.0 and later.

bmello4688 commented 4 years ago

918 is similar

Wario-Ametrano commented 3 years ago

I have the same problem i have the latest version of visual studio (visual Studio 2019) and i have the latest version of Stride (4.1.0.1459,I tried to install and remove repeatedly but i am not roisvotp to fix this bug. Cattura

MeharDT commented 3 years ago

I have the same problem i have the latest version of visual studio (visual Studio 2019) and i have the latest version of Stride (4.1.0.1459,I tried to install and remove repeatedly but i am not roisvotp to fix this bug. Cattura

Hi, do you have the latest version of the .Net 5.0 SDK installed? What's the directory path to both your .Net 5 and Visual Studio 2019 installs?

Wario-Ametrano commented 3 years ago

Today I solved this problem, in the latest version of Stride (4.1.0.1459-beta) Net core 5.0 was installed but in reality it was not installed.To solve this problem I uninstalled stride, also visual studio and plugins, then I installed the previous version of Stride (4.0.1.1420) and after installing this version it really installed Net 5.0 and then after that I installed visual studio with the plugin, then after that I installed the latest version of Stride and it works

MeharDT commented 3 years ago

Great to hear! I figured either .Net 5.0 wasn't installed correctly or the install location was missing from Environment Variables -> System Variables -> Path.

snowfall-sc commented 2 years ago

Screenshot 2022-10-07 182942 Stride 4.1.0.1734 (current this comment for lastest version) mistake upgrade for VS studio (17.4.1) 2022 did not work for stride

Edit it work for now https://dotnet.microsoft.com/en-us/download/dotnet/6.0 Window x64 (install)

tebjan commented 2 years ago

The .NET6 SDK should be added to the prerequisites of the installer or launcher.

danielanywhere commented 1 year ago

I currently have Visual Studio 2022 and .NET 7.0 SDK installed. MSBuild 17.4.1 is installed and in the path. Upon running Stride 4.1.0.1734, I receive the following message:

Could not find a compatible version of MSBuild. Check that you have a valid installation with the required workloads, or go to www.visualstudio.com/downloads to install a new one. System.InvalidOperationException: Could not find a MSBuild installation (expected 16.0 or later) at Stride.Core.Assets.PackageSessionPublicHelper.FindAndSetMSBuildVersion() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\assets\Stride.Core.Assets\PackageSessionPublicHelper.cs:line 70 at Stride.GameStudio.Program.Startup(UFile initialSessionPath) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\editor\Stride.GameStudio\Program.cs:line 242

Thanks

tebjan commented 1 year ago

You still need the .NET 6 SDK, or did you install that already?

danielanywhere commented 1 year ago

That fixed it for me. Summary: A recent Visual Studio update with default settings purposely replaces .NET 6.0 SDK with .NET 7.0 SDK. By itself, .NET 7.0 SDK is incompatible with this game engine and re-installing the .NET 6.0 SDK side-by-side may allow the engine to behave as expected when it accesses the MSBUILD tools.

The specific SDK version that needs to be present on your PC is located at https://dotnet.microsoft.com/en-us/download/dotnet/6.0

Select the x64 version.

Thank you tebjan!

Codie-Petersen commented 1 year ago

Just had to uninstall all of my dot net and visual studio editors to get this working. Stride should support a more robust way of detecting or packaging proper compiling tools.