Skip to content

Add Stride.Core.CompilerServices to the solution filters (.slnf)#3135

Open
Ethereal77 wants to merge 1 commit intostride3d:masterfrom
Ethereal77:fix/runtime-slnf
Open

Add Stride.Core.CompilerServices to the solution filters (.slnf)#3135
Ethereal77 wants to merge 1 commit intostride3d:masterfrom
Ethereal77:fix/runtime-slnf

Conversation

@Ethereal77
Copy link
Copy Markdown
Contributor

PR Details

Stride.Core packs the analyzers DLL (Stride.Core.CompilerServices) directly from the bin folder. From the .csproj:

<None Include="...\Stride.Core.CompilerServices\bin\$(Configuration)\netstandard2.0\Stride.Core.CompilerServices.dll"
      Pack="true" PackagePath="analyzers/dotnet/cs" />

That means Stride.Core.CompilerServices.dll must already exist on disk when Stride.Core is packed.

Building the full solution Stride.sln succeeds because it has Stride.Core.CompilerServices in its build graph, and when the SDK targets reference that project it automatically builds it first. However, Stride.Runtime.slnf omitted it, and then Stride.Core later failed when it tried to pack the analyzer DLL from disk.

This PR adds the Stride.Core.CompilerServices project to the Stride.Runtime.snlf to fix this. It also adds it to the Stride.Android.slnf and Stride.iOS.slnf for the same reasons.

Related Issue

No issue. Commented on Discord.

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.
  • I have built and run the editor to try this change out.

@Kryptos-FR
Copy link
Copy Markdown
Member

Did you use dotnet or msbuild to build the solution? I think the behavior can be different.

@Ethereal77
Copy link
Copy Markdown
Contributor Author

For the Stride solution itself (and the .slnf files) I always use MSBuild because of the VC++ targets. At least before, using dotnet failed for me the moment it tried to compile one of the .vcxproj files.

@Kryptos-FR
Copy link
Copy Markdown
Member

Kryptos-FR commented Apr 14, 2026

Since a little while ago, you can use llvm+clang instead of MSVC which makes it work with dotnet build. Just add -p:StrideNativeBuildMode=Clang to the dotnet command line (see #3045).

The reason I asked is because it seems that dotnet build is able to get the transitive dependencies that might be msising from the .slnf file, while msbuild needs the full set from the get-go. So that could explain why we didn't see that issue before.

In any case, adding to the .slnf is a reasonable fix.

Comment thread build/Stride.Android.slnf
"..\\sources\\core\\Stride.Core.Mathematics\\Stride.Core.Mathematics.csproj",
"..\\sources\\core\\Stride.Core.MicroThreading\\Stride.Core.MicroThreading.csproj",
"..\\sources\\core\\Stride.Core.Serialization\\Stride.Core.Serialization.csproj",
"..\\sources\\core\\Stride.Core.CompilerServices\\Stride.Core.CompilerServices.csproj",
Copy link
Copy Markdown
Member

@Kryptos-FR Kryptos-FR Apr 14, 2026

Choose a reason for hiding this comment

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

Order in the .slnf has no influence on build order I believe (it's based on the same resolution order than the corresponding .sln), so I think it's better to just keep them sorted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, yes. Until I saw Stride.Core.CompilerServices was being included by the SDK targets, I thought order was somehow affecting the build. I'll revert the reordering of Stride.Core.

Comment thread build/Stride.iOS.slnf Outdated
"..\\sources\\core\\Stride.Core.MicroThreading\\Stride.Core.MicroThreading.csproj",
"..\\sources\\core\\Stride.Core.Serialization\\Stride.Core.Serialization.csproj",
"..\\sources\\core\\Stride.Core.CompilerServices\\Stride.Core.CompilerServices.csproj",
"..\\sources\\core\\Stride.Core\\Stride.Core.csproj",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same

Comment thread build/Stride.Runtime.slnf Outdated
"..\\sources\\core\\Stride.Core.Mathematics\\Stride.Core.Mathematics.csproj",
"..\\sources\\core\\Stride.Core.MicroThreading\\Stride.Core.MicroThreading.csproj",
"..\\sources\\core\\Stride.Core.Serialization\\Stride.Core.Serialization.csproj",
"..\\sources\\core\\Stride.Core.CompilerServices\\Stride.Core.CompilerServices.csproj",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Here it was already below the other Core projects. I only placed the new one above Stride.Core. I'll place it below instead (although it won't matter)

@Ethereal77
Copy link
Copy Markdown
Contributor Author

Since a little while ago, you can use llvm+clang instead of MSVC which makes it work with dotnet build. Just add -p:StrideNativeBuildMode=Clang to the dotnet command line (see #3045).

Oh, I remember having read about that, but haven't tested. Will do tomorrow.

@xen2 xen2 force-pushed the master branch 2 times, most recently from ab329f3 to 482bd28 Compare April 16, 2026 07:56
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.

2 participants