kniEngine / kni

KNI is a cross-platform C# game framework.
Other
130 stars 9 forks source link

Cannot Create Multiplatform Template in VS 2022 17.10.2 #1672

Closed thygrrr closed 2 months ago

thygrrr commented 3 months ago

Trying to create the multiplatform template results in an empty / configuration-less project. During the creation process, Visual Studio gives me a series of errors.

I attached the generated project files for reference. repro-project-as-generated.zip

image

This is my general dev system and I just installed basically all workloads to make sure it's not something missing on my end. (maybe it still is, but at this point I'm stumped)

devenv_DUMyd49fMf devenv_tZnu4Qi4Dc devenv_tcyn6QyTCK devenv_65QXtFrO7V devenv_wpxpkR4iDd

It has literally no configurations and only the shared project (not sure what's expected, but I would have assumed some additional .csproj files). The mentioned path in the error messages apparently exists (see attached zip and following screenshots)

There's no suitable project to set as startup... image image

... and Rider finds it equally barren. image image

What version of KNI does the bug occur on:

What operating system are you using:

PS P:\> dotnet --list-sdks
6.0.129 [C:\Program Files\dotnet\sdk]
6.0.203 [C:\Program Files\dotnet\sdk]
6.0.321 [C:\Program Files\dotnet\sdk]
6.0.421 [C:\Program Files\dotnet\sdk]
7.0.408 [C:\Program Files\dotnet\sdk]
8.0.104 [C:\Program Files\dotnet\sdk]
8.0.204 [C:\Program Files\dotnet\sdk]
8.0.300 [C:\Program Files\dotnet\sdk]

What KNI platform are you using:

thygrrr commented 3 months ago

The same error exists trying to generate on a different volume e.g. image

thygrrr commented 3 months ago

The error appears related to dashes in the project names; dots, for example, do not raise this error.

However, using dots (even though parts of KNI itself uses dots) in the project name leads to the generation of broken source code.

image (to run all this way away from Unity, only to find my designs foiled once again... by DOTS...)

Expectation: All legal input characters should be appropriately escaped by the template script, all illegal ones rejected before generation starts.

nkast commented 2 months ago

The problem is that the templates use $safeprojectname$ in some places and $projectname$ in other...

As for the problems with dots in the project name, it looks like using custom class names isn't really supported, and we have to revert back to a fixed name, like Game1. I am going to ignore this problem, and revisit it once we move to new dotNet templates. https://github.com/kniEngine/kni/issues/1617