Skip to content

Conversation

@jasonswearingen
Copy link
Contributor

@jasonswearingen jasonswearingen commented Aug 23, 2021

PR Details

Net6+VS2022 support. Should be put into a separate branch for now. The following things need to be fixed before putting in master:

  • VS2022 support only. VS2019 is broken due to VS2022 support #1119 should support both
  • VSPlugin build is broken. Its build process needs to be updated to a x64 system.
  • Net6 is in preview. there may be breaking changes to the runtime in the next couple months before it's RTW

Description

upgrade stride to target DotNet6.0

IT IS DONE/COMPLETE. I'm done so it's really just up to Stride contribs to decide when/where to merge.

Related Issue

see #1125 for detailed description

Motivation and Context

please see the related issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@CLAassistant
Copy link

CLAassistant commented Aug 23, 2021

CLA assistant check
All committers have signed the CLA.

@jasonswearingen jasonswearingen changed the title [Breaking Change] Net6+VS2022 support. Net6+VS2022 support. Aug 23, 2021
@jasonswearingen jasonswearingen marked this pull request as ready for review August 24, 2021 04:00
Copy link
Collaborator

@Eideren Eideren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !
Did you try to create a project under net5 and then open that project with the net6 gamestudio ?
You mentioned the vs plugin being broken over on #1125 is that building the plugin or using it inside of VS.
If it's building then I would think we should take care of that before we merge this in.

@jasonswearingen jasonswearingen changed the title Net6+VS2022 support. Net6+VS2022 support 🚧 Aug 24, 2021
@jasonswearingen
Copy link
Contributor Author

jasonswearingen commented Aug 25, 2021

Did you try to create a project under net5 and then open that project with the net6 gamestudio ?

Yes that works fine. However I just discovered that running a project from within GameStudio fails due to nuget not finding a Microsoft.Net.HostModel assembly v6.0.0. It seems to be a sub-reference and I can't seem to solve this. It works. see update on 2021.08.28

The workaround is to run the game project from visual studio.

You mentioned the vs plugin being broken over on #1125 is that building the plugin or using it inside of VS.
If it's building then I would think we should take care of that before we merge this in.

It is not building. building fails with

Severity	Code	Description	Project	File	Line	Suppression State
Error	VSSDK1000	Failed to load 'C:\Users\Jason\.nuget\packages\microsoft.vssdk.buildtools\15.0.26201\tools\VSSDK\bin\VSCT.exe' Assembly. Could not load file or assembly 'file:///C:\Users\Jason\.nuget\packages\microsoft.vssdk.buildtools\15.0.26201\tools\VSSDK\bin\VSCT.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format.	Stride.VisualStudio.Package	C:\Users\Jason\.nuget\packages\microsoft.vssdk.buildtools\15.0.26201\tools\VSSDK\Microsoft.VsSDK.Common.targets	128	

which is because VSCT.exe is a 32bit app being executed by a 64bit build

@jasonswearingen
Copy link
Contributor Author

jasonswearingen commented Aug 25, 2021

I don't have the expertise to fix the VSPlugin or the Gamestudio running project problems.

@jasonswearingen jasonswearingen changed the title Net6+VS2022 support 🚧 Net6+VS2022 support Aug 25, 2021
@jasonswearingen
Copy link
Contributor Author

@xen2 could you please make a vs2022-net6 branch for this to be pulled into. There are some outstanding issues beyond my ability to fix, plus some ecosystem incompatibilities that should resolve by the time Net6 goes to RTW

@jasonswearingen
Copy link
Contributor Author

jasonswearingen commented Aug 29, 2021

update: Running game studio projects works if done through the Game Studio stand-alone (run from the launcher, not via Visual Studio). So the only thing that needs fixing is the VS Plugin.

I tested by opening the Stride Launcher, adding the local build, then run that gameStudio and loaded various projects

@xen2
Copy link
Member

xen2 commented Aug 29, 2021

Nice work!
I will integrate it directly as a branch (that we can merge in master as soon as .NET 6 is officially released)

@xen2
Copy link
Member

xen2 commented Aug 29, 2021

Longer term we might also want to switch mobile to net6.0-android/ios (of course, not part of this PR and we can still release with current TFM for mobile so nothing mandatory)

was hoping it would help resolve build hanging issues.   It might have helped but was not a solution.
…ncies.

was hoping it would help fix runtime IL bug with animation system, but it did not help. see: #1136
@jasonswearingen
Copy link
Contributor Author

jasonswearingen commented Sep 2, 2021

This PR is the minimum to get net6+VS2022 working.

additional unnecessary updates can be found in https://github.com/jasonswearingen/stride/tree/net6-unnecessary-build-updates

The maintainers may consider merging those also.

Because of how much time it takes to maintain a branch (merging building and testing) I am cutting the net6 work to a single branch. the optional stuff is now merged into the main vs2022-net6 work branch.

#	build/Stride.Launcher.Build.props
#	samples/Audio/SimpleAudio/SimpleAudio.Windows/SimpleAudio.Windows.csproj
#	samples/Games/JumpyJet/JumpyJet.Windows/JumpyJet.Windows.csproj
#	samples/Games/SpaceEscape/SpaceEscape.Windows/SpaceEscape.Windows.csproj
#	samples/Graphics/AnimatedModel/AnimatedModel.Windows/AnimatedModel.Windows.csproj
#	samples/Graphics/CustomEffect/CustomEffect.Windows/CustomEffect.Windows.csproj
#	samples/Graphics/MaterialShader/MaterialShader.Windows/MaterialShader.Windows.csproj
#	samples/Graphics/SpriteFonts/SpriteFonts.Windows/SpriteFonts.Windows.csproj
#	samples/Graphics/SpriteStudioDemo/SpriteStudioDemo.Windows/SpriteStudioDemo.Windows.csproj
#	samples/Input/GravitySensor/GravitySensor.Windows/GravitySensor.Windows.csproj
#	samples/Input/TouchInputs/TouchInputs.Windows/TouchInputs.Windows.csproj
#	samples/Particles/ParticlesSample/ParticlesSample.Windows/ParticlesSample.Windows.csproj
#	samples/Physics/PhysicsSample/PhysicsSample.Windows/PhysicsSample.Windows.csproj
#	samples/Templates/FirstPersonShooter/FirstPersonShooter/FirstPersonShooter.Windows/FirstPersonShooter.Windows.csproj
#	samples/Templates/ThirdPersonPlatformer/ThirdPersonPlatformer/ThirdPersonPlatformer.Windows/ThirdPersonPlatformer.Windows.csproj
#	samples/Templates/TopDownRPG/TopDownRPG/TopDownRPG.Windows/TopDownRPG.Windows.csproj
#	samples/Templates/VRSandbox/VRSandbox/VRSandbox.Windows/VRSandbox.Windows.csproj
#	samples/Tutorials/CSharpBeginner/CSharpBeginner/CSharpBeginner.Windows/CSharpBeginner.Windows.csproj
#	samples/UI/GameMenu/GameMenu.Windows/GameMenu.Windows.csproj
#	samples/UI/UIElementLink/UIElementLink.Windows/UIElementLink.Windows.csproj
#	samples/UI/UIParticles/UIParticles.Windows/UIParticles.Windows.csproj
#	sources/assets/Stride.Core.Assets.CompilerApp/build/Stride.Core.Assets.CompilerApp.targets
#	sources/launcher/Stride.Launcher/Stride.Launcher.csproj
#	sources/shared/Stride.NuGetResolver/Stride.NuGetResolver.projitems
#	sources/targets/Stride.Core.TargetFrameworks.Editor.props
#	sources/targets/Stride.Core.props
#	sources/tools/Stride.NuGetLoader/Stride.NuGetLoader.csproj
xen2 and others added 8 commits September 6, 2021 12:13
…See #1136 (comment)    This commit takes my "last known good" net6 work prior to merging [de0a0cb] and verifies build.   I am integrating in the non-required net6 work because of how time consuming it is to verify+maintain each branch.   Tracking this issue down and reproducing takes aproximately 1 hour per commit.  So to reduce this waste of time I will be maintaining a single net6 branch.    This commit removes some test projects from the stride solutions
…n't actually use the new LoaderToolLocator process yet
# Conflicts:
#	deps/AssemblyProcessor/netstandard2.0/Stride.Core.AssemblyProcessor.Packed.dll
#	deps/AssemblyProcessor/netstandard2.0/Stride.Core.AssemblyProcessor.Packed.dll.hash
#	deps/AssemblyProcessor/netstandard2.0/Stride.Core.AssemblyProcessor.Packed.pdb
#	deps/AssemblyProcessor/netstandard2.0/Stride.Core.AssemblyProcessor.dll
#	deps/AssemblyProcessor/netstandard2.0/Stride.Core.AssemblyProcessor.pdb
#	sources/assets/Stride.Core.Assets.CompilerApp/build/Stride.Core.Assets.CompilerApp.targets
@jasonswearingen
Copy link
Contributor Author

merged xen's fix for UpdateEngine broken (see #1136 )
also applied other bugfixes to CompilerApp changes made in master branch. now working again.

@jasonswearingen
Copy link
Contributor Author

merged stride/master work. auto-merge. didn't test, but glance at the changes show nothing related.

@xen2
Copy link
Member

xen2 commented Nov 3, 2021

Regarding VS2022 support:
#1119 is supposedly fixed in preview 5+ and RC3+
https://developercommunity.visualstudio.com/t/C-projects-are-targeting-Visual-Studio/1506031#T-N1565178

@xen2
Copy link
Member

xen2 commented Nov 3, 2021

Gave a quick try to latest VS2022 + .NET 6
Ran into some issues with NuGet dll clashes between ours and MSBuild (again!).

I think one way to fix that once and for all would be to call MSBuild using out-of-process nodes. That way, all the MSBuild dependencies won't be loaded in GameStudio/CompilerApp process.
However it looks like it's currently broken with .NET Core. I investigated and submitted a PR:
dotnet/msbuild#7013
Crossing fingers that it can be merged in time to be in .NET Core 6.0.1xx dailies soon and VS2022 RTM.

@xen2 xen2 merged commit 9374d4f into stride3d:master Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants