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

project creation error when application name has hyphen #134

Closed
antidemon opened this issue May 3, 2022 · 3 comments
Closed

project creation error when application name has hyphen #134

antidemon opened this issue May 3, 2022 · 3 comments

Comments

@antidemon
Copy link

Followed https://www.mudblazor.com/getting-started/installation#using-our-dotnet-templates to create a new project but had an error on this command:
dotnet new mudblazor --host wasm --name dashboard-demo

The template "MudBlazor Templates" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on C:\Source\repos\Dud...
C:\Program Files\dotnet\sdk\6.0.202\NuGet.targets(289,5): error MSB3202: The project file "C:\Source\repos\Dud\dashboard_demo.csproj" was not found. [C:\Source\repos\Dud\dashboard-demo.sln]
Restore failed.
Post action failed.
Manual instructions: Run 'dotnet restore'

The solution file has:
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dashboard_demo", "dashboard_demo.csproj", "{31840BA8-8B37-4929-9BCF-414518ACB738}"

but the project file is called
dashboard-demo.csproj

@sambhavyadav90
Copy link

  • Actual behavior

The original Source Name gets replaced with dashboard_demo inside source files (e.g. in the .sln file or the server's Program.cs) but with dashboard-demo in file and folder names.

The mismatch between paths expected by the .sln file (it expects the projects in dashboard_demo and dashboard_demo folders while they actually are in dashboard-demo. and dashboard-demo folders) breaks the .sln file and thus the template's build.

  • You can create a new project like "dahsboard.demo"
  • dotnet new mudblazor --host wasm --name dahsboard.demo

@antidemon
Copy link
Author

Thanks for the workaround suggestions but I just edited the sln file manually.

@Garderoben
Copy link
Member

We have new template now with .NET 8 #448

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

No branches or pull requests

3 participants