Skip to content

Commit

Permalink
Merge pull request #515 from unoplatform/mergify/bp/release/stable/5.…
Browse files Browse the repository at this point in the history
…1/pr-513

fix: adding intentional break for invalid project name (backport #513)
  • Loading branch information
dansiegel authored Jan 24, 2024
2 parents fa271ce + 97c7cb7 commit 5d60cf3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@
},
"replaces": "$sanitizedProjectName$"
},
"failBuildOnInvalidProjectName": {
"type": "generated",
"generator": "regexMatch",
"datatype": "bool",
"parameters": {
"source": "name",
"pattern": "\\s"
}
},
"appId": {
"displayName": "Application ID",
"type": "parameter",
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.Templates/content/unoapp/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<Project>

<!--#if (failBuildOnInvalidProjectName)-->
<Target Name="InvalidProjectName"
BeforeTargets="BeforeBuild">
<Error Text="The project name 'MyExtensionsApp.1' is invalid. Your project name may not contain spaces as this will break various .NET Source Generators and MSBuild targets." />
</Target>
<!--#endif-->
</Project>

0 comments on commit 5d60cf3

Please sign in to comment.