Skip to content
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

[Templates] Add new and update existing templates #2961

Merged
merged 6 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@

<VersionFile>4.11.0</VersionFile>
<VersionPrefix>4.11.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix>beta.1</VersionSuffix>
<AssemblyVersion>$(VersionFile)</AssemblyVersion>
<FileVersion>$(VersionFile)</FileVersion>

<!-- Enable code style analysis -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<!-- Enable code style analysis -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>

<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>

</PropertyGroup>
</PropertyGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
Expand Down
78 changes: 70 additions & 8 deletions src/Templates/Microsoft.FluentUI.AspNetCore.Templates.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" InitialTargets="AddTemplatesToPackageAsContent">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Authors>Microsoft</Authors>
<ContentTargetFolders>Content</ContentTargetFolders>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<Description>Project templates for creating a Blazor Web app or Blazor WebAssembly app that uses the Fluent UI Blazor library. These templates can be used for web apps with rich dynamic user interfaces (UIs).</Description>
<Description>Project templates for creating a Fluent UI Blazor Web app, Blazor WebAssembly Standalone app, Blazor Hybrid and Web App or .NET Aspire Starter app. These templates are pure copies of the original templates but use the Fluent UI Blazor Components ibrary for building the user interface (UI).</Description>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<License>MIT</License>
Expand All @@ -18,7 +18,18 @@
<Title>Microsoft Fluent UI Blazor Templates</Title>
<PackageIcon>icon.png</PackageIcon>
<PackageOutputPath>$(SolutionDir)artifacts</PackageOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<UsingToolTemplateLocalizer>true</UsingToolTemplateLocalizer>
<NoWarn>$(NoWarn);NU5128</NoWarn>
</PropertyGroup>

<PropertyGroup>
<!-- for templates -->
<AspirePackageVersion>9.0.0</AspirePackageVersion>
<MicrosoftExtensionsHttpResiliencePackageVersion>9.0.0</MicrosoftExtensionsHttpResiliencePackageVersion>
<MicrosoftAspNetCorePackageVersionForNet8>8.0.11</MicrosoftAspNetCorePackageVersionForNet8>
<MicrosoftAspNetCorePackageVersionForNet9>9.0.0</MicrosoftAspNetCorePackageVersionForNet9>

</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand All @@ -29,18 +40,69 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>$(SolutionDir)artifacts</PackageOutputPath>
</PropertyGroup>

<PropertyGroup>
<UsePublicApiAnalyzers>false</UsePublicApiAnalyzers>
</PropertyGroup>

<ItemGroup>
<None Include="templates\**\*" />
<Content Include="content\**\*" Exclude="content\**\bin\**;content\**\obj\**" />

<None Include="README.md" Pack="true" PackagePath="\" />
<None Include="..\..\icon.png" Pack="true" PackagePath="\" />
<Compile Remove="**\*" />

</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>


<!-- When building a package, this target will run to copy all the templates into the intermediate directory,
replaces the package versions, and adds them to the package.-->
<Target Name="AddTemplatesToPackageAsContent" DependsOnTargets="ReplacePackageVersionOnTemplates">

<!-- Creating a temporary item instead of defining content items directly in order to avoid MSBuild MSB4120
message shown when an item within a target references itself which may cuase unintended expansion. -->
<ItemGroup>
<_TemplatesForPackage Include="$(IntermediateOutputPath)\content\templates\**\*" />
</ItemGroup>
<ItemGroup>
<Content Include="%(_TemplatesForPackage.Identity)" PackagePath="content/content/%(_TemplatesForPackage.RecursiveDir)" />
</ItemGroup>
</Target>

<!-- Replaces the versions referenced by the templates projects to use the version of the packages being live-built -->
<Target Name="ReplacePackageVersionOnTemplates" DependsOnTargets="CopyTemplatesToIntermediateOutputPath">

<ItemGroup>
<TemplateProjectFiles Include="templates\**\*.csproj" />
<TemplateProjectFiles>
<DestinationFile>$(IntermediateOutputPath)\content\templates\%(RecursiveDir)%(Filename)%(Extension)</DestinationFile>
</TemplateProjectFiles>
</ItemGroup>

<WriteLinesToFile File="%(TemplateProjectFiles.DestinationFile)"
Lines="$([System.IO.File]::ReadAllText('%(TemplateProjectFiles.FullPath)')
.Replace('!!REPLACE_WITH_LATEST_VERSION!!', '$(PackageVersion)')
.Replace('!!REPLACE_WITH_ASPNETCORE_8_VERSION!!', '$(MicrosoftAspNetCorePackageVersionForNet8)')
.Replace('!!REPLACE_WITH_ASPNETCORE_9_VERSION!!', '$(MicrosoftAspNetCorePackageVersionForNet9)')
.Replace('!!REPLACE_WITH_DOTNET_EXTENSIONS_VERSION!!', '$(MicrosoftExtensionsHttpResiliencePackageVersion)'))"
Overwrite="true" />
</Target>

<!-- Grabs the contents of the templates folder and copies them to IntermediateOutputPath directory -->
<Target Name="CopyTemplatesToIntermediateOutputPath">

<ItemGroup>
<_ContentFilesToPackage Include="templates\**\*" Exclude="templates\**\bin\**;templates\**\obj\**;templates\**\*.csproj" />
</ItemGroup>

<Copy SourceFiles="@(_ContentFilesToPackage)" SkipUnchangedFiles="true" DestinationFolder="$(IntermediateOutputPath)\content\templates\%(RecursiveDir)" />
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"Framework": {
"longName": "framework"
},
"AspireVersion": {
"shortName": "",
"longName": "aspire-version"
},
"appHostHttpPort": {
"isHidden": true
},
"appHostHttpsPort": {
"isHidden": true
},
"appHostOtlpHttpPort": {
"isHidden": true
},
"appHostOtlpHttpsPort": {
"isHidden": true
},
"appHostResourceHttpPort": {
"isHidden": true
},
"appHostResourceHttpsPort": {
"isHidden": true
},
"webHttpPort": {
"isHidden": true
},
"webHttpsPort": {
"isHidden": true
},
"apiServiceHttpPort": {
"isHidden": true
},
"apiServiceHttpsPort": {
"isHidden": true
},
"NoHttps": {
"longName": "no-https",
"shortName": ""
},
"UseRedisCache": {
"longName": "use-redis-cache",
"shortName": ""
},
"TestFramework": {
"longName": "test-framework",
"shortName": "t"
}
},
"usageExamples": [
"--use-redis-cache",
"--test-framework MSTest"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://json.schemastore.org/ide.host",
"icon": "ide/AspireStarter.ico",
"displayOverviewPage": "0",
"disableHttpsSymbol": "NoHttps",
"unsupportedHosts": [
{
"id": "vs",
"version": "(,17.9)"
}
],
"symbolInfo": [
{
"id": "AspireVersion",
"isVisible": true,
"persistenceScope": "shared",
"persistenceScopeName": "aspireTemplates"
},
{
"id": "UseRedisCache",
"isVisible": true,
"persistenceScope": "templateGroup"
},
{
"id": "TestFramework",
"isVisible": true,
"persistenceScope": "templateGroup"
}
]
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"author": "Microsoft",
"name": "Úvodní aplikace Fluent .NET Aspire",
"description": "Šablona projektu pro vytvoření aplikace .NET Aspire s webovým front-endem Fluent UI Blazor a back-endovou službou webového rozhraní API, volitelně s využitím Redisu pro ukládání do mezipaměti.",
"symbols/Framework/description": "Cílová architektura pro projekt",
"symbols/Framework/choices/net8.0/description": "Target net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/AspireVersion/description": "The version of .NET Aspire to use.",
"symbols/AspireVersion/displayName": ".NET Aspire version",
"symbols/AspireVersion/choices/9.0/displayName": "9.0",
"symbols/AspireVersion/choices/9.0/description": "Chooses .NET Aspire 9.0",
"symbols/AspireVersion/choices/8.2/displayName": "8.2",
"symbols/AspireVersion/choices/8.2/description": "Chooses .NET Aspire 8.2",
"symbols/UseRedisCache/displayName": "Po_užít Redis pro ukládání do mezipaměti (vyžaduje Docker)",
"symbols/UseRedisCache/description": "Nakonfiguruje, jestli se má aplikace nastavit tak, aby pro ukládání do mezipaměti používala Redis. K místnímu spouštění se vyžaduje podporovaný modul runtime kontejneru. Další podrobnosti najdete na https://aka.ms/dotnet/aspire/containers.",
"symbols/TestFramework/displayName": "Vytvoření projektu _test",
"symbols/TestFramework/description": "Konfiguruje, jestli se má vytvořit projekt pro testy integrace pomocí projektu AppHost.",
"symbols/TestFramework/choices/None/description": "Nevytvoří projekt testů.",
"symbols/TestFramework/choices/MSTest/description": "Vytvoří projekt testů MSTest pomocí projektu AppHost.",
"symbols/TestFramework/choices/NUnit/description": "Vytvoří projekt testů NUnit pomocí projektu AppHost.",
"symbols/TestFramework/choices/xUnit.net/description": "Vytvoří projekt testů xUnit.net pomocí projektu AppHost.",
"symbols/appHostHttpPort/description": "Číslo portu, který se má použít pro koncový bod HTTP v launchSettings.json projektu AppHost.",
"symbols/appHostOtlpHttpPort/description": "Číslo portu, který se má použít pro koncový bod HTTP OTLP v launchSettings.json projektu AppHost.",
"symbols/appHostResourceHttpPort/description": "Číslo portu, který se má použít pro koncový bod HTTP služby prostředků v launchSettings.json projektu AppHost.",
"symbols/appHostHttpsPort/description": "Číslo portu, který se má použít pro koncový bod HTTPS v launchSettings.json projektu AppHost. Tato možnost se dá použít jenom v případě, že se nepoužívá parametr no-https.",
"symbols/appHostOtlpHttpsPort/description": "Číslo portu, který se má použít pro koncový bod HTTPS OTLP v launchSettings.json projektu AppHost.",
"symbols/appHostResourceHttpsPort/description": "Číslo portu, který se má použít pro koncový bod HTTPS služby prostředků v launchSettings.json projektu AppHost.",
"symbols/webHttpPort/description": "Číslo portu, který se má použít pro koncový bod HTTP v launchSettings.json webového projektu.",
"symbols/webHttpsPort/description": "Číslo portu, který se má použít pro koncový bod HTTPS v launchSettings.json webového projektu. Tato možnost se dá použít jenom v případě, že se nepoužívá parametr no-https.",
"symbols/apiServiceHttpPort/description": "Číslo portu, který se má použít pro koncový bod HTTP v launchSettings.json projektu ApiService.",
"symbols/apiServiceHttpsPort/description": "Číslo portu, který se má použít pro koncový bod HTTPS v launchSettings.json projektu ApiService. Tato možnost se dá použít jenom v případě, že se nepoužívá parametr no-https.",
"symbols/skipRestore/description": "Pokud se tato možnost zadá, přeskočí automatické obnovení projektu při vytvoření.",
"symbols/NoHttps/description": "Určuje, jestli se má vypnout protokol HTTPS.",
"postActions/set-startup-project/description": "Nastaví projekt po spuštění v řešení",
"postActions/restore/description": "Obnoví balíčky NuGet vyžadované tímto projektem.",
"postActions/restore/manualInstructions/default/text": "Spustit dotnet restore"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"author": "Microsoft",
"name": "Fluent .NET Aspire-Starter-App",
"description": "Eine Projektvorlage zum Erstellen einer .NET Aspire-App mit einem Fluent UI Blazor-Web-Front-End und einem Web-API-Back-End-Dienst, die optional Redis zum Zwischenspeichern verwendet.",
"symbols/Framework/description": "Das Zielframework für das Projekt.",
"symbols/Framework/choices/net8.0/description": "Target net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/AspireVersion/description": "The version of .NET Aspire to use.",
"symbols/AspireVersion/displayName": ".NET Aspire version",
"symbols/AspireVersion/choices/9.0/displayName": "9.0",
"symbols/AspireVersion/choices/9.0/description": "Chooses .NET Aspire 9.0",
"symbols/AspireVersion/choices/8.2/displayName": "8.2",
"symbols/AspireVersion/choices/8.2/description": "Chooses .NET Aspire 8.2",
"symbols/UseRedisCache/displayName": "_Use Redis für die Zwischenspeicherung (erfordert eine unterstützte Container-Runtime)",
"symbols/UseRedisCache/description": "Konfiguriert, ob die Anwendung für die Verwendung von Redis für die Zwischenspeicherung eingerichtet werden soll. Erfordert eine unterstützte Containerruntime für die lokale Ausführung. Weitere Informationen finden Sie unter https://aka.ms/dotnet/aspire/containers.",
"symbols/TestFramework/displayName": "„_test project“ erstellen",
"symbols/TestFramework/description": "Konfiguriert, ob ein Projekt für Integrationstests mithilfe des AppHost-Projekts erstellt werden soll.",
"symbols/TestFramework/choices/None/description": "Kein Testprojekt erstellen.",
"symbols/TestFramework/choices/MSTest/description": "Erstellt ein MSTest-Testprojekt mithilfe des AppHost-Projekts.",
"symbols/TestFramework/choices/NUnit/description": "Erstellt ein NUnit-Testprojekt mithilfe des AppHost-Projekts.",
"symbols/TestFramework/choices/xUnit.net/description": "Erstellt ein xUnit-Testprojekt mithilfe des AppHost-Projekts.",
"symbols/appHostHttpPort/description": "Portnummer, die für den HTTP-Endpunkt in launchSettings.json des AppHost-Projekts verwendet werden soll.",
"symbols/appHostOtlpHttpPort/description": "Portnummer, die für den OTLP-HTTP-Endpunkt in launchSettings.json des AppHost-Projekts verwendet werden soll.",
"symbols/appHostResourceHttpPort/description": "Portnummer, die für den HTTP-Endpunkt des Ressourcendiensts in launchSettings.json des AppHost-Projekts verwendet werden soll.",
"symbols/appHostHttpsPort/description": "Portnummer, die für den HTTPS-Endpunkt in launchSettings.json des AppHost-Projekts verwendet werden soll. Diese Option ist nur anwendbar, wenn der Parameter no-https nicht verwendet wird.",
"symbols/appHostOtlpHttpsPort/description": "Portnummer, die für den OTLP-HTTPS-Endpunkt in launchSettings.json des AppHost-Projekts verwendet werden soll.",
"symbols/appHostResourceHttpsPort/description": "Portnummer, die für den HTTPS-Endpunkt des Ressourcendiensts in launchSettings.json des AppHost-Projekts verwendet werden soll.",
"symbols/webHttpPort/description": "Portnummer, die für den HTTP-Endpunkt in launchSettings.json des Webprojekts verwendet werden soll.",
"symbols/webHttpsPort/description": "Portnummer, die für den HTTPS-Endpunkt in launchSettings.json des Webprojekts verwendet werden soll. Diese Option ist nur anwendbar, wenn der Parameter no-https nicht verwendet wird.",
"symbols/apiServiceHttpPort/description": "Portnummer, die für den HTTP-Endpunkt in launchSettings.json des ApiService-Projekts verwendet werden soll.",
"symbols/apiServiceHttpsPort/description": "Portnummer, die für den HTTPS-Endpunkt in launchSettings.json des ApiService-Projekts verwendet werden soll. Diese Option ist nur anwendbar, wenn der Parameter no-https nicht verwendet wird.",
"symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.",
"symbols/NoHttps/description": "Ob HTTPS deaktiviert werden soll.",
"postActions/set-startup-project/description": "Legt das Startprojekt in der Lösung fest",
"postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.",
"postActions/restore/manualInstructions/default/text": "\"dotnet restore\" ausführen"
}
Loading
Loading