-
Preview 4 of Aspire gives following exception when trying to start the AppHost:
The culprit is in defining a project like:
This works fine with preview 3. |
Beta Was this translation helpful? Give feedback.
Answered by
davidfowl
Mar 12, 2024
Replies: 2 comments 17 replies
-
Yep, we changed the naming constraints. Change the . to a dash or underscore |
Beta Was this translation helpful? Give feedback.
15 replies
Answer selected by
Depechie
-
@davidfowl encountered the same exception when trying to move and exiting project from a docker compose setup to Aspire vis-a-vis the SqlServer db name. XX_SOMENAME_SOMEOTHERNAME is a valid DB name in SqlServer Unhandled exception. System.ArgumentException: Resource name 'XX_SOMENAME_SOMEOTHERNAME' is invalid. Name must contain only ASCII letters, digits, and hyphens. (Parameter 'name')
at Aspire.Hosting.ApplicationModel.ModelName.ValidateName(String target, String name) in /_/src/Aspire.Hosting/ApplicationModel/ModelName.cs:line 39
at Aspire.Hosting.ApplicationModel.Resource..ctor(String name) in /_/src/Aspire.Hosting/ApplicationModel/Resource.cs:line 30
at Aspire.Hosting.ApplicationModel.SqlServerDatabaseResource..ctor(String name, String databaseName, SqlServerServerResource parent) in /_/src/Aspire.Hosting/SqlServer/SqlServerDatabaseResource.cs:line 14
at Aspire.Hosting.SqlServerBuilderExtensions.AddDatabase(IResourceBuilder`1 builder, String name, String databaseName) in /_/src/Aspire.Hosting/SqlServer/SqlServerBuilderExtensions.cs:line 71 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, we changed the naming constraints. Change the . to a dash or underscore