-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[Blazor] Add new Blazor Web Template #48285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6f3ec9c
Add new Blazor Web Template
javiercn 25151fb
Fixes
javiercn eeb2e79
Added baselines and fixes
javiercn d5dbee5
Working tests
javiercn 60be2cb
Remove comment
javiercn bcce6cd
Undo compatibility suppresions change
javiercn 038e152
Feedback
javiercn b284f6f
Update baselines
javiercn 215f548
Update src/ProjectTemplates/Web.ProjectTemplates/content/Components-C…
javiercn 3d720f0
Update template to include streaming rendering
javiercn 55f1453
Update est to avoid checking for counter
javiercn b00dd63
Fix build
javiercn defb82f
Update src/ProjectTemplates/Web.ProjectTemplates/Components-CSharp.cs…
javiercn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/ProjectTemplates/Web.ProjectTemplates/Components-CSharp.csproj.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<!--#if UseWebAssembly --> | ||
<TargetFrameworks>${DefaultNetCoreTargetFramework};${DefaultNetCoreTargetFramework}-browser</TargetFrameworks> | ||
<!--#else --> | ||
<TargetFramework>${DefaultNetCoreTargetFramework}</TargetFramework> | ||
<!--#endif --> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile> | ||
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">ComponentsWebAssembly-CSharp.Server</RootNamespace> | ||
<AssemblyName Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">`$(AssemblyName.Replace(' ', '_'))</AssemblyName> | ||
<!--#if UseWebAssembly && PWA --> | ||
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest> | ||
<!--#endif --> | ||
</PropertyGroup> | ||
<!--#if UseWebAssembly --> | ||
|
||
<ItemGroup Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'browser'"> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="${MicrosoftAspNetCoreComponentsWebAssemblyVersion}" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == ''"> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="${MicrosoftAspNetCoreComponentsWebAssemblyServerVersion}" /> | ||
</ItemGroup> | ||
<!--#endif --> | ||
<!--#if UseWebAssembly && PWA --> | ||
|
||
<ItemGroup> | ||
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" /> | ||
</ItemGroup> | ||
<!--#endif --> | ||
|
||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...lates/Web.ProjectTemplates/content/Components-CSharp/.template.config/dotnetcli.host.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/dotnetcli.host", | ||
"symbolInfo": { | ||
"skipRestore": { | ||
"longName": "no-restore", | ||
"shortName": "" | ||
}, | ||
"PWA": { | ||
"longName": "pwa", | ||
"isHidden": true | ||
}, | ||
"UseServer": { | ||
"longName": "use-server", | ||
"isHidden": true | ||
}, | ||
"UseWebAssembly": { | ||
"longName": "use-wasm", | ||
"isHidden": true | ||
}, | ||
"Framework": { | ||
"longName": "framework" | ||
}, | ||
"kestrelHttpPort": { | ||
"isHidden": true | ||
}, | ||
"kestrelHttpsPort": { | ||
"isHidden": true | ||
}, | ||
"iisHttpPort": { | ||
"isHidden": true | ||
}, | ||
"iisHttpsPort": { | ||
"isHidden": true | ||
}, | ||
"ExcludeLaunchSettings": { | ||
"longName": "exclude-launch-settings", | ||
"shortName": "" | ||
}, | ||
"UserSecretsId": { | ||
"isHidden": true | ||
}, | ||
"NoHttps": { | ||
"longName": "no-https", | ||
"shortName": "" | ||
}, | ||
"UseProgramMain": { | ||
"longName": "use-program-main", | ||
"shortName": "" | ||
} | ||
} | ||
} |
Binary file added
BIN
+1.12 KB
...plates/Web.ProjectTemplates/content/Components-CSharp/.template.config/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
...ctTemplates/Web.ProjectTemplates/content/Components-CSharp/.template.config/ide.host.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/ide.host", | ||
"order": 610, | ||
"icon": "icon.png", | ||
"disableHttpsSymbol": "NoHttps", | ||
"symbolInfo": [ | ||
{ | ||
"id": "UseServer", | ||
"isVisible": false, | ||
"persistenceScope": "templateGroup" | ||
}, | ||
{ | ||
"id": "UseWebAssembly", | ||
"isVisible": false, | ||
"persistenceScope": "templateGroup" | ||
}, | ||
{ | ||
"id": "PWA", | ||
"isVisible": false, | ||
javiercn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"persistenceScope": "templateGroup" | ||
}, | ||
{ | ||
"id": "UseProgramMain", | ||
"isVisible": true, | ||
"persistenceScope": "shared", | ||
"persistenceScopeName": "Microsoft" | ||
} | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
...jectTemplates/content/Components-CSharp/.template.config/localize/templatestrings.cs.json
javiercn marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"author": "Microsoft", | ||
"name": "Blazor Web App", | ||
"description": "A project template for creating a Blazor app hosted inside an ASP.NET app that runs on the server. This template can be used for web apps with rich dynamic user interfaces (UIs).", | ||
"symbols/Framework/description": "The target framework for the project.", | ||
"symbols/Framework/choices/net8.0/description": "Target net8.0", | ||
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", | ||
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", | ||
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", | ||
"symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", | ||
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/UseWebAssembly/displayName": "_Use interactive webassembly components", | ||
"symbols/UseWebAssembly/description": "If specified, configures the project to render components interactively on the browser using webassembly.", | ||
"symbols/UseServer/displayName": "_Use interactive server components", | ||
"symbols/UseServer/description": "If specified, configures the project to render components interactively on the server.", | ||
"symbols/PWA/displayName": "_Progressive Web Application", | ||
"symbols/PWA/description": "If specified, produces a Progressive Web Application (PWA) supporting installation and offline use.", | ||
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.", | ||
"symbols/UseProgramMain/displayName": "Do not use _top-level statements", | ||
"symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", | ||
"postActions/restore/description": "Restore NuGet packages required by this project.", | ||
"postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" | ||
} |
24 changes: 24 additions & 0 deletions
24
...jectTemplates/content/Components-CSharp/.template.config/localize/templatestrings.de.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"author": "Microsoft", | ||
"name": "Blazor Web App", | ||
"description": "A project template for creating a Blazor app hosted inside an ASP.NET app that runs on the server. This template can be used for web apps with rich dynamic user interfaces (UIs).", | ||
"symbols/Framework/description": "The target framework for the project.", | ||
"symbols/Framework/choices/net8.0/description": "Target net8.0", | ||
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", | ||
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", | ||
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", | ||
"symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", | ||
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/UseWebAssembly/displayName": "_Use interactive webassembly components", | ||
"symbols/UseWebAssembly/description": "If specified, configures the project to render components interactively on the browser using webassembly.", | ||
"symbols/UseServer/displayName": "_Use interactive server components", | ||
"symbols/UseServer/description": "If specified, configures the project to render components interactively on the server.", | ||
"symbols/PWA/displayName": "_Progressive Web Application", | ||
"symbols/PWA/description": "If specified, produces a Progressive Web Application (PWA) supporting installation and offline use.", | ||
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.", | ||
"symbols/UseProgramMain/displayName": "Do not use _top-level statements", | ||
"symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", | ||
"postActions/restore/description": "Restore NuGet packages required by this project.", | ||
"postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" | ||
} |
24 changes: 24 additions & 0 deletions
24
...jectTemplates/content/Components-CSharp/.template.config/localize/templatestrings.en.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"author": "Microsoft", | ||
"name": "Blazor Web App", | ||
"description": "A project template for creating a Blazor app hosted inside an ASP.NET app that runs on the server. This template can be used for web apps with rich dynamic user interfaces (UIs).", | ||
"symbols/Framework/description": "The target framework for the project.", | ||
"symbols/Framework/choices/net8.0/description": "Target net8.0", | ||
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", | ||
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", | ||
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", | ||
"symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", | ||
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/UseWebAssembly/displayName": "_Use interactive webassembly components", | ||
"symbols/UseWebAssembly/description": "If specified, configures the project to render components interactively on the browser using webassembly.", | ||
"symbols/UseServer/displayName": "_Use interactive server components", | ||
"symbols/UseServer/description": "If specified, configures the project to render components interactively on the server.", | ||
"symbols/PWA/displayName": "_Progressive Web Application", | ||
"symbols/PWA/description": "If specified, produces a Progressive Web Application (PWA) supporting installation and offline use.", | ||
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.", | ||
"symbols/UseProgramMain/displayName": "Do not use _top-level statements", | ||
"symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", | ||
"postActions/restore/description": "Restore NuGet packages required by this project.", | ||
"postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" | ||
} |
24 changes: 24 additions & 0 deletions
24
...jectTemplates/content/Components-CSharp/.template.config/localize/templatestrings.es.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"author": "Microsoft", | ||
"name": "Blazor Web App", | ||
"description": "A project template for creating a Blazor app hosted inside an ASP.NET app that runs on the server. This template can be used for web apps with rich dynamic user interfaces (UIs).", | ||
"symbols/Framework/description": "The target framework for the project.", | ||
"symbols/Framework/choices/net8.0/description": "Target net8.0", | ||
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", | ||
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", | ||
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", | ||
"symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", | ||
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/UseWebAssembly/displayName": "_Use interactive webassembly components", | ||
"symbols/UseWebAssembly/description": "If specified, configures the project to render components interactively on the browser using webassembly.", | ||
"symbols/UseServer/displayName": "_Use interactive server components", | ||
"symbols/UseServer/description": "If specified, configures the project to render components interactively on the server.", | ||
"symbols/PWA/displayName": "_Progressive Web Application", | ||
"symbols/PWA/description": "If specified, produces a Progressive Web Application (PWA) supporting installation and offline use.", | ||
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.", | ||
"symbols/UseProgramMain/displayName": "Do not use _top-level statements", | ||
"symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", | ||
"postActions/restore/description": "Restore NuGet packages required by this project.", | ||
"postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" | ||
} |
24 changes: 24 additions & 0 deletions
24
...jectTemplates/content/Components-CSharp/.template.config/localize/templatestrings.fr.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"author": "Microsoft", | ||
"name": "Blazor Web App", | ||
"description": "A project template for creating a Blazor app hosted inside an ASP.NET app that runs on the server. This template can be used for web apps with rich dynamic user interfaces (UIs).", | ||
"symbols/Framework/description": "The target framework for the project.", | ||
"symbols/Framework/choices/net8.0/description": "Target net8.0", | ||
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", | ||
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", | ||
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", | ||
"symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", | ||
"symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used).", | ||
"symbols/UseWebAssembly/displayName": "_Use interactive webassembly components", | ||
"symbols/UseWebAssembly/description": "If specified, configures the project to render components interactively on the browser using webassembly.", | ||
"symbols/UseServer/displayName": "_Use interactive server components", | ||
"symbols/UseServer/description": "If specified, configures the project to render components interactively on the server.", | ||
"symbols/PWA/displayName": "_Progressive Web Application", | ||
"symbols/PWA/description": "If specified, produces a Progressive Web Application (PWA) supporting installation and offline use.", | ||
"symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth.", | ||
"symbols/UseProgramMain/displayName": "Do not use _top-level statements", | ||
"symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", | ||
"postActions/restore/description": "Restore NuGet packages required by this project.", | ||
"postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.