-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add wpf class library template #1298
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
vatsan-madhavan
merged 3 commits into
dotnet:master
from
jmarolf:add-class-library-template
Jul 19, 2019
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
24 changes: 24 additions & 0 deletions
24
....Wpf.ProjectTemplates/content/WpfClassLibrary-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,24 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/dotnetcli.host", | ||
"symbolInfo": { | ||
"TargetFrameworkOverride": { | ||
"isHidden": "true", | ||
"longName": "target-framework-override", | ||
"shortName": "" | ||
}, | ||
"Framework": { | ||
"longName": "framework" | ||
}, | ||
"skipRestore": { | ||
"longName": "no-restore", | ||
"shortName": "" | ||
}, | ||
"langVersion": { | ||
"longName": "langVersion", | ||
"shortName": "" | ||
} | ||
}, | ||
"usageExamples": [ | ||
"" | ||
] | ||
} |
86 changes: 86 additions & 0 deletions
86
...Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/template.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,86 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/template", | ||
"author": "Microsoft", | ||
"classifications": ["Common", "WPF"], | ||
"name": "WPF Class library", | ||
"generatorVersions": "[1.0.0.0-*)", | ||
"description": "A project for creating a class library that targets a .NET Core WPF Application", | ||
"groupIdentity": "Microsoft.Common.WPF.Library", | ||
"precedence": "3000", | ||
"identity": "Microsoft.Common.WPF.Library.CSharp.3.0", | ||
"shortName": "wpflib", | ||
"tags": { | ||
"language": "C#", | ||
"type": "project" | ||
}, | ||
"sourceName": "Company.ClassLibrary1", | ||
"preferNameDirectory": true, | ||
"symbols": { | ||
"TargetFrameworkOverride": { | ||
"type": "parameter", | ||
"description": "Overrides the target framework", | ||
"replaces": "TargetFrameworkOverride", | ||
"datatype": "string", | ||
"defaultValue": "" | ||
}, | ||
"Framework": { | ||
"type": "parameter", | ||
"description": "The target framework for the project.", | ||
"datatype": "choice", | ||
"choices": [ | ||
{ | ||
"choice": "netcoreapp3.0", | ||
"description": "Target netcoreapp3.0" | ||
} | ||
], | ||
"replaces": "netcoreapp3.0", | ||
"defaultValue": "netcoreapp3.0" | ||
}, | ||
"langVersion": { | ||
"type": "parameter", | ||
"datatype": "text", | ||
"description": "Sets langVersion in the created project file", | ||
"defaultValue": "", | ||
"replaces": "$(ProjectLanguageVersion)" | ||
}, | ||
"HostIdentifier": { | ||
"type": "bind", | ||
"binding": "HostIdentifier" | ||
}, | ||
"skipRestore": { | ||
"type": "parameter", | ||
"datatype": "bool", | ||
"description": "If specified, skips the automatic restore of the project on create.", | ||
"defaultValue": "false" | ||
} | ||
}, | ||
"primaryOutputs": [ | ||
{ "path": "Company.ClassLibrary1.csproj" }, | ||
{ | ||
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", | ||
"path": "Class1.cs" | ||
} | ||
], | ||
"defaultName": "WpfLibrary1", | ||
"postActions": [ | ||
{ | ||
"condition": "(!skipRestore)", | ||
"description": "Restore NuGet packages required by this project.", | ||
"manualInstructions": [ | ||
{ "text": "Run 'dotnet restore'" } | ||
], | ||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", | ||
"continueOnError": true | ||
}, | ||
{ | ||
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", | ||
"description": "Opens Class1.cs in the editor", | ||
"manualInstructions": [ ], | ||
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", | ||
"args": { | ||
"files": "1" | ||
}, | ||
"continueOnError": true | ||
} | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/Class1.cs
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,8 @@ | ||
using System; | ||
|
||
namespace Company.ClassLibrary1 | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...t.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/Company.ClassLibrary1.csproj
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,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp3.0</TargetFramework> | ||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework> | ||
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.ClassLibrary1</RootNamespace> | ||
<LangVersion Condition="'$(langVersion)' != ''">$(ProjectLanguageVersion)</LangVersion> | ||
<UseWPF>true</UseWPF> | ||
</PropertyGroup> | ||
|
||
</Project> |
24 changes: 24 additions & 0 deletions
24
...ProjectTemplates/content/WpfClassLibrary-VisualBasic/.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,24 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/dotnetcli.host", | ||
"symbolInfo": { | ||
"TargetFrameworkOverride": { | ||
"isHidden": "true", | ||
"longName": "target-framework-override", | ||
"shortName": "" | ||
}, | ||
"Framework": { | ||
"longName": "framework" | ||
}, | ||
"skipRestore": { | ||
"longName": "no-restore", | ||
"shortName": "" | ||
}, | ||
"langVersion": { | ||
"longName": "langVersion", | ||
"shortName": "" | ||
} | ||
}, | ||
"usageExamples": [ | ||
"" | ||
] | ||
} |
86 changes: 86 additions & 0 deletions
86
...t.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/template.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,86 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/template", | ||
"author": "Microsoft", | ||
"classifications": ["Common", "WPF"], | ||
"name": "WPF Class library", | ||
"generatorVersions": "[1.0.0.0-*)", | ||
"description": "A project for creating a class library that targets a .NET Core WPF Application", | ||
"groupIdentity": "Microsoft.Common.WPF.Library", | ||
"precedence": "3000", | ||
"identity": "Microsoft.Common.WPF.Library.VisualBasic.3.0", | ||
"shortName": "wpflib", | ||
"tags": { | ||
"language": "VB", | ||
"type": "project" | ||
}, | ||
"sourceName": "Company.ClassLibrary1", | ||
"preferNameDirectory": true, | ||
"symbols": { | ||
"TargetFrameworkOverride": { | ||
"type": "parameter", | ||
"description": "Overrides the target framework", | ||
"replaces": "TargetFrameworkOverride", | ||
"datatype": "string", | ||
"defaultValue": "" | ||
}, | ||
"Framework": { | ||
"type": "parameter", | ||
"description": "The target framework for the project.", | ||
"datatype": "choice", | ||
"choices": [ | ||
{ | ||
"choice": "netcoreapp3.0", | ||
"description": "Target netcoreapp3.0" | ||
} | ||
], | ||
"replaces": "netcoreapp3.0", | ||
"defaultValue": "netcoreapp3.0" | ||
}, | ||
"langVersion": { | ||
"type": "parameter", | ||
"datatype": "text", | ||
"description": "Sets langVersion in the created project file", | ||
"defaultValue": "", | ||
"replaces": "$(ProjectLanguageVersion)" | ||
}, | ||
"HostIdentifier": { | ||
"type": "bind", | ||
"binding": "HostIdentifier" | ||
}, | ||
"skipRestore": { | ||
"type": "parameter", | ||
"datatype": "bool", | ||
"description": "If specified, skips the automatic restore of the project on create.", | ||
"defaultValue": "false" | ||
} | ||
}, | ||
"primaryOutputs": [ | ||
{ "path": "Company.ClassLibrary1.csproj" }, | ||
{ | ||
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", | ||
"path": "Class1.vb" | ||
} | ||
], | ||
"defaultName": "WpfLibrary1", | ||
"postActions": [ | ||
{ | ||
"condition": "(!skipRestore)", | ||
"description": "Restore NuGet packages required by this project.", | ||
"manualInstructions": [ | ||
{ "text": "Run 'dotnet restore'" } | ||
], | ||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", | ||
"continueOnError": true | ||
}, | ||
{ | ||
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", | ||
"description": "Opens Class1.cs in the editor", | ||
"manualInstructions": [ ], | ||
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", | ||
"args": { | ||
"files": "1" | ||
}, | ||
"continueOnError": true | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
...aging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/Class1.vb
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,3 @@ | ||
Public Class Class1 | ||
|
||
End Class |
12 changes: 12 additions & 0 deletions
12
...net.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/Company.ClassLibrary1.vbproj
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,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | ||
|
||
<PropertyGroup> | ||
<RootNamespace>Company.ClassLibrary1</RootNamespace> | ||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp3.0</TargetFramework> | ||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework> | ||
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">Company.ClassLibrary1</RootNamespace> | ||
<LangVersion Condition="'$(langVersion)' != ''">$(ProjectLanguageVersion)</LangVersion> | ||
<UseWPF>true</UseWPF> | ||
</PropertyGroup> | ||
|
||
</Project> |
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.