Skip to content

Commit

Permalink
Library target framework option
Browse files Browse the repository at this point in the history
  • Loading branch information
egvijayanand committed Nov 4, 2022
1 parent c54d01f commit 951365e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host"
}
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"Framework": {
"longName": "framework"
}
},
"usageExamples": [
"--framework netstandard2.0",
"-f netstandard2.1"
]
}
29 changes: 24 additions & 5 deletions src/FormsTemplatesCLI/FormsClassLib/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Library"
],
"identity": "VijayAnand.FormsTemplates.ClassLib",
"description": "A project template for Xamarin.Forms 5 Class Library (ver. 5.0.0.2401)",
"description": "A project template for Xamarin.Forms 5 Class Library (ver. 5.0.0.2515)",
"name": "Xamarin.Forms 5 Class Library",
"shortName": "formsclasslib",
"sourceName": "FormsClassLib",
Expand All @@ -23,29 +23,48 @@
"104D078F-F441-4A4A-A89B-21C40D7B8C10"
],
"symbols": {
"Framework": {
"type": "parameter",
"datatype": "choice",
"description": "Option to choose the class library target framework.",
"choices": [
{
"choice": "netstandard2.1",
"description": "Target .NET Standard 2.1",
"displayName": ".NET Standard 2.1"
},
{
"choice": "netstandard2.0",
"description": "Target .NET Standard 2.0",
"displayName": ".NET Standard 2.0"
}
],
"replaces": "LIB_TFM",
"defaultValue": "netstandard2.0"
},
"include-toolkit": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "If true, includes reference to the Xamarin.CommunityToolkit NuGet package reference."
"description": "If true, includes reference to the Xamarin.CommunityToolkit NuGet package."
},
"include-markup": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "If true, includes reference to the Xamarin.CommunityToolkit.Markup NuGet package reference."
"description": "If true, includes reference to the Xamarin.CommunityToolkit.Markup NuGet package."
},
"include-essentials": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "If true, includes reference to the Xamarin.Essentials NuGet package reference."
"description": "If true, includes reference to the Xamarin.Essentials NuGet package."
},
"include-mvvm-toolkit": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "If true, includes reference to the CommunityToolkit.Mvvm (aka Microsoft MVVM Toolkit) NuGet package reference."
"description": "If true, includes reference to the CommunityToolkit.Mvvm (aka Microsoft MVVM Toolkit) NuGet package."
},
"no-solution-file": {
"type": "parameter",
Expand Down
4 changes: 2 additions & 2 deletions src/FormsTemplatesCLI/FormsClassLib/FormsClassLib.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>LIB_TFM</TargetFramework>
<!-- Project Options -->
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>FormsClassLib</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401"/>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2515"/>
<!--#if (AddToolkitPackage)-->
<PackageReference Include="Xamarin.CommunityToolkit" Version="2.0.5" />
<!--#endif-->
Expand Down
8 changes: 7 additions & 1 deletion src/FormsTemplatesCLI/release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
What's new in ver. 1.4.0:
What's new in ver. 1.4.1:

Xamarin.Forms version bumped to 5.0.0.2515 (SR12).

Option to the choose the library target framework - .NET Standard 2.0 / 2.1

v1.4.0:

Included an option to add reference Xamarin.Essentials NuGet package during Xamarin.Forms class library creation.

Expand Down

0 comments on commit 951365e

Please sign in to comment.