This repository tests Stride external package reference problem test. This is tested on Stride-4.2.0.2067
If There is NuGet package which has custom component and add nuget refs to project, custom component is not displayed in Stride editor's component list.
The Stride library project which has custom component for using other projects.
The Stride game project which has ProjectReference
to ExternalPackage1
The Stride game project which has PackageReference
to ExternalPackage1
- install Cake.Tool with
dotnet tool install -g Cake.Tool
- do
dotnet cake build.cake --configuration Release
in top directory of repo- then
nupkg/ExternalPackage1.[PackageVersion].nupkg
will be created
- then
- open "ExternalPacakge1/ExternalPackage1.sln" for test "RefByProject" with Stride editor
- open "RefByNuPkg/RefByNuPkg.sln" for test "RefByNuPkg" with Stride editor
- select any entity in project and open dropdown list which named "Add component" in right side of editor
- add
Stride.Core.ModuleInitializerAttribute
to some public void static method in nuget package project - do
Stride.Core.Reflection.AssemblyRegistry.Register(Assembly asm, AssemblyCommonCategories category)
in static method
here is example code
using System.Reflection;
using Stride.Core;
using Stride.Core.Reflection;
namespace ExternalPackage1;
internal class Module
{
[ModuleInitializer]
public static void InitializeModule()
{
AssemblyRegistry.Register(typeof(Module).GetTypeInfo().Assembly, AssemblyCommonCategories.Assets);
}
}