stride icon indicating copy to clipboard operation
stride copied to clipboard

Multiple Projects require Module class if they reference eachother.

Open Doprez opened this issue 1 year ago • 6 comments

Release Type: official

Version: 4.2.0.2122

Platform(s): Windows

Describe the bug When you hae a multiproject structure and the projects reference eachother, they wont show components in the GameStudio.

To Reproduce Steps to reproduce the behavior:

  1. create base project
  2. add another project through VS
  3. add a StatupScript to the external project
  4. Now you should see the Script in GameStudio after a restart
  5. create a reference between the external project and the main
  6. after retarting GameStudio you will not see the components in that external project anymore

Expected behavior The components should still show in the drop down since it will be very likely the references will exist.

Additional context There is a work around, in each of the external projects you can add a Module class and the components should show up normally.

Repro: https://github.com/Doprez/MultiProjectIssue/tree/main

Doprez avatar Mar 25 '24 19:03 Doprez

https://github.com/stride3d/stride/commit/26c36962fbd02868369a89da1c893278f4f14f88

Should be related to the commit above once this gets looked into.

Doprez avatar Mar 25 '24 19:03 Doprez

26c3696

Should be related to the commit above once this gets looked into.

or atleast in that area

IXLLEGACYIXL avatar Mar 25 '24 19:03 IXLLEGACYIXL

Module shouldn't be required. But you should need to reference the asset compiler package, which I think was always the case. Not sure if a package file is necessary. I think it does if there are assets other than code.

Also it's unclear which project references which one in your case, as two projects cannot each reference each other. That's not allowed in .NET.

Kryptos-FR avatar Mar 26 '24 20:03 Kryptos-FR

the sdpkg file is ( should ) only be needed when you have assets in your sub project

the module is the current workaround around that bug

IXLLEGACYIXL avatar Mar 26 '24 20:03 IXLLEGACYIXL

Also it's unclear which project references which one in your case, as two projects cannot each reference each other. That's not allowed in .NET.

My mistake, the amount of projects dont matter in this case I was just testing 2 scenarios.

  1. if the project exists in the solution but doesnt reference the main project then components show up in editor
  2. if the project exists in the solution but does reference the main project then components do not show up in editor

I think I may have messed up my repro if the project does not show those 2 scenarios and I will fix it when I can.

I will also see if the same issue applies if the Asset Compiler is referenced, I did not try with that.

for more context, there was a discussion Joreyk, Vaso and I had in Discrod here

Doprez avatar Mar 26 '24 20:03 Doprez

the problem is in the projectwatcher afaik

1. change the Class2
2. projectwatcher sends a broadcast with the change list of OddBehaviour ( only that project, because csproj changed??? )
3. triggers reload screen
4. projectwatcher sends broadcasts with the changes oddbehaviour.test2.dll
5. dll changes arent included in the reload as binary changes will get ignroed for the relaod screen :(

in addition to that.. why are these binary changes? its a project change... it shouldnt even happen

IXLLEGACYIXL avatar May 27 '24 00:05 IXLLEGACYIXL