Skip to content

Commit 2403770

Browse files
authored
Remove Spa-templates from repo (#49413)
* Remove Spa-templates from repo * Update template baseline * Update more tests * Fix .json * Remove SPA test
1 parent f6b4cfd commit 2403770

23 files changed

+11
-321
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@
66
path = src/submodules/MessagePack-CSharp
77
url = https://github.com/aspnet/MessagePack-CSharp.git
88
branch = master
9-
[submodule "src/submodules/spa-templates"]
10-
path = src/submodules/spa-templates
11-
url = https://github.com/dotnet/spa-templates.git
12-
branch = main

AspNetCore.sln

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProjectTemplates", "Project
962962
EndProject
963963
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Web.ProjectTemplates", "src\ProjectTemplates\Web.ProjectTemplates\Microsoft.DotNet.Web.ProjectTemplates.csproj", "{5D3C520F-0CA7-4759-A563-40496545FA48}"
964964
EndProject
965-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Web.Spa.ProjectTemplates", "src\submodules\spa-templates\src\Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj", "{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}"
966-
EndProject
967965
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Web.Client.ItemTemplates", "src\ProjectTemplates\Web.Client.ItemTemplates\Microsoft.DotNet.Web.Client.ItemTemplates.csproj", "{4F2C221D-7D0B-46B3-9362-2D68F92ECF29}"
968966
EndProject
969967
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Web.ItemTemplates", "src\ProjectTemplates\Web.ItemTemplates\Microsoft.DotNet.Web.ItemTemplates.csproj", "{D0E73F40-0DA9-42A9-8A88-EED8D5EFBEFB}"
@@ -6246,22 +6244,6 @@ Global
62466244
{5D3C520F-0CA7-4759-A563-40496545FA48}.Release|x64.Build.0 = Release|Any CPU
62476245
{5D3C520F-0CA7-4759-A563-40496545FA48}.Release|x86.ActiveCfg = Release|Any CPU
62486246
{5D3C520F-0CA7-4759-A563-40496545FA48}.Release|x86.Build.0 = Release|Any CPU
6249-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6250-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
6251-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Debug|arm64.ActiveCfg = Debug|Any CPU
6252-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Debug|arm64.Build.0 = Debug|Any CPU
6253-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Debug|x64.ActiveCfg = Debug|Any CPU
6254-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Debug|x64.Build.0 = Debug|Any CPU
6255-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Debug|x86.ActiveCfg = Debug|Any CPU
6256-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Debug|x86.Build.0 = Debug|Any CPU
6257-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
6258-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Release|Any CPU.Build.0 = Release|Any CPU
6259-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Release|arm64.ActiveCfg = Release|Any CPU
6260-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Release|arm64.Build.0 = Release|Any CPU
6261-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Release|x64.ActiveCfg = Release|Any CPU
6262-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Release|x64.Build.0 = Release|Any CPU
6263-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Release|x86.ActiveCfg = Release|Any CPU
6264-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD}.Release|x86.Build.0 = Release|Any CPU
62656247
{4F2C221D-7D0B-46B3-9362-2D68F92ECF29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62666248
{4F2C221D-7D0B-46B3-9362-2D68F92ECF29}.Debug|Any CPU.Build.0 = Debug|Any CPU
62676249
{4F2C221D-7D0B-46B3-9362-2D68F92ECF29}.Debug|arm64.ActiveCfg = Debug|Any CPU
@@ -11100,7 +11082,6 @@ Global
1110011082
{6BDD94A4-91DF-40F5-A1CE-88D46F26084F} = {088C37A5-30D2-40FB-B031-D163CFBED006}
1110111083
{08D53E58-4AAE-40C4-8497-63EC8664F304} = {017429CC-C5FB-48B4-9C46-034E29EE2F06}
1110211084
{5D3C520F-0CA7-4759-A563-40496545FA48} = {08D53E58-4AAE-40C4-8497-63EC8664F304}
11103-
{C732CA83-EEBE-4DAB-B567-5A35640FE8CD} = {08D53E58-4AAE-40C4-8497-63EC8664F304}
1110411085
{4F2C221D-7D0B-46B3-9362-2D68F92ECF29} = {08D53E58-4AAE-40C4-8497-63EC8664F304}
1110511086
{D0E73F40-0DA9-42A9-8A88-EED8D5EFBEFB} = {08D53E58-4AAE-40C4-8497-63EC8664F304}
1110611087
{6DE03095-7EAC-41DF-8AE4-3018ED29BC61} = {08D53E58-4AAE-40C4-8497-63EC8664F304}

docs/UpdatingMajorVersionAndTFM.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Typically, we will update the Major Version before updating the TFM. This is bec
1717
4. Change `PreReleaseBrandingLabel` to `Alpha $(PreReleaseVersionIteration)`.
1818
* In [src/Framework/test/TestData.cs](/src/Framework/test/TestData.cs), update `ListedTargetingPackAssemblies` by incrementing the AssemblyVersion of all aspnetcore assemblies by 1 major version. Once dotnet/runtime updates their AssemblyVersions, we also need to update those in this file. They typically make that change at the same time as their TFM update, but we change our AssemblyVersions as soon as we update branding.
1919
* Add entries to [NuGet.config](/NuGet.config) for the new Major Version's feed. This just means copying the current feeds (e.g. `dotnet8` and `dotnet8-transport`) and adding entries for the new feeds (`dotnet9` and `dotnet9-transport`). Make an effort to remove old feeds here at the same time.
20-
* In [src/ProjectTemplates/Shared/TemplatePackageInstaller.cs](/src/ProjectTemplates/Shared/TemplatePackageInstaller.cs), add entries to `_templatePackages` for `Microsoft.DotNet.Web.ProjectTemplates` and `Microsoft.DotNet.Web.Spa.ProjectTemplates` matching the new version.
20+
* In [src/ProjectTemplates/Shared/TemplatePackageInstaller.cs](/src/ProjectTemplates/Shared/TemplatePackageInstaller.cs), add an entry to `_templatePackages` for `Microsoft.DotNet.Web.ProjectTemplates` matching the new version.
2121
* In [eng/targets/CSharp.Common.props](/eng/targets/CSharp.Common.props) for the previous release branch, modify the `<LangVersion>` to be a hardcoded version instead of `preview`. (e.g. If main is being updated to 8.0.0 modify the `<LangVersion>` in the release/7.0 branch). See https://learn.microsoft.com/dotnet/csharp/language-reference/configure-language-version#defaults to find what language version to use.
2222
* Mark APIs from the previous release as Shipped by running `.\eng\scripts\mark-shipped.cmd`. **Note that it's best to do this as early as possible after the API surface is finalized from the previous release** - make sure to be careful that any new API in `main` that isn't shipped as part of the previous release, stays in `PublicAPI.Unshipped.txt` files.
2323
* One way to ensure this is to check out the release branch shipping the previous release (**after API surface area has been finalized**), run `.\eng\scripts\mark-shipped.cmd` there, copy over all of the `PublicAPI.Unshipped.txt` and `PublicAPI.Shipped.txt` files into a new branch based off of `main`, and build the repo. Any failures there will tell you whether or not there are new APIs in main that need to be put back into the `PublicAPI.Unshipped.txt` files.
@@ -45,20 +45,14 @@ Once dotnet/runtime has updated their TFM, we update ours in the dependency upda
4545
2. Add entries in [eng/Versions.props](/eng/Versions.props) similar to [these](https://github.com/dotnet/aspnetcore/blob/216c92b78bce31d5e81a70b589707ec2ae5ab21a/eng/Versions.props#L224-L226) - the version should be from the latest released build of .Net.
4646
3. Add entries in [eng/Dependencies.props](/eng/Dependencies.props) similar to [these](https://github.com/dotnet/aspnetcore/blob/a47c0a58d7002b9a530c67532366b9db96d73cc6/eng/Dependencies.props#L119-L120).
4747
* Update AssemblyVersions for dotnet/runtime assemblies in [src/Framework/test/TestData.cs](/src/Framework/test/TestData.cs).
48-
* Update dotnet/spa-templates
49-
1. Create a `release/{n}.0` branch in dotnet/spa-template based off of `main`, where `n` is the MajorVersion we are updating from (not the one we are updating to).
50-
2. Create a PR like [this one](https://github.com/dotnet/aspnetcore/pull/36932) updating the current release branch in `aspnetcore` to reference the new release branch you just created in dotnet/spa-templates.
51-
3. Create a PR like [this one](https://github.com/dotnet/spa-templates/pull/21) updating the branding & TFM in the `main` branch of dotnet/spa-templates.
52-
* Do not merge this until the PR from the previous step is merged.
5348
* Update template precedence
54-
1. Create & merge a PR like [this one](https://github.com/dotnet/spa-templates/pull/105) in dotnet/spa-templates updating `precedence` and `identity` elements in all template.json files, as well as replacing any references to the previous TFM with the new on in templatestrings.json files.
49+
1. Create a PR like [this one](https://github.com/dotnet/aspnetcore/pull/39783) in dotnet/aspnetcore that updates the `precedence`, `identity`, and (if it exists) `thirdPartyNotices` elements in all template.json files.
50+
* Make sure to update _all_ template.json files, including project templates and item templates.
5551
* Going forward, Precedence values should be (9000 + (Major Version) * 100) for 8.0 and 9.0, and (Major Version \* 1000) after that.
5652
* This means 8.0's Precedence should be 9800, 9.0's should be 9900, 10.0's should be 10000, 11.0's should be 11000, and so on.
5753
* If we need to release a Minor version of any of these, use the first zero digit after the Major version to represent that (e.g. 9810 for 8.1, 10100 for 10.1).
58-
2. Create a PR like [this one](https://github.com/dotnet/aspnetcore/pull/39783) in dotnet/aspnetcore that updates the spa-templates submodule, and updates the `precedence`, `identity`, and (if it exists) `thirdPartyNotices` elements in all template.json files.
59-
* Make sure to update _all_ template.json files, including project templates and item templates.
60-
* Use the same precedence scheme as above.
61-
3. Make sure the new aka.ms link you're referencing in `thirdPartyNotices` exists.
54+
55+
2. Make sure the new aka.ms link you're referencing in `thirdPartyNotices` exists.
6256
* In [src/Framework/AspNetCoreAnalyzers/test/Verifiers/CSharpRouteHandlerCodeFixVerifier.cs](/src/Framework/AspNetCoreAnalyzers/test/Verifiers/CSharpRouteHandlerCodeFixVerifier.cs), update the references to `ReferenceAssemblies.Net.Netx0` with the latest version.
6357

6458
### Validation

eng/Build.props

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@
3939
" />
4040

4141
<!-- These projects are not meant to be built in this repo. In the Installers case, must explicitly opt in. -->
42-
<!-- On the other hand, the main spa-templates project is just another project in this repo. -->
4342
<ProjectToExclude Include="
4443
$(RepoRoot)src\submodules\googletest\**\*.*proj;
4544
$(RepoRoot)src\submodules\MessagePack-CSharp\**\*.*proj;
46-
$(RepoRoot)src\submodules\spa-templates\src\content\**\*.csproj;
4745
$(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj;
4846
$(RepoRoot)src\Installers\**\*.*proj;
4947
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.*proj;
@@ -196,7 +194,6 @@
196194
$(RepoRoot)src\Testing\**\*.csproj;
197195
$(RepoRoot)src\Grpc\**\*.csproj;
198196
$(RepoRoot)src\ProjectTemplates\**\*.csproj;
199-
$(RepoRoot)src\submodules\spa-templates\src\*.csproj;
200197
$(RepoRoot)src\Extensions\**\*.csproj;
201198
$(RepoRoot)src\BuildAfterTargetingPack\*.csproj;
202199
$(RepoRoot)src\OpenApi\**\*.csproj;

src/ProjectTemplates/ProjectTemplates.slnf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@
9292
"src\\SignalR\\common\\Protocols.NewtonsoftJson\\src\\Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj",
9393
"src\\SignalR\\common\\SignalR.Common\\src\\Microsoft.AspNetCore.SignalR.Common.csproj",
9494
"src\\SignalR\\server\\Core\\src\\Microsoft.AspNetCore.SignalR.Core.csproj",
95-
"src\\SignalR\\server\\SignalR\\src\\Microsoft.AspNetCore.SignalR.csproj",
96-
"src\\submodules\\spa-templates\\src\\Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj"
95+
"src\\SignalR\\server\\SignalR\\src\\Microsoft.AspNetCore.SignalR.csproj"
9796
]
9897
}
9998
}

src/ProjectTemplates/ProjectTemplatesNoDeps.slnf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"src\\ProjectTemplates\\Web.Client.ItemTemplates\\Microsoft.DotNet.Web.Client.ItemTemplates.csproj",
66
"src\\ProjectTemplates\\Web.ItemTemplates\\Microsoft.DotNet.Web.ItemTemplates.csproj",
77
"src\\ProjectTemplates\\Web.ProjectTemplates\\Microsoft.DotNet.Web.ProjectTemplates.csproj",
8-
"src\\submodules\\spa-templates\\src\\Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj",
98
"src\\ProjectTemplates\\test\\Templates.Blazor.Tests\\Templates.Blazor.Tests.csproj",
109
"src\\ProjectTemplates\\test\\Templates.Blazor.WebAssembly.Tests\\Templates.Blazor.WebAssembly.Tests.csproj",
1110
"src\\ProjectTemplates\\test\\Templates.Blazor.WebAssembly.Auth.Tests\\Templates.Blazor.WebAssembly.Auth.Tests.csproj",

src/ProjectTemplates/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ Some projects in this repository (like SignalR Java Client) require JDK installa
3333
1. After installation define a new environment variable named `JAVA_HOME` pointing to the root of the latest JDK installation (for Windows it will be something like `c:\Program Files\Java\jdk-12`).
3434
1. Add the `%JAVA_HOME%\bin` directory to the `PATH` environment variable
3535

36-
Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj contains the Single Page Application templates, including Angular, React. **This is brought in by a submodule from the dotnet/spa-templates repo.**
37-
3836
To build the ProjectTemplates, use one of:
3937

4038
1. Run `eng\build.cmd -all -pack -configuration Release` in the repository root to build and pack all of the repo, including template projects.
@@ -56,7 +54,7 @@ Then, use one of:
5654
1. To test specific templates, use the `Run-[Template]-Locally.ps1` scripts in the script folder.
5755
- These scripts do `dotnet new -i` with your packages, but also apply a series of fixes and tweaks to the created template which keep the fact that you don't have a production `Microsoft.AspNetCore.App` from interfering.
5856
1. Run templates manually with `custom-hive` and `disable-sdk-templates` to install to a custom location and turn off the built-in templates e.g.
59-
- `dotnet new -i Microsoft.DotNet.Web.Spa.ProjectTemplates.6.0.6.0.0-dev.nupkg --debug:custom-hive C:\TemplateHive\`
57+
- `dotnet new -i Microsoft.DotNet.Web.ProjectTemplates.6.0.6.0.0-dev.nupkg --debug:custom-hive C:\TemplateHive\`
6058
- `dotnet new angular --auth Individual --debug:disable-sdk-templates --debug:custom-hive C:\TemplateHive\`
6159
1. Install the templates to an existing Visual Studio installation.
6260
1. Pack the ProjectTemplates: `src\ProjectTemplates\build.cmd -pack -configuration Release`

src/ProjectTemplates/Shared/TemplatePackageInstaller.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ internal static class TemplatePackageInstaller
3535
"Microsoft.DotNet.Web.ProjectTemplates.6.0",
3636
"Microsoft.DotNet.Web.ProjectTemplates.7.0",
3737
"Microsoft.DotNet.Web.ProjectTemplates.8.0",
38-
"Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1",
39-
"Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2",
40-
"Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0",
41-
"Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1",
42-
"Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0",
43-
"Microsoft.DotNet.Web.Spa.ProjectTemplates.6.0",
44-
"Microsoft.DotNet.Web.Spa.ProjectTemplates.7.0",
45-
"Microsoft.DotNet.Web.Spa.ProjectTemplates.8.0",
46-
"Microsoft.DotNet.Web.Spa.ProjectTemplates",
4738
"Microsoft.AspNetCore.Blazor.Templates",
4839
};
4940

@@ -104,15 +95,12 @@ private static async Task InstallTemplatePackages(ITestOutputHelper output)
10495
throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built.");
10596
}
10697

107-
Assert.Equal(4, builtPackages.Length);
98+
Assert.Equal(3, builtPackages.Length);
10899

109100
await VerifyCannotFindTemplateAsync(output, "web");
110101
await VerifyCannotFindTemplateAsync(output, "webapp");
111102
await VerifyCannotFindTemplateAsync(output, "webapi");
112103
await VerifyCannotFindTemplateAsync(output, "mvc");
113-
await VerifyCannotFindTemplateAsync(output, "react");
114-
await VerifyCannotFindTemplateAsync(output, "reactredux");
115-
await VerifyCannotFindTemplateAsync(output, "angular");
116104

117105
foreach (var packagePath in builtPackages)
118106
{
@@ -124,7 +112,6 @@ private static async Task InstallTemplatePackages(ITestOutputHelper output)
124112
await VerifyCanFindTemplate(output, "webapp");
125113
await VerifyCanFindTemplate(output, "web");
126114
await VerifyCanFindTemplate(output, "webapi");
127-
await VerifyCanFindTemplate(output, "react");
128115
}
129116

130117
private static async Task VerifyCanFindTemplate(ITestOutputHelper output, string templateName)

src/ProjectTemplates/build.cmd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,3 @@ CALL "%RepoRoot%\eng\build.cmd" -projects "%~dp0*\*.*proj" "/p:EnforceE2ETestPre
44
IF %ERRORLEVEL% NEQ 0 (
55
EXIT /b %ErrorLevel%
66
)
7-
8-
CALL "%RepoRoot%\eng\build.cmd" -projects "%RepoRoot%\src\submodules\spa-templates\src\*.*proj" "/p:EnforceE2ETestPrerequisites=true" -noBuildRepoTasks -noBuildNative %*
9-
IF %ERRORLEVEL% NEQ 0 (
10-
EXIT /b %ErrorLevel%
11-
)

src/ProjectTemplates/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ set -euo pipefail
55
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
66
repo_root="$DIR/../.."
77
"$repo_root/eng/build.sh" --projects "$DIR/**/*.*proj" "/p:EnforceE2ETestPrerequisites=true" "$@"
8-
"$repo_root/eng/build.sh" --projects "$DIR/../submodules/spa-templates/src/*.*proj" --no-build-repo-tasks "/p:EnforceE2ETestPrerequisites=true" "$@"

0 commit comments

Comments
 (0)