stride3d / stride3d/stride

Current Stride.Native.targets file prevents from using modern NET MSBuild

Open
#2,278 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Build enhancement
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Is your feature request related to a problem? Please describe.

Problem: Currently you can't build an engine using modern MSBuild, because C++/CLI is not supported here. Also Visual C++ is only available on Windows.

# not possible
dotnet build / dotnet msbuild Stride.sln
# instead we use .NET Framework msbuild
msbuild Stride.sln

Cause: When you take a look at Stride.Native.targets file is using WindowsDesktop.vcxproj project contains ONLY EMPTY dllmain file which is included to dedicated native library (e.g. for libstrideaudio.dll, libstridenavigation.dll etc)

Solution

Lines from 131 to 134 in Stride.Native.targets file can be modified to use clang or cmake tool. If implemented correctly that could allow to crosscompile on Linux (in the far future ofc, when Linux platform will be good enough supported) which is usefull for cheaper to execute CI/CD pipelines.

Solution benefits

  • No need to install legacy .NET Framework msbuild - you could build an engine using dotnet CLI simply using dotnet build
  • Reduction of complexity
  • Possibility to use more lightweight editors like VSCode for Stride source debugging

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sources/native/Stride.Native.targets, especially lines 131–134, and inspect how the WindowsDesktop.vcxproj with its empty dllmain is used when building Stride.sln. Compare the current .NET Framework msbuild path with dotnet build and evaluate the proposed clang or CMake direction; done means the engine builds with modern MSBuild without the legacy .NET Framework msbuild dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, csharp
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.