Open MeharDT opened 1 year ago
I tried to reproduce this issue, but Stride opened a link to download the SDK.
The opened URL was https://dotnet.microsoft.com/en-us/download
from clicking the .NET 6 SDK
label.
I don't see the problem here.
Hmm, that's a different error.
Clicking Yes will take you here,
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.22-windows-x64-installer?cid=getdotnetcore
If you install the .NET 6.0 SDK separately, the above prompt no longer appears in subsequent launches.
This error is hardcoded into NET 6 applications. I've seen this exact same error in other NET 6 applications.
ahhh I dont think that's managed by Stride I think thats just the default runtime exception for .NET apps, in this case the GameStudio app.
Ah, interesting! Is there any reason why @NicusorN5 and I would receive different warnings for not having .NET 6 installed?
There may be a silly overlooked component in the engine lol https://github.com/stride3d/stride/blob/896eedbb55d0cb0a4251e5bdf3d4edba83983568/sources/editor/Stride.GameStudio/Program.cs#L234 this code is what looks for the installed SDK but its run within the .NET app so I wonder if this needs to be rethought?
Is there any reason why @NicusorN5 and I would receive different warnings for not having .NET 6 installed?
Because you need both the runtime and SDK to use Stride. Applications made with .NET 6 only require the runtime, hence the error message.
In my case, I uninstalled the SDK, and not the runtime.
@Doprez Stride requires both .NET 6 SDK and MSBuild.
Is there any reason why @NicusorN5 and I would receive different warnings for not having .NET 6 installed?
Because you need both the runtime and SDK to use Stride. Applications made with .NET 6 only require the runtime, hence the error message.
That hasn't been the case in my tests so far (Launcher -> Stride 4.1 -> New Blank Project), I think a rare bug or misconfiguration might be slipping through the cracks here. A quick summary of my tests,
Of course when only the Runtime is installed, projects will fail to generate or build. I haven't noticed any issues when only the SDK is installed. In my main development environment I've only ever had the SDK installed.
I think the mistake is checking with Gamestudio code itself. It should be moved to the Installer from what I can tell.
This wont solve the issue for people manually downloading stride but I honestly dont think thats an issue for any average user since no one seems to do that.
I think @Doprez might have figured it out. My current dev environment only has the .NET 5 SDK installed, I'm guessing that's enough for Startup() to run in Program.cs but not enough for the MSBuild exception to trigger. If I remove both the .NET 5 and 6 SDKs, I get the MSBuild exception.
I imagine this will be a bigger problem with .NET 8 in Stride 4.2 due to the greater likelyhood of .NET 6 or 7 SDKs being present.
Release Type: Official Release
Version: Stride Launcher 5.0.6 Stride 4.1.0.1838
Describe the bug In a development environment without the .NET 6.0 SDK installed, the user is prompted to install the SDK when launching Stride 4.1.x. The prompt will direct them to the download page for the .NET 6.0 Desktop Runtime and not the SDK.
Subsequent launches will no longer warn that the SDK isn't installed, the user will only be notified when attempt to build their project.
To Reproduce Steps to reproduce the behavior:
Expected behavior The Launcher prompt should direct users to the latest version of the .NET 6.0 SDK