Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate McMaster <natemcmaster@users.noreply.github.com>2019-01-24 02:54:47 +0300
committerGitHub <noreply@github.com>2019-01-24 02:54:47 +0300
commit33bc4576da042255f375e8ba50f4fd513dcb0e4d (patch)
treeb445a68e97be01096aa23b3436c1b62cc56f8634 /src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp
parenteef9f76759b59e7a03197242b9b5378652838f4b (diff)
Convert ProjectTemplates to build using ProjectReferences (#6935)
Diffstat (limited to 'src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp')
-rw-r--r--src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json13
-rw-r--r--src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json80
-rw-r--r--src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3.host.json16
-rw-r--r--src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3/RazorClassLibrary.icobin0 -> 42890 bytes
-rw-r--r--src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml13
-rw-r--r--src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml.cs17
6 files changed, 139 insertions, 0 deletions
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json
new file mode 100644
index 0000000000..709f1b9629
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+ "Framework": {
+ "longName": "framework",
+ "isHidden": true
+ },
+ "skipRestore": {
+ "longName": "no-restore",
+ "shortName": ""
+ }
+ }
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json
new file mode 100644
index 0000000000..47000e198f
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json
@@ -0,0 +1,80 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Microsoft",
+ "classifications": [
+ "Web",
+ "Razor",
+ "Library",
+ "Razor Class Library"
+ ],
+ "name": "Razor Class Library",
+ "generatorVersions": "[1.0.0.0-*)",
+ "description": "A project for creating a Razor class library that targets .NET Standard",
+ "groupIdentity": "Microsoft.Web.Razor",
+ "precedence": "5000",
+ "identity": "Microsoft.Web.Razor.Library.CSharp.3.0",
+ "shortName": "razorclasslib",
+ "tags": {
+ "language": "C#",
+ "type": "project"
+ },
+ "sourceName": "Company.RazorClassLibrary1",
+ "preferNameDirectory": true,
+ "symbols": {
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "netcoreapp3.0",
+ "description": "Target netcoreapp3.0"
+ }
+ ],
+ "defaultValue": "netcoreapp3.0"
+ },
+ "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.RazorClassLibrary1.csproj"
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "Areas/MyFeature/Pages/Page1.cshtml"
+ }
+ ],
+ "defaultName": "RazorClassLibrary1",
+ "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 Areas/MyFeature/Pages/Page1.cshtml in the editor",
+ "manualInstructions": [],
+ "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
+ "args": {
+ "files": "1"
+ },
+ "continueOnError": true
+ }
+ ]
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3.host.json
new file mode 100644
index 0000000000..0e58355fdc
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3.host.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "http://json.schemastore.org/vs-2017.3.host",
+ "name": {
+ "text": "Razor Class Library",
+ "id": "1023",
+ "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}"
+ },
+ "description": {
+ "text": "A project template for creating a Razor class library.",
+ "id": "1024",
+ "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}"
+ },
+ "order": 305,
+ "icon": "vs-2017.3/RazorClassLibrary.ico",
+ "learnMoreLink": "https://go.microsoft.com/fwlink/?linkid=872103"
+}
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3/RazorClassLibrary.ico b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3/RazorClassLibrary.ico
new file mode 100644
index 0000000000..9d01cf3fd2
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3/RazorClassLibrary.ico
Binary files differ
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml
new file mode 100644
index 0000000000..b39e1ae932
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml
@@ -0,0 +1,13 @@
+@page
+@model Company.RazorClassLibrary1.MyFeature.Pages.Page1Model
+
+<!DOCTYPE html>
+
+<html>
+<head>
+ <meta name="viewport" content="width=device-width" />
+ <title>Page1</title>
+</head>
+<body>
+</body>
+</html>
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml.cs
new file mode 100644
index 0000000000..07a0edacfc
--- /dev/null
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+
+namespace Company.RazorClassLibrary1.MyFeature.Pages
+{
+ public class Page1Model : PageModel
+ {
+ public void OnGet()
+ {
+
+ }
+ }
+} \ No newline at end of file