Skip to content

Commit f627f94

Browse files
committed
Fix issue with project failing to load when project name has '.' character
If the project name contain '.' character, while generating the data model file an extra space is added in namespace e.g. "Pixel.Automation.live. in" when project is named "live.in". This causes data model compilation to fail. This might be an issue with roslyn api.
1 parent ec9105e commit f627f94

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Pixel.Automation.AppExplorer.ViewModels/PrefabBuilder/NewPrefabViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private void ValidateProperty(string propertyName)
9292
{
9393
case nameof(PrefabName):
9494
ValidateRequiredProperty(nameof(PrefabName), PrefabName);
95-
ValidatePattern("^([A-Za-z]|[._ ]){4,}$", nameof(PrefabName), PrefabName, "Name must contain only alphabets or ' ' or '_' and should be atleast 4 characters in length.");
95+
ValidatePattern("^([A-Za-z]|[_ ]){4,}$", nameof(PrefabName), PrefabName, "Name must contain only alphabets or ' ' or '_' and should be atleast 4 characters in length.");
9696
if (this.applicationDescriptionViewModel.PrefabsCollection.Any(p => p.PrefabName.Equals(PrefabName)))
9797
{
9898
AddOrAppendErrors(nameof(PrefabName), $"Prefab with name {PrefabName} already exists for application {this.applicationDescriptionViewModel.ApplicationName}");

src/Pixel.Automation.Designer.ViewModels/Screen/NewProjectViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void ValidateProjectName(string projectName)
9696
{
9797
ClearErrors(nameof(Name));
9898
ValidateRequiredProperty(nameof(Name), projectName);
99-
ValidatePattern("^([A-Za-z]|[._ ]){4,}$", nameof(Name), projectName, "Name must contain only alphabets or ' ' or '_' and should be atleast 4 characters in length.");
99+
ValidatePattern("^([A-Za-z]|[_ ]){4,}$", nameof(Name), projectName, "Name must contain only alphabets or ' ' or '_' and should be atleast 4 characters in length.");
100100
if(!IsNameAvailable(projectName))
101101
{
102102
this.AddOrAppendErrors(nameof(Name), "An application already exists with this name");

0 commit comments

Comments
 (0)