Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avalonia.xplat template replaces spaces with underscores in project references #240

Open
Yveske1966 opened this issue Nov 27, 2023 · 5 comments · May be fixed by #257
Open

avalonia.xplat template replaces spaces with underscores in project references #240

Yveske1966 opened this issue Nov 27, 2023 · 5 comments · May be fixed by #257
Labels

Comments

@Yveske1966
Copy link

Describe the bug

The picture below says it all. The path itself remains without spaces, while internally Avalonia expects underscores.

To Reproduce

Make a new solution with spaces in its name and try to compile

Expected behavior

Avalonia should either refrain from making changes or change the path as well.

Screenshots

My program with spaces

Environment

  • OS: Windows 11 Pro 22H2
  • PC: AMD Ryzen 9 3950X 16-Core Processor
  • RAM: 64,0 GB
  • VS; Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.9.0 Preview 1.0
  • Avalonia-Version: 11.0.5

Additional context

None

@Yveske1966 Yveske1966 added the bug label Nov 27, 2023
@thevortexcloud
Copy link

thevortexcloud commented Nov 27, 2023

For additional context, this is a follow up to this discussion: AvaloniaUI/Avalonia#13726

@MrJul
Copy link
Member

MrJul commented Nov 27, 2023

Please note that Avalonia itself doesn't care about the spaces. Nor does MSBuild. I believe it's an issue with the project templates, where the spaces were replaced with underscores at creation.

Can you please confirm that you were using the avalonia.xplat template? If yes, I'll move this issue to the templates repository.

In the meantime, you should be able to replace the underscores with spaces in the .sln and .csproj and get everything to compile (it might be faster to simply create a project without spaces from the templates though).

@Yveske1966
Copy link
Author

I added the Avalonia extension to Visual Studio and created a new project with the "Avalonia Cross Platform Application (AvaloniaUI) template. As I'm new to this, I don't know if that matches avalonia.xplat.

@MrJul
Copy link
Member

MrJul commented Nov 27, 2023

Yes, that's the one. I can clearly reproduce the problem with it.
I'm moving this issue to the templates repo, thanks.

@MrJul MrJul transferred this issue from AvaloniaUI/Avalonia Nov 27, 2023
@MrJul MrJul changed the title Avalonia replaces spaces in the solution name, but doesn't change the path as well, so it can't find its own files no longer avalonia.xplat template replaces spaces with underscores in project references Nov 27, 2023
@maxkatz6
Copy link
Member

Duplicate of #165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants