Infrastructure and some starter "dotnet new" templates
Introduces some basic WixToolset templates for "dotnet new" with the infrastructure for more to be added in the future. Closes 6207
Rob Mensching committed
Mar 20, 2022 at 16:14 UTC
cd90117f7ad5685d5af7eaecc3f2347f9b8ab1cb
13 files changed
+162
src/samples/WixToolset.Templates/WixToolset.Templates.csproj
new
+20
@@ -0,0 +1,20 @@
1
+<Project Sdk="Microsoft.NET.Sdk">
2
+ <PropertyGroup>
3
+ <PackageType>Template</PackageType>
4
+ <Title>WixToolset Templates</Title>
5
+ <Description>Project and item template for the WiX Toolset.</Description>
6
+
7
+ <TargetFramework>netstandard2.0</TargetFramework>
8
+ <IncludeBuildOutput>false</IncludeBuildOutput>
9
+ <NoWarn>$(NoWarn);NU5128</NoWarn>
10
+
11
+ <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
12
+ <IncludeContentInPack>true</IncludeContentInPack>
13
+ <ContentTargetFolders>content</ContentTargetFolders>
14
+ </PropertyGroup>
15
+
16
+ <ItemGroup>
17
+ <Compile Remove="**" />
18
+ <Content Include="templates\**" />
19
+ </ItemGroup>
20
+</Project>
src/samples/WixToolset.Templates/templates/FragmentItem/.template.config/template.json
new
+14
@@ -0,0 +1,14 @@
1
+{
2
+ "$schema": "http://json.schemastore.org/template",
3
+ "identity": "WixToolset.Templates.FragmentItem",
4
+ "name": "WiX Toolset Fragment",
5
+ "shortName": "fragment",
6
+ "author": "WiX Toolset Team",
7
+ "classifications": ["WixToolset", "Code"],
8
+ "tags": {
9
+ "language": "WiX",
10
+ "type": "item"
11
+ },
12
+ "sourceName": "$safeprojectname$",
13
+ "defaultName": "Fragment"
14
+}
src/samples/WixToolset.Templates/templates/FragmentItem/Fragment.wxs
new
+4
@@ -0,0 +1,4 @@
1
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2
+ <Fragment>
3
+ </Fragment>
4
+</Wix>
src/samples/WixToolset.Templates/templates/LibraryProject/$safeprojectname$.wixproj
new
+5
@@ -0,0 +1,5 @@
1
+<Project Sdk="WixToolset.Sdk/4.0.0">
2
+ <PropertyGroup>
3
+ <OutputType>Library</OutputType>
4
+ </PropertyGroup>
5
+</Project>
src/samples/WixToolset.Templates/templates/LibraryProject/.template.config/template.json
new
+14
@@ -0,0 +1,14 @@
1
+{
2
+ "$schema": "http://json.schemastore.org/template",
3
+ "identity": "WixToolset.Templates.LibraryProject",
4
+ "name": "WiX Toolset Library",
5
+ "shortName": "wixlib",
6
+ "author": "WiX Toolset Team",
7
+ "classifications": ["WixToolset", "Library"],
8
+ "tags": {
9
+ "language": "WiX",
10
+ "type": "project"
11
+ },
12
+ "sourceName": "$safeprojectname$",
13
+ "defaultName": "Library"
14
+}
src/samples/WixToolset.Templates/templates/LibraryProject/Fragment.wxs
new
+4
@@ -0,0 +1,4 @@
1
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2
+ <Fragment>
3
+ </Fragment>
4
+</Wix>
src/samples/WixToolset.Templates/templates/ModuleProject/$safeprojectname$.wixproj
new
+5
@@ -0,0 +1,5 @@
1
+<Project Sdk="WixToolset.Sdk/4.0.0">
2
+ <PropertyGroup>
3
+ <OutputType>Module</OutputType>
4
+ </PropertyGroup>
5
+</Project>
src/samples/WixToolset.Templates/templates/ModuleProject/.template.config/template.json
new
+26
@@ -0,0 +1,26 @@
1
+{
2
+ "$schema": "http://json.schemastore.org/template",
3
+ "identity": "WixToolset.Templates.ModuleProject",
4
+ "name": "WiX Toolset Module",
5
+ "shortName": "msm",
6
+ "author": "WiX Toolset Team",
7
+ "classifications": ["WixToolset", "Module"],
8
+ "tags": {
9
+ "language": "WiX",
10
+ "type": "project"
11
+ },
12
+ "symbols": {
13
+ "company": {
14
+ "type": "parameter",
15
+ "defaultValue": "Your Company Name",
16
+ "replaces": "$company$"
17
+ },
18
+ "version": {
19
+ "type": "parameter",
20
+ "defaultValue": "0.0.1",
21
+ "replaces": "$version$"
22
+ }
23
+ },
24
+ "sourceName": "$safeprojectname$",
25
+ "defaultName": "Module"
26
+}
src/samples/WixToolset.Templates/templates/ModuleProject/Module.wxs
new
+8
@@ -0,0 +1,8 @@
1
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2
+ <Module Id="$safeprojectname$" Guid="PUT-GUID-HERE" Manufacturer="$company$" Language="0" Version="$version$">
3
+ <Component Guid='PUT-GUID-HERE' Directory='TARGETDIR'>
4
+ <!-- TODO: Install something more useful than this source code file itself -->
5
+ <File Source="Module.wxs" />
6
+ </Component>
7
+ </Module>
8
+</Wix>
src/samples/WixToolset.Templates/templates/PackageProject/$safeprojectname$.wixproj
new
+2
@@ -0,0 +1,2 @@
1
+<Project Sdk="WixToolset.Sdk/4.0.0">
2
+</Project>
src/samples/WixToolset.Templates/templates/PackageProject/.template.config/template.json
new
+26
@@ -0,0 +1,26 @@
1
+{
2
+ "$schema": "http://json.schemastore.org/template",
3
+ "identity": "WixToolset.Templates.PackageProject",
4
+ "name": "WiX Toolset Package",
5
+ "shortName": "msi",
6
+ "author": "WiX Toolset Team",
7
+ "classifications": ["WixToolset", "Package"],
8
+ "tags": {
9
+ "language": "WiX",
10
+ "type": "project"
11
+ },
12
+ "symbols": {
13
+ "company": {
14
+ "type": "parameter",
15
+ "defaultValue": "Your Company Name",
16
+ "replaces": "$company$"
17
+ },
18
+ "version": {
19
+ "type": "parameter",
20
+ "defaultValue": "0.0.1",
21
+ "replaces": "$version$"
22
+ }
23
+ },
24
+ "sourceName": "$safeprojectname$",
25
+ "defaultName": "Package"
26
+}
src/samples/WixToolset.Templates/templates/PackageProject/Package.wxs
new
+24
@@ -0,0 +1,24 @@
1
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2
+ <Package Name="$safeprojectname$" Manufacturer="$company$" Version="$version$" UpgradeCode="PUT-GUID-HERE">
3
+ <MajorUpgrade DowngradeError="A newer version of [ProductName] is already installed" />
4
+
5
+ <Feature Id="Main">
6
+ <ComponentGroupRef Id="Components" />
7
+ </Feature>
8
+ </Package>
9
+
10
+ <Fragment>
11
+ <ComponentGroup Id="Components" Directory="INSTALLFOLDER">
12
+ <Component>
13
+ <!-- TODO: Install something more useful than this source code file itself -->
14
+ <File Source="Package.wxs" />
15
+ </Component>
16
+ </ComponentGroup>
17
+ </Fragment>
18
+
19
+ <Fragment>
20
+ <StandardDirectory Id="ProgramFiles6432Folder">
21
+ <Directory Id="INSTALLFOLDER" Name="!(Property.Manufacturer) !(Property.ProductName)" />
22
+ </StandardDirectory>
23
+ </Fragment>
24
+</Wix>
src/samples/samples.sln
+10
@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.30711.63
5
MinimumVisualStudioVersion = 15.0.26124.0
6
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}"
7
EndProject
8
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixToolset.Templates", "WixToolset.Templates\WixToolset.Templates.csproj", "{D1385232-CA10-4092-BAB5-4E5499FE144C}"
9
+EndProject
10
Global
11
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12
Debug|Any CPU = Debug|Any CPU
@@ -20,6 +22,14 @@ Global
22
{95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|Any CPU.ActiveCfg = Release|Win32
23
{95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.ActiveCfg = Release|Win32
24
{95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.Build.0 = Release|Win32
25
+ {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26
+ {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|Any CPU.Build.0 = Debug|Any CPU
27
+ {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|x86.ActiveCfg = Debug|Any CPU
28
+ {D1385232-CA10-4092-BAB5-4E5499FE144C}.Debug|x86.Build.0 = Debug|Any CPU
29
+ {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|Any CPU.ActiveCfg = Release|Any CPU
30
+ {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|Any CPU.Build.0 = Release|Any CPU
31
+ {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.ActiveCfg = Release|Any CPU
32
+ {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.Build.0 = Release|Any CPU
33
EndGlobalSection
34
GlobalSection(SolutionProperties) = preSolution
35
HideSolutionNode = FALSE