Skip to content

Commit 651d10f

Browse files
committed
fixing up solution files to work with conditional aspire and slnx
1 parent e31ebc6 commit 651d10f

File tree

5 files changed

+42
-10
lines changed

5 files changed

+42
-10
lines changed

.template.config/template.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,27 @@
1414
"name": "ASP.NET Clean Architecture Solution",
1515
"shortName": "clean-arch",
1616
"sourceName": "Clean.Architecture",
17+
"templateFileExtensions": [ ".cs", ".csproj", ".slnx" ],
1718
"preferNameDirectory": true,
1819
"symbols": {
1920
"aspire": {
2021
"type": "parameter",
2122
"datatype": "bool",
22-
"defaultValue": "false",
23+
"defaultValue": "true",
2324
"description": "Include .NET Aspire."
2425
}
2526
},
2627
"sources": [
2728
{
29+
"include": [
30+
"**/*"
31+
],
2832
"exclude": [
2933
".vs/**",
3034
".vscode/**",
3135
".git/**",
3236
".github/**",
33-
".template.config",
37+
".template.config/**",
3438
"sample/**"
3539
],
3640
"modifiers": [
@@ -43,12 +47,8 @@
4347
]
4448
},
4549
{
46-
"condition": "(aspire)",
47-
"include": [
48-
"src/Clean.Architecture.AspireHost/**",
49-
"src/Clean.Architecture.ServiceDefaults/**",
50-
"tests/Clean.Architecture.AspireTests/**"
51-
]
50+
"condition": "true",
51+
"copyOnly": [ "*.dll", "*.png", "*.ico", "*.jpg", "*.jpeg", "*.ps1" ]
5252
}
5353
]
5454
}

Clean.Architecture-NoAspire.slnx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Solution>
2+
<Configurations>
3+
<Platform Name="Any CPU" />
4+
<Platform Name="x64" />
5+
<Platform Name="x86" />
6+
</Configurations>
7+
<Folder Name="/Solution Items/">
8+
<File Path=".editorconfig" />
9+
<File Path="CleanArchitecture.nuspec" />
10+
<File Path="Directory.Build.props" />
11+
<File Path="Directory.Packages.props" />
12+
</Folder>
13+
<Folder Name="/src/">
14+
<Project Path="src/Clean.Architecture.Core/Clean.Architecture.Core.csproj" />
15+
<Project Path="src/Clean.Architecture.Infrastructure/Clean.Architecture.Infrastructure.csproj" />
16+
<Project Path="src/Clean.Architecture.UseCases/Clean.Architecture.UseCases.csproj" />
17+
<Project Path="src/Clean.Architecture.Web/Clean.Architecture.Web.csproj" />
18+
</Folder>
19+
<Folder Name="/tests/">
20+
<Project Path="tests/Clean.Architecture.FunctionalTests/Clean.Architecture.FunctionalTests.csproj">
21+
<BuildDependency Project="src/Clean.Architecture.Web/Clean.Architecture.Web.csproj" />
22+
</Project>
23+
<Project Path="tests/Clean.Architecture.IntegrationTests/Clean.Architecture.IntegrationTests.csproj">
24+
<BuildDependency Project="src/Clean.Architecture.Infrastructure/Clean.Architecture.Infrastructure.csproj" />
25+
</Project>
26+
<Project Path="tests/Clean.Architecture.UnitTests/Clean.Architecture.UnitTests.csproj" />
27+
</Folder>
28+
</Solution>

Clean.Architecture.sln

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Global
137137
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x64.Build.0 = Release|Any CPU
138138
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x86.ActiveCfg = Release|Any CPU
139139
{B74A78FF-B79E-4C38-A9C7-084A90990CAD}.Release|x86.Build.0 = Release|Any CPU
140+
#if (aspire)
140141
{08E69B3B-4418-40BD-80EC-B38C0ECFBAE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
141142
{08E69B3B-4418-40BD-80EC-B38C0ECFBAE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
142143
{08E69B3B-4418-40BD-80EC-B38C0ECFBAE2}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -173,6 +174,7 @@ Global
173174
{07D864BA-6245-D5C0-5C79-BB55D27ACBBF}.Release|x64.Build.0 = Release|Any CPU
174175
{07D864BA-6245-D5C0-5C79-BB55D27ACBBF}.Release|x86.ActiveCfg = Release|Any CPU
175176
{07D864BA-6245-D5C0-5C79-BB55D27ACBBF}.Release|x86.Build.0 = Release|Any CPU
177+
#endif
176178
EndGlobalSection
177179
GlobalSection(SolutionProperties) = preSolution
178180
HideSolutionNode = FALSE
@@ -185,9 +187,11 @@ Global
185187
{0776DC14-9000-47A4-A3F4-ECBCF8CEBC17} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
186188
{1DC7F5A0-DDF7-4975-84EB-05F4FC1B6AB5} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
187189
{B74A78FF-B79E-4C38-A9C7-084A90990CAD} = {106AE906-5075-410A-B941-912F811848EE}
190+
#if (aspire)
188191
{08E69B3B-4418-40BD-80EC-B38C0ECFBAE2} = {106AE906-5075-410A-B941-912F811848EE}
189192
{C7039CB5-4F76-4F19-ABD7-C755FAB2A870} = {106AE906-5075-410A-B941-912F811848EE}
190193
{07D864BA-6245-D5C0-5C79-BB55D27ACBBF} = {B31B4797-1D9F-4288-808C-BE9A31A98C7D}
194+
#endif
191195
EndGlobalSection
192196
GlobalSection(ExtensibilityGlobals) = postSolution
193197
SolutionGuid = {B0F19343-8185-4A9F-9165-0EA8544BC925}

Clean.Architecture.slnx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
</Folder>
1313
<Folder Name="/src/">
1414
<Project Path="src/Clean.Architecture.AspireHost/Clean.Architecture.AspireHost.csproj" />
15+
<Project Path="src/Clean.Architecture.ServiceDefaults/Clean.Architecture.ServiceDefaults.csproj" />
1516
<Project Path="src/Clean.Architecture.Core/Clean.Architecture.Core.csproj" />
1617
<Project Path="src/Clean.Architecture.Infrastructure/Clean.Architecture.Infrastructure.csproj" />
17-
<Project Path="src/Clean.Architecture.ServiceDefaults/Clean.Architecture.ServiceDefaults.csproj" />
1818
<Project Path="src/Clean.Architecture.UseCases/Clean.Architecture.UseCases.csproj" />
1919
<Project Path="src/Clean.Architecture.Web/Clean.Architecture.Web.csproj" />
2020
</Folder>

sample/src/NimblePros.SampleToDo.Core/ContributorAggregate/Contributor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public Contributor(ContributorName name)
1313

1414
public Contributor UpdateName(ContributorName newName)
1515
{
16-
if (Name.Equals(newName)) return;
16+
if (Name.Equals(newName)) return this;
1717
Name = newName;
1818
this.RegisterDomainEvent(new ContributorNameUpdatedEvent(this));
1919
return this;

0 commit comments

Comments
 (0)