Skip to content

[Build] Need to document build system #1129

@jasonswearingen

Description

@jasonswearingen

Is your feature request related to a problem? Please describe.
Extremely difficult to learn how the build/nuget system works, or debug issues when they arise.

Describe the solution you'd like
Document how both the dev-time MSBuild system works, and how the runtime Nuget import system works.

Describe alternatives you've considered

  • Looking through the Stride.sln
    • Very difficult because of how VS invisibly utilizes the build system. I have found that certain files like SharedAssemblyInfo.cs contain config info but do not know how this is actually utilized in the build system.
  • Debug build breaks
    • Very difficult because of how msbuild rewrites the output folder locations. I see that various .csproj contain references to the build system files by including lines such as <Import Project="..\..\targets\Stride.Core.props" /> but how does one go about debugging that?
      • For example Stride.Core.props contains the line <StrideAssemblyProcessorOptions Condition="'$(StrideAssemblyProcessorOptions)' == ''">--auto-notify-property --auto-module-initializer --serialization</StrideAssemblyProcessorOptions> What does this StrideAssemblyProcessor do, why is it here in this global config, and how does one go about testing/debugging it?
  • Debug runtime nuget import breaks
    • In my Net6 port of Stride, when I try to run a game project from the Stride.GameStudio app, I get an error with no ability to break on exception occuring:
[C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(536,5)]: Error: The "CreateAppHost" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.NET.HostModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (0x80131621)
File name: 'Microsoft.NET.HostModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
 ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.NET.HostModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly) in System.Private.CoreLib.dll:token 0x6003af5+0x2e
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) in System.Private.CoreLib.dll:token 0x6003b31+0x5d
   at Microsoft.Build.Shared.MSBuildLoadContext.Load(AssemblyName assemblyName) in Microsoft.Build.dll:token 0x6001d5e+0x0
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) in System.Private.CoreLib.dll:token 0x6003b41+0x20
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) in System.Private.CoreLib.dll:token 0x6003b3e+0x7
   at Microsoft.NET.Build.Tasks.CreateAppHost.ExecuteCore()
   at Microsoft.NET.Build.Tasks.TaskBase.Execute() in Microsoft.NET.Build.Tasks.dll:token 0x60005b2+0x2e
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() in Microsoft.Build.dll:token 0x6001602+0x3e
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) in Microsoft.Build.dll:token 0x6001481+0x804
  • In Stride.Core.Assets.csproj I see <PackageReference Include="Microsoft.NET.HostModel" Version="3.1.5" />
    • Why is 6.0.0.0 trying to be loaded, when 3.1.5 is specified?
    • What code/app is making this request to load Microsoft.NET.HostModel?

other info*
There should also be some minimal (one or two sentences) explaining what each of the (many) stride assemblies do

  • Stride.Core.Reflection?
  • Stride.Core?
  • Irony?
  • etc...etc....

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions