├── .appveyor.yml ├── .gitattributes ├── .gitignore ├── .vscode └── settings.json ├── .vsts-pipelines ├── builds │ ├── ci-internal.yml │ └── ci-public.yml └── templates │ └── project-ci.yml ├── CONTRIBUTING.md ├── Directory.Build.props ├── Directory.Build.targets ├── LICENSE.txt ├── NuGet.config ├── NuGetPackageVerifier.json ├── README.md ├── Templating.sln ├── build.cmd ├── build.sh ├── build ├── dependencies.props ├── repo.props └── sources.props ├── korebuild-lock.txt ├── korebuild.json ├── migrations ├── updateMigrations.cmd └── updateProj.ps1 ├── run.cmd ├── run.ps1 ├── run.sh ├── scripts ├── .gitignore ├── Audit-Packages.ps1 ├── Run-Angular-Locally.ps1 ├── Run-Razor-Locally.ps1 ├── Run-React-Locally.ps1 ├── Run-ReactRedux-Locally.ps1 ├── Run-Starterweb-Locally.ps1 └── Test-Template.ps1 ├── src ├── Directory.Build.props ├── Directory.Build.targets ├── GenerateContent.targets ├── Microsoft.DotNet.Web.Client.ItemTemplates │ ├── Microsoft.DotNet.Web.Client.ItemTemplates.csproj │ └── content │ │ ├── Less │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ └── template.json │ │ └── styleSheet1.less │ │ ├── Scss │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ └── template.json │ │ └── styleSheet1.scss │ │ └── TypeScript │ │ ├── .template.config │ │ ├── dotnetcli.host.json │ │ └── template.json │ │ └── file1.ts ├── Microsoft.DotNet.Web.ItemTemplates │ ├── Microsoft.DotNet.Web.ItemTemplates.csproj │ └── content │ │ ├── RazorPage │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ └── template.json │ │ ├── Index.cshtml │ │ └── Index.cshtml.cs │ │ ├── ViewImports │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ └── template.json │ │ └── _ViewImports.cshtml │ │ └── ViewStart │ │ ├── .template.config │ │ ├── dotnetcli.host.json │ │ └── template.json │ │ └── _ViewStart.cshtml ├── Microsoft.DotNet.Web.ProjectTemplates │ ├── .gitignore │ ├── EmptyWeb-CSharp.csproj.in │ ├── EmptyWeb-FSharp.fsproj.in │ ├── Microsoft.DotNet.Web.ProjectTemplates.csproj │ ├── RazorClassLibrary-CSharp.csproj.in │ ├── RazorPagesWeb-CSharp.csproj.in │ ├── StarterWeb-CSharp.csproj.in │ ├── StarterWeb-FSharp.fsproj.in │ ├── WebApi-CSharp.csproj.in │ ├── WebApi-FSharp.fsproj.in │ └── content │ │ ├── Directory.Build.props │ │ ├── Directory.Build.targets │ │ ├── EmptyWeb-CSharp │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── template.json │ │ │ ├── vs-2017.3.host.json │ │ │ └── vs-2017.3 │ │ │ │ └── Empty.png │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ │ ├── EmptyWeb-FSharp │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── template.json │ │ │ ├── vs-2017.3.host.json │ │ │ └── vs-2017.3 │ │ │ │ └── Empty.png │ │ ├── Program.fs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.fs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ │ ├── RazorClassLibrary-CSharp │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── template.json │ │ │ ├── vs-2017.3.host.json │ │ │ └── vs-2017.3 │ │ │ │ └── RazorClassLibrary.ico │ │ └── Areas │ │ │ └── MyFeature │ │ │ └── Pages │ │ │ ├── Page1.cshtml │ │ │ └── Page1.cshtml.cs │ │ ├── RazorPagesWeb-CSharp │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── template.json │ │ │ ├── vs-2017.3.host.json │ │ │ └── vs-2017.3 │ │ │ │ └── WebApplication.png │ │ ├── Areas │ │ │ └── Identity │ │ │ │ └── Pages │ │ │ │ └── _ViewStart.cshtml │ │ ├── Data │ │ │ ├── ApplicationDbContext.cs │ │ │ ├── SqlLite │ │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ │ └── SqlServer │ │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Pages │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ ├── Index.cshtml │ │ │ ├── Index.cshtml.cs │ │ │ ├── Privacy.cshtml │ │ │ ├── Privacy.cshtml.cs │ │ │ ├── Shared │ │ │ │ ├── _CookieConsentPartial.cshtml │ │ │ │ ├── _Layout.cshtml │ │ │ │ ├── _LoginPartial.Identity.cshtml │ │ │ │ ├── _LoginPartial.OrgAuth.cshtml │ │ │ │ └── _ValidationScriptsPartial.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── app.db │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ └── site.css │ │ │ ├── favicon.ico │ │ │ ├── js │ │ │ └── site.js │ │ │ └── lib │ │ │ ├── bootstrap │ │ │ ├── LICENSE │ │ │ └── dist │ │ │ │ ├── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ │ └── js │ │ │ │ ├── bootstrap.bundle.js │ │ │ │ ├── bootstrap.bundle.js.map │ │ │ │ ├── bootstrap.bundle.min.js │ │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.js.map │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── bootstrap.min.js.map │ │ │ ├── jquery-validation-unobtrusive │ │ │ ├── LICENSE.txt │ │ │ ├── jquery.validate.unobtrusive.js │ │ │ └── jquery.validate.unobtrusive.min.js │ │ │ ├── jquery-validation │ │ │ ├── LICENSE.md │ │ │ └── dist │ │ │ │ ├── additional-methods.js │ │ │ │ ├── additional-methods.min.js │ │ │ │ ├── jquery.validate.js │ │ │ │ └── jquery.validate.min.js │ │ │ └── jquery │ │ │ ├── LICENSE.txt │ │ │ └── dist │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ └── jquery.min.map │ │ ├── StarterWeb-CSharp │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── template.json │ │ │ ├── vs-2017.3.host.json │ │ │ └── vs-2017.3 │ │ │ │ └── WebApplication.png │ │ ├── Areas │ │ │ └── Identity │ │ │ │ └── Pages │ │ │ │ └── _ViewStart.cshtml │ │ ├── Controllers │ │ │ └── HomeController.cs │ │ ├── Data │ │ │ ├── ApplicationDbContext.cs │ │ │ ├── SqlLite │ │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ │ └── SqlServer │ │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models │ │ │ └── ErrorViewModel.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── Views │ │ │ ├── Home │ │ │ │ ├── Index.cshtml │ │ │ │ └── Privacy.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ ├── _CookieConsentPartial.cshtml │ │ │ │ ├── _Layout.cshtml │ │ │ │ ├── _LoginPartial.Identity.cshtml │ │ │ │ ├── _LoginPartial.OrgAuth.cshtml │ │ │ │ └── _ValidationScriptsPartial.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ └── _ViewStart.cshtml │ │ ├── app.db │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ └── site.css │ │ │ ├── favicon.ico │ │ │ ├── js │ │ │ └── site.js │ │ │ └── lib │ │ │ ├── bootstrap │ │ │ ├── LICENSE │ │ │ └── dist │ │ │ │ ├── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ │ └── js │ │ │ │ ├── bootstrap.bundle.js │ │ │ │ ├── bootstrap.bundle.js.map │ │ │ │ ├── bootstrap.bundle.min.js │ │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.js.map │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── bootstrap.min.js.map │ │ │ ├── jquery-validation-unobtrusive │ │ │ ├── LICENSE.txt │ │ │ ├── jquery.validate.unobtrusive.js │ │ │ └── jquery.validate.unobtrusive.min.js │ │ │ ├── jquery-validation │ │ │ ├── LICENSE.md │ │ │ └── dist │ │ │ │ ├── additional-methods.js │ │ │ │ ├── additional-methods.min.js │ │ │ │ ├── jquery.validate.js │ │ │ │ └── jquery.validate.min.js │ │ │ └── jquery │ │ │ ├── LICENSE.txt │ │ │ └── dist │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ └── jquery.min.map │ │ ├── StarterWeb-FSharp │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ └── template.json │ │ ├── Controllers │ │ │ └── HomeController.fs │ │ ├── Models │ │ │ └── ErrorViewModel.fs │ │ ├── Program.fs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.fs │ │ ├── Views │ │ │ ├── Home │ │ │ │ ├── Index.cshtml │ │ │ │ └── Privacy.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ ├── _CookieConsentPartial.cshtml │ │ │ │ ├── _Layout.cshtml │ │ │ │ └── _ValidationScriptsPartial.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ └── _ViewStart.cshtml │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ └── site.css │ │ │ ├── favicon.ico │ │ │ ├── js │ │ │ └── site.js │ │ │ └── lib │ │ │ ├── bootstrap │ │ │ ├── LICENSE │ │ │ └── dist │ │ │ │ ├── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ │ └── js │ │ │ │ ├── bootstrap.bundle.js │ │ │ │ ├── bootstrap.bundle.js.map │ │ │ │ ├── bootstrap.bundle.min.js │ │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.js.map │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── bootstrap.min.js.map │ │ │ ├── jquery-validation-unobtrusive │ │ │ ├── LICENSE.txt │ │ │ ├── jquery.validate.unobtrusive.js │ │ │ └── jquery.validate.unobtrusive.min.js │ │ │ ├── jquery-validation │ │ │ ├── LICENSE.md │ │ │ └── dist │ │ │ │ ├── additional-methods.js │ │ │ │ ├── additional-methods.min.js │ │ │ │ ├── jquery.validate.js │ │ │ │ └── jquery.validate.min.js │ │ │ └── jquery │ │ │ ├── LICENSE.txt │ │ │ └── dist │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ └── jquery.min.map │ │ ├── WebApi-CSharp │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── template.json │ │ │ ├── vs-2017.3.host.json │ │ │ └── vs-2017.3 │ │ │ │ └── WebAPI.png │ │ ├── Controllers │ │ │ └── ValuesController.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ │ └── WebApi-FSharp │ │ ├── .template.config │ │ ├── dotnetcli.host.json │ │ ├── template.json │ │ ├── vs-2017.3.host.json │ │ └── vs-2017.3 │ │ │ └── WebAPI.png │ │ ├── Controllers │ │ └── ValuesController.fs │ │ ├── Program.fs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.fs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Microsoft.DotNet.Web.Spa.ProjectTemplates │ ├── .gitignore │ ├── Angular-CSharp.csproj.in │ ├── Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj │ ├── React-CSharp.csproj.in │ ├── ReactRedux-CSharp.csproj.in │ └── content │ │ ├── Angular-CSharp │ │ ├── .gitignore │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── icon.png │ │ │ ├── template.json │ │ │ └── vs-2017.3.host.json │ │ ├── ClientApp │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── angular.json │ │ │ ├── e2e │ │ │ │ ├── protractor.conf.js │ │ │ │ ├── src │ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ │ └── app.po.ts │ │ │ │ └── tsconfig.e2e.json │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── app │ │ │ │ │ ├── app.component.css │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── app.component.ts │ │ │ │ │ ├── app.module.ts │ │ │ │ │ ├── app.server.module.ts │ │ │ │ │ ├── counter │ │ │ │ │ │ ├── counter.component.html │ │ │ │ │ │ ├── counter.component.spec.ts │ │ │ │ │ │ └── counter.component.ts │ │ │ │ │ ├── fetch-data │ │ │ │ │ │ ├── fetch-data.component.html │ │ │ │ │ │ └── fetch-data.component.ts │ │ │ │ │ ├── home │ │ │ │ │ │ ├── home.component.html │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ └── nav-menu │ │ │ │ │ │ ├── nav-menu.component.css │ │ │ │ │ │ ├── nav-menu.component.html │ │ │ │ │ │ └── nav-menu.component.ts │ │ │ │ ├── assets │ │ │ │ │ └── .gitkeep │ │ │ │ ├── browserslist │ │ │ │ ├── environments │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ └── environment.ts │ │ │ │ ├── index.html │ │ │ │ ├── karma.conf.js │ │ │ │ ├── main.ts │ │ │ │ ├── polyfills.ts │ │ │ │ ├── styles.css │ │ │ │ ├── test.ts │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── tsconfig.server.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── tslint.json │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── Controllers │ │ │ └── SampleDataController.cs │ │ ├── Pages │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ └── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ └── favicon.ico │ │ ├── Directory.Build.props │ │ ├── Directory.Build.targets │ │ ├── React-CSharp │ │ ├── .gitignore │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── icon.png │ │ │ ├── template.json │ │ │ └── vs-2017.3.host.json │ │ ├── ClientApp │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── public │ │ │ │ ├── favicon.ico │ │ │ │ ├── index.html │ │ │ │ └── manifest.json │ │ │ ├── scss │ │ │ │ └── custom.scss │ │ │ └── src │ │ │ │ ├── App.js │ │ │ │ ├── App.test.js │ │ │ │ ├── components │ │ │ │ ├── Counter.js │ │ │ │ ├── FetchData.js │ │ │ │ ├── Home.js │ │ │ │ ├── Layout.js │ │ │ │ ├── NavMenu.css │ │ │ │ └── NavMenu.js │ │ │ │ ├── index.js │ │ │ │ └── registerServiceWorker.js │ │ ├── Controllers │ │ │ └── SampleDataController.cs │ │ ├── Pages │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ └── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ │ └── ReactRedux-CSharp │ │ ├── .gitignore │ │ ├── .template.config │ │ ├── dotnetcli.host.json │ │ ├── icon.png │ │ ├── template.json │ │ └── vs-2017.3.host.json │ │ ├── ClientApp │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── manifest.json │ │ └── src │ │ │ ├── App.js │ │ │ ├── App.test.js │ │ │ ├── components │ │ │ ├── Counter.js │ │ │ ├── FetchData.js │ │ │ ├── Home.js │ │ │ ├── Layout.js │ │ │ ├── NavMenu.css │ │ │ └── NavMenu.js │ │ │ ├── index.js │ │ │ ├── registerServiceWorker.js │ │ │ └── store │ │ │ ├── Counter.js │ │ │ ├── WeatherForecasts.js │ │ │ └── configureStore.js │ │ ├── Controllers │ │ └── SampleDataController.cs │ │ ├── Pages │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── SetPackageProperties.targets ├── THIRD-PARTY-NOTICES └── templates.nuspec ├── test ├── Directory.Build.targets ├── DotNetToolsInstaller │ └── DotNetToolsInstaller.csproj ├── GenerateTestProps.targets ├── TemplateTests.props.in └── Templates.Test │ ├── .gitattributes │ ├── BaselineTest.cs │ ├── ByteOrderMarkTest.cs │ ├── CdnScriptTagTests.cs │ ├── EmptyWebTemplateTest.cs │ ├── Helpers │ ├── AddFirewallExclusion.cs │ ├── AspNetProcess.cs │ ├── Npm.cs │ ├── ProcessEx.cs │ ├── TemplatePackageInstaller.cs │ ├── TemplateTestBase.cs │ ├── WebDriverExtensions.cs │ └── WebDriverFactory.cs │ ├── Infrastructure │ ├── AssemblyFixtureAttribute.cs │ ├── BrowserFixture.cs │ ├── BrowserTestBase.cs │ ├── CaptureSeleniumLogsAttribute.cs │ ├── SeleniumServerFixture.cs │ └── XUnitExtensions │ │ ├── XUnitTestCollectionRunnerWIthAssemblyFixture.cs │ │ ├── XunitTestAssemblyRunnerWithAssemblyFixture.cs │ │ ├── XunitTestFrameworkExecutorWithAssemblyFixture.cs │ │ └── XunitTestFrameworkWithAssemblyFixture.cs │ ├── MvcTemplateTest.cs │ ├── RazorPagesTemplateTest.cs │ ├── SpaTemplateTest │ ├── AngularTemplateTest.cs │ ├── ReactReduxTemplateTest.cs │ ├── ReactTemplateTest.cs │ ├── ReactTemplateTest.cs~RF9c2cf40.TMP │ └── SpaTemplateTestBase.cs │ ├── Templates.Test.csproj │ ├── WebApiTemplateTest.cs │ └── template-baselines.json └── version.props /.appveyor.yml: -------------------------------------------------------------------------------- 1 | init: 2 | - git config --global core.autocrlf true 3 | install: 4 | - ps: Install-Product node 8 x64 5 | branches: 6 | only: 7 | - master 8 | - /^release\/.*$/ 9 | - /^(.*\/)?ci-.*$/ 10 | build_script: 11 | - ps: .\build.cmd 12 | clone_depth: 1 13 | environment: 14 | global: 15 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true 16 | DOTNET_CLI_TELEMETRY_OPTOUT: 1 17 | test: 'off' 18 | deploy: 'off' 19 | os: Visual Studio 2017 Preview 20 | before_build: 21 | - choco install googlechrome --ignore-checksum 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.doc diff=astextplain 2 | *.DOC diff=astextplain 3 | *.docx diff=astextplain 4 | *.DOCX diff=astextplain 5 | *.dot diff=astextplain 6 | *.DOT diff=astextplain 7 | *.pdf diff=astextplain 8 | *.PDF diff=astextplain 9 | *.rtf diff=astextplain 10 | *.RTF diff=astextplain 11 | 12 | *.jpg binary 13 | *.png binary 14 | *.gif binary 15 | 16 | *.cs text=auto diff=csharp 17 | *.vb text=auto 18 | *.resx text=auto 19 | *.c text=auto 20 | *.cpp text=auto 21 | *.cxx text=auto 22 | *.h text=auto 23 | *.hxx text=auto 24 | *.py text=auto 25 | *.rb text=auto 26 | *.java text=auto 27 | *.html text=auto 28 | *.htm text=auto 29 | *.css text=auto 30 | *.scss text=auto 31 | *.sass text=auto 32 | *.less text=auto 33 | *.js text=auto 34 | *.lisp text=auto 35 | *.clj text=auto 36 | *.sql text=auto 37 | *.php text=auto 38 | *.lua text=auto 39 | *.m text=auto 40 | *.asm text=auto 41 | *.erl text=auto 42 | *.fs text=auto 43 | *.fsx text=auto 44 | *.hs text=auto 45 | 46 | *.csproj text=auto 47 | *.vbproj text=auto 48 | *.fsproj text=auto 49 | *.dbproj text=auto 50 | *.sln text=auto eol=crlf 51 | 52 | *.sh eol=lf 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Oo]bj/ 2 | [Bb]in/ 3 | TestResults/ 4 | .nuget/ 5 | *.sln.ide/ 6 | _ReSharper.*/ 7 | packages/ 8 | artifacts/ 9 | PublishProfiles/ 10 | .vs/ 11 | node_modules/ 12 | debugSettings.json 13 | project.lock.json 14 | *.user 15 | *.suo 16 | *.cache 17 | *.docstates 18 | _ReSharper.* 19 | nuget.exe 20 | *net45.csproj 21 | *net451.csproj 22 | *k10.csproj 23 | *.psess 24 | *.vsp 25 | *.pidb 26 | *.userprefs 27 | *DS_Store 28 | *.ncrunchsolution 29 | *.*sdf 30 | *.ipch 31 | .settings 32 | *.sln.ide 33 | node_modules 34 | **/[Cc]ompiler/[Rr]esources/**/*.js 35 | .build/ 36 | .testPublish/ 37 | .vscode 38 | global.json 39 | .idea/ 40 | *.binlog -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "*.json.in": "json", 4 | "*.*proj.in": "xml" 5 | }, 6 | "[json]": { 7 | "editor.tabSize": 2 8 | }, 9 | "javascript.format.insertSpaceBeforeFunctionParenthesis": true, 10 | "javascript.format.insertSpaceAfterConstructor": true 11 | } 12 | -------------------------------------------------------------------------------- /.vsts-pipelines/builds/ci-internal.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - master 3 | - release/* 4 | 5 | resources: 6 | repositories: 7 | - repository: buildtools 8 | type: git 9 | name: aspnet-BuildTools 10 | ref: refs/heads/master 11 | 12 | phases: 13 | - template: ../templates/project-ci.yml 14 | -------------------------------------------------------------------------------- /.vsts-pipelines/builds/ci-public.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - master 3 | - release/* 4 | 5 | # See https://github.com/aspnet/BuildTools 6 | resources: 7 | repositories: 8 | - repository: buildtools 9 | type: github 10 | endpoint: DotNet-Bot GitHub Connection 11 | name: aspnet/BuildTools 12 | ref: refs/heads/master 13 | 14 | phases: 15 | - template: ../templates/project-ci.yml 16 | -------------------------------------------------------------------------------- /.vsts-pipelines/templates/project-ci.yml: -------------------------------------------------------------------------------- 1 | # See https://github.com/aspnet/BuildTools 2 | 3 | phases: 4 | - template: .azure/templates/jobs/default-build.yml@buildtools 5 | parameters: 6 | agentOs: Windows 7 | beforeBuild: 8 | - task: NodeTool@0 9 | displayName: Use Node 8.x 10 | inputs: 11 | versionSpec: 8.x 12 | 13 | - template: .azure/templates/jobs/default-build.yml@buildtools 14 | parameters: 15 | agentOs: macOS 16 | beforeBuild: 17 | - task: NodeTool@0 18 | displayName: Use Node 8.x 19 | inputs: 20 | versionSpec: 8.x 21 | - script: ./run.sh install-tools; $(Agent.WorkFolder)/.dotnet/dotnet dev-certs https 22 | displayName: install certs 23 | env: 24 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 25 | DOTNET_CLI_TELEMETRY_OPTOUT: 1 26 | 27 | - template: .azure/templates/jobs/default-build.yml@buildtools 28 | parameters: 29 | agentOs: Linux 30 | beforeBuild: 31 | - task: NodeTool@0 32 | displayName: Use Node 8.x 33 | inputs: 34 | versionSpec: 8.x 35 | - script: ./run.sh install-tools; $(Agent.WorkFolder)/.dotnet/dotnet dev-certs https 36 | displayName: install certs 37 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing 2 | ====== 3 | 4 | Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/master/CONTRIBUTING.md) in the Home repo. 5 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Microsoft ASP.NET Core 12 | $(MSBuildThisFileDirectory) 13 | https://github.com/aspnet/templating 14 | git 15 | true 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | $(MicrosoftNETCoreApp30PackageVersion) 4 | $(NETStandardLibrary20PackageVersion) 5 | 6 | 99.9 7 | 8 | -------------------------------------------------------------------------------- /NuGet.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NuGetPackageVerifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "Default": { 3 | "rules": [ 4 | "DefaultCompositeRule" 5 | ], 6 | "packages": { 7 | "Microsoft.AspNetCore.SpaTemplates": { 8 | "packageTypes": [ 9 | "Template" 10 | ] 11 | }, 12 | "Microsoft.DotNet.Web.Client.ItemTemplates": { 13 | "packageTypes": [ 14 | "Template" 15 | ] 16 | }, 17 | "Microsoft.DotNet.Web.ItemTemplates": { 18 | "packageTypes": [ 19 | "Template" 20 | ] 21 | }, 22 | "Microsoft.DotNet.Web.ProjectTemplates.3.0": { 23 | "packageTypes": [ 24 | "Template" 25 | ] 26 | }, 27 | "Microsoft.DotNet.Web.Spa.ProjectTemplates": { 28 | "packageTypes": [ 29 | "Template" 30 | ] 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Templates [Archived] 2 | 3 | **This GitHub project has been archived.** Ongoing development on this project can be found in . 4 | 5 | ## Getting Started 6 | ASP.NET Templates provide project templates which are used in .NET Core for creating ASP.NET Core applications. 7 | 8 | This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [AspNetCore](https://github.com/aspnet/AspNetCore) repo. 9 | 10 | ## Building Templates 11 | - Running build.cmd in this repo requires NPM which can be installed from https://nodejs.org/en/. 12 | - The ASP.NET localhost development certificate must also be installed and trusted or else you'll get a test error "Certificate error: Navigation blocked". 13 | - `build.cmd` (or `build /t:package` to avoid tests) will produce NuGet packages for each class of template in the artifacts directory. These can be installed via `dotnet new -i {nugetpackage path}` 14 | - You also need to get the packages these templates depend on into your package cache or else `dotnet new` restore will fail. The easiest way to get them to run is by letting the build run at least 1 test. 15 | -------------------------------------------------------------------------------- /build.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE" 3 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | 6 | # Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) 7 | chmod +x "$DIR/run.sh"; sync 8 | "$DIR/run.sh" default-build "$@" 9 | -------------------------------------------------------------------------------- /build/repo.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Internal.AspNetCore.Universe.Lineup 7 | https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /build/sources.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $(DotNetRestoreSources) 6 | 7 | $(RestoreSources); 8 | https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; 9 | https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; 10 | https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; 11 | 12 | 13 | $(RestoreSources); 14 | https://api.nuget.org/v3/index.json; 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /korebuild-lock.txt: -------------------------------------------------------------------------------- 1 | version:3.0.0-alpha1-20181017.4 2 | commithash:42e6f534fa88fb777f0bf489342a5a072e2ed274 3 | -------------------------------------------------------------------------------- /korebuild.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", 3 | "channel": "master", 4 | "toolsets": { 5 | "nodejs": { 6 | "required": true, 7 | "minVersion": "8.0" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /migrations/updateProj.ps1: -------------------------------------------------------------------------------- 1 | $contents = Get-Content Company.WebApplication1\Company.WebApplication1.csproj -Raw 2 | $matches = [Regex]::Match($contents, 'Version=\"(?[^\"]+)\"'); 3 | $appVer = $matches.Groups[1].Value 4 | $replace = 'App" Version="' + $appVer + '"'; 5 | $contents -replace('App\"', $replace) | Set-Content Company.WebApplication1\Company.WebApplication1.csproj 6 | -------------------------------------------------------------------------------- /run.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE" 3 | -------------------------------------------------------------------------------- /scripts/.gitignore: -------------------------------------------------------------------------------- 1 | package-lock.json 2 | tmp/ 3 | CustomHive/ 4 | angular/ 5 | mvc/ 6 | razor/ 7 | react/ 8 | reactredux/ 9 | -------------------------------------------------------------------------------- /scripts/Audit-Packages.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | #requires -version 4 3 | 4 | [CmdletBinding(PositionalBinding = $false)] 5 | param( 6 | [switch]$fix = $false 7 | ) 8 | 9 | Set-StrictMode -Version 2 10 | $ErrorActionPreference = 'Stop' 11 | $contentDir = "$PSScriptRoot/../src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content" 12 | foreach ($package in $contentDir) { 13 | $spaFrameworks = Get-ChildItem -Path $package -Directory 14 | 15 | foreach ($spaFramework in $spaFrameworks) { 16 | $spaFrameworkDir = Join-Path $contentDir $spaFramework 17 | $clientApp = Join-Path $spaFrameworkDir "ClientApp" 18 | Push-Location $clientApp 19 | try { 20 | Write-Output "Auditing $clientApp" 21 | if ($fix) { 22 | npm audit fix --force 23 | } 24 | else { 25 | npm audit 26 | } 27 | } 28 | finally { 29 | Pop-Location 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /scripts/Run-Angular-Locally.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | #requires -version 4 3 | 4 | [CmdletBinding(PositionalBinding = $false)] 5 | param() 6 | 7 | Set-StrictMode -Version 2 8 | $ErrorActionPreference = 'Stop' 9 | 10 | . $PSScriptRoot\Test-Template.ps1 11 | 12 | Test-Template "angular" "angular" "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0.0-alpha1.nupkg" $true 13 | -------------------------------------------------------------------------------- /scripts/Run-Razor-Locally.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env powershell 2 | #requires -version 4 3 | 4 | [CmdletBinding(PositionalBinding = $false)] 5 | param() 6 | 7 | . $PSScriptRoot\Test-Template.ps1 8 | 9 | Test-Template "webapp" "webapp -au Individual" "Microsoft.DotNet.Web.ProjectTemplates.3.0.3.0.0-alpha1.nupkg" $false 10 | -------------------------------------------------------------------------------- /scripts/Run-React-Locally.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | #requires -version 4 3 | 4 | [CmdletBinding(PositionalBinding = $false)] 5 | param() 6 | 7 | Set-StrictMode -Version 2 8 | $ErrorActionPreference = 'Stop' 9 | 10 | . $PSScriptRoot\Test-Template.ps1 11 | 12 | Test-Template "react" "react" "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0.0-alpha1.nupkg" $true 13 | -------------------------------------------------------------------------------- /scripts/Run-ReactRedux-Locally.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | #requires -version 4 3 | 4 | [CmdletBinding(PositionalBinding = $false)] 5 | param() 6 | 7 | Set-StrictMode -Version 2 8 | $ErrorActionPreference = 'Stop' 9 | 10 | . $PSScriptRoot\Test-Template.ps1 11 | 12 | Test-Template "reactredux" "reactredux" "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0.0-alpha1.nupkg" $true 13 | -------------------------------------------------------------------------------- /scripts/Run-Starterweb-Locally.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | #requires -version 4 3 | 4 | [CmdletBinding(PositionalBinding = $false)] 5 | param() 6 | 7 | Set-StrictMode -Version 2 8 | $ErrorActionPreference = 'Stop' 9 | 10 | . $PSScriptRoot\Test-Template.ps1 11 | 12 | Test-Template "mvc" "mvc -au Individual" "Microsoft.DotNet.Web.ProjectTemplates.3.0.3.0.0-alpha1.nupkg" $false 13 | -------------------------------------------------------------------------------- /scripts/Test-Template.ps1: -------------------------------------------------------------------------------- 1 | function Test-Template($templateName, $templateArgs, $templateNupkg, $isSPA) { 2 | $tmpDir = "$PSScriptRoot/$templateName" 3 | Remove-Item -Path $tmpDir -Recurse -ErrorAction Ignore 4 | 5 | & "$PSScriptRoot/../build.cmd" /t:Package 6 | Run-DotnetNew "--install", "$PSScriptRoot/../artifacts/build/$templateNupkg" 7 | 8 | New-Item -ErrorAction Ignore -Path $tmpDir -ItemType Directory 9 | Push-Location $tmpDir 10 | try { 11 | Run-DotnetNew $templateArgs, "--no-restore" 12 | 13 | if ($templateArgs -match 'F#') { 14 | $extension = "fsproj" 15 | } 16 | else { 17 | $extension = "csproj" 18 | } 19 | 20 | $proj = "$tmpDir/$templateName.$extension" 21 | $projContent = Get-Content -Path $proj -Raw 22 | $projContent = $projContent -replace ('', " 23 | 24 | 25 | 26 | ") 27 | $projContent | Set-Content $proj 28 | 29 | dotnet publish --configuration Release 30 | dotnet bin\Release\netcoreapp2.2\publish\$templateName.dll 31 | } 32 | finally { 33 | Pop-Location 34 | Run-DotnetNew "--debug:reinit" 35 | } 36 | } 37 | 38 | function Run-DotnetNew($arguments) { 39 | $expression = "dotnet new $arguments" 40 | Invoke-Expression $expression 41 | } 42 | -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | false 6 | False 7 | False 8 | False 9 | 2008;8021 10 | aspnet;templates 11 | $(MSBuildThisFileDirectory)templates.nuspec 12 | $(MSBuildProjectDirectory) 13 | 14 | 15 | 16 | 17 | true 18 | $(MSBuildThisFileDirectory)..\artifacts\build\ 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | false 5 | 6 | 99.9 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/GenerateContent.targets: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/Microsoft.DotNet.Web.Client.ItemTemplates.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0 5 | Web Client-Side File Templates for Microsoft Template Engine 6 | 7 | To install the templates in this package, run 'dotnet new --install $(PackageId)::$(PackageVersion)'. 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/Less/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host" 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/Less/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "Microsoft", 4 | "classifications": [ "Web", "Style" ], 5 | "name": "LESS Style Sheet", 6 | "generatorVersions": "[1.0.0.0-*)", 7 | "description": "LESS is a language that compiles into CSS", 8 | "groupIdentity": "Microsoft.DotNet.Web.ClientItems.Less", 9 | "precedence": "100", 10 | "identity": "Microsoft.DotNet.Web.ClientItems.Less", 11 | "shortName": "less", 12 | "sourceName": "styleSheet1", 13 | "tags": { 14 | "type": "item" 15 | }, 16 | "primaryOutputs": [ 17 | { 18 | "path": "styleSheet1.less" 19 | } 20 | ], 21 | "defaultName": "styleSheet1", 22 | "symbols": { 23 | "HostIdentifier": { 24 | "type": "bind", 25 | "binding": "HostIdentifier" 26 | } 27 | }, 28 | "postActions": [ 29 | { 30 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 31 | "description": "Opens styleSheet1.less in the editor", 32 | "manualInstructions": [ ], 33 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 34 | "args": { 35 | "files": "0" 36 | }, 37 | "continueOnError": true 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/Less/styleSheet1.less: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/Scss/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host" 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/Scss/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "Microsoft", 4 | "classifications": [ "Web", "Style" ], 5 | "name": "SCSS Style Sheet (SASS)", 6 | "generatorVersions": "[1.0.0.0-*)", 7 | "description": "SCSS is a language that compiles into CSS", 8 | "groupIdentity": "Microsoft.DotNet.Web.ClientItems.Scss", 9 | "precedence": "100", 10 | "identity": "Microsoft.DotNet.Web.ClientItems.Scss", 11 | "shortName": "scss", 12 | "sourceName": "styleSheet1", 13 | "tags": { 14 | "type": "item" 15 | }, 16 | "primaryOutputs": [ 17 | { 18 | "path": "styleSheet1.scss" 19 | } 20 | ], 21 | "defaultName": "styleSheet1", 22 | "symbols": { 23 | "HostIdentifier": { 24 | "type": "bind", 25 | "binding": "HostIdentifier" 26 | } 27 | }, 28 | "postActions": [ 29 | { 30 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 31 | "description": "Opens styleSheet1.scss in the editor", 32 | "manualInstructions": [ ], 33 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 34 | "args": { 35 | "files": "0" 36 | }, 37 | "continueOnError": true 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/Scss/styleSheet1.scss: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/TypeScript/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host" 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/TypeScript/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "Microsoft", 4 | "classifications": [ "Web", "Script" ], 5 | "name": "TypeScript file", 6 | "generatorVersions": "[1.0.0.0-*)", 7 | "description": "A blank TypeScript source file", 8 | "groupIdentity": "Microsoft.DotNet.Web.ClientItems.TypeScript", 9 | "precedence": "100", 10 | "identity": "Microsoft.DotNet.Web.ClientItems.TypeScript", 11 | "shortName": "tsfile", 12 | "sourceName": "file1", 13 | "tags": { 14 | "type": "item" 15 | }, 16 | "primaryOutputs": [ 17 | { 18 | "path": "file1.ts" 19 | } 20 | ], 21 | "defaultName": "file1", 22 | "symbols": { 23 | "HostIdentifier": { 24 | "type": "bind", 25 | "binding": "HostIdentifier" 26 | } 27 | }, 28 | "postActions": [ 29 | { 30 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 31 | "description": "Opens file1.ts in the editor", 32 | "manualInstructions": [ ], 33 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 34 | "args": { 35 | "files": "0" 36 | }, 37 | "continueOnError": true 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Client.ItemTemplates/content/TypeScript/file1.ts: -------------------------------------------------------------------------------- 1 | // Write your TypeScript code. 2 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/Microsoft.DotNet.Web.ItemTemplates.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0 5 | Web File Templates for Microsoft Template Engine 6 | 7 | To install the templates in this package, run 'dotnet new --install $(PackageId)::$(PackageVersion)'. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host" 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @*#if (!no-pagemodel)*@ 3 | @model MyApp.Namespace.IndexModel 4 | @*#endif*@ 5 | @{ 6 | } 7 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/RazorPage/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace MyApp.Namespace 9 | { 10 | #if NameIsPage 11 | public class IndexModel : Microsoft.AspNetCore.Mvc.RazorPages.PageModel 12 | #else 13 | public class IndexModel : PageModel 14 | #endif 15 | { 16 | public void OnGet() 17 | { 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/ViewImports/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host" 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/ViewImports/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "Microsoft", 4 | "classifications": [ "Web", "ASP.NET" ], 5 | "name": "MVC ViewImports", 6 | "generatorVersions": "[1.0.0.0-*)", 7 | "description": "An MVC View Import Page", 8 | "tags": { 9 | "language": "C#", 10 | "type": "item" 11 | }, 12 | "groupIdentity": "Microsoft.AspNetCore.Mvc.ViewImports", 13 | "precedence": "100", 14 | "identity": "Microsoft.AspNetCore.Mvc.ViewImports", 15 | "shortName": "viewimports", 16 | "sourceName": "ignoreme", 17 | "primaryOutputs": [ 18 | { 19 | "path": "_ViewImports.cshtml" 20 | } 21 | ], 22 | "defaultName": "_ViewImports", 23 | "symbols": { 24 | "namespace": { 25 | "description": "namespace for the generated code", 26 | "replaces": "MyApp.Namespace", 27 | "type": "parameter" 28 | }, 29 | "HostIdentifier": { 30 | "type": "bind", 31 | "binding": "HostIdentifier" 32 | } 33 | }, 34 | "postActions": [ 35 | { 36 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 37 | "description": "Opens _ViewImports.cshtml in the editor", 38 | "manualInstructions": [ ], 39 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 40 | "args": { 41 | "files": "0" 42 | }, 43 | "continueOnError": true 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/ViewImports/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @namespace MyApp.Namespace 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/ViewStart/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host" 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/ViewStart/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "Microsoft", 4 | "classifications": [ "Web", "ASP.NET" ], 5 | "name": "MVC ViewStart", 6 | "generatorVersions": "[1.0.0.0-*)", 7 | "description": "An MVC ViewStart Page", 8 | "tags": { 9 | "language": "C#", 10 | "type": "item" 11 | }, 12 | "groupIdentity": "Microsoft.AspNetCore.Mvc.ViewStart", 13 | "precedence": "100", 14 | "identity": "Microsoft.AspNetCore.Mvc.ViewStart", 15 | "shortName": "viewstart", 16 | "sourceName": "ignoreme", 17 | "primaryOutputs": [ 18 | { 19 | "path": "_ViewStart.cshtml" 20 | } 21 | ], 22 | "defaultName": "_ViewStart", 23 | "symbols": { 24 | "HostIdentifier": { 25 | "type": "bind", 26 | "binding": "HostIdentifier" 27 | } 28 | }, 29 | "postActions": [ 30 | { 31 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 32 | "description": "Opens _ViewStart.cshtml in the editor", 33 | "manualInstructions": [ ], 34 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 35 | "args": { 36 | "files": "0" 37 | }, 38 | "continueOnError": true 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ItemTemplates/content/ViewStart/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is generated by the build 2 | content/*/*.*proj 3 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | True 6 | InProcess 7 | Company.WebApplication1 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | True 6 | InProcess 7 | Company.WebApplication1 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/RazorClassLibrary-CSharp.csproj.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0 5 | Company.RazorClassLibrary1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | true 6 | True 7 | InProcess 8 | Company.WebApplication1 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-CSharp.csproj.in: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502 6 | 0 7 | 1 8 | True 9 | InProcess 10 | Company.WebApplication1 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/WebApi-FSharp.fsproj.in: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | True 6 | InProcess 7 | Company.WebApplication1 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "Framework": { 5 | "longName": "framework" 6 | }, 7 | "skipRestore": { 8 | "longName": "no-restore", 9 | "shortName": "" 10 | }, 11 | "HttpPort": { 12 | "isHidden": true 13 | }, 14 | "HttpsPort": { 15 | "isHidden": true 16 | }, 17 | "ExcludeLaunchSettings": { 18 | "longName": "exclude-launch-settings", 19 | "shortName": "" 20 | }, 21 | "NoHttps": { 22 | "longName": "no-https", 23 | "shortName": "" 24 | } 25 | }, 26 | "usageExamples": [ 27 | "" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "Empty", 5 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 6 | "id": "1011" 7 | }, 8 | "description": { 9 | "text": "An empty project template for creating an ASP.NET Core application. This template does not have any content in it.", 10 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 11 | "id": "1012" 12 | }, 13 | "order": 100, 14 | "icon": "vs-2017.3/Empty.png", 15 | "learnMoreLink": "https://go.microsoft.com/fwlink/?LinkID=784883", 16 | "uiFilters": [ "oneaspnet" ], 17 | "supportsDocker": true, 18 | "legacyTemplateIdentity": "Microsoft.NetCore.CSharp.EmptyWeb", 19 | "supportedAuthentications": [ 20 | { 21 | "auth": "None", 22 | "authenticationType": "NoAuth", 23 | "allowUnsecured": true 24 | } 25 | ], 26 | "ports": [ 27 | { 28 | "name": "HttpPort", 29 | "useHttps": false 30 | }, 31 | { 32 | "name": "HttpsPort", 33 | "useHttps": true 34 | } 35 | ], 36 | "excludeLaunchSettings": false, 37 | "minFullFrameworkVersion": "4.6.1", 38 | "disableHttpsSymbol": "NoHttps" 39 | } 40 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/vs-2017.3/Empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/vs-2017.3/Empty.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace Company.WebApplication1 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | //#if (WindowsAuth) 4 | "windowsAuthentication": true, 5 | "anonymousAuthentication": false, 6 | //#else 7 | "windowsAuthentication": false, 8 | "anonymousAuthentication": true, 9 | //#endif 10 | "iisExpress": { 11 | "applicationUrl": "http://localhost:8080", 12 | //#if(NoHttps) 13 | "sslPort": 0 14 | //#else 15 | "sslPort": 44300 16 | //#endif 17 | } 18 | }, 19 | "profiles": { 20 | "IIS Express": { 21 | "commandName": "IISExpress", 22 | "launchBrowser": true, 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | }, 27 | "Company.WebApplication1": { 28 | "commandName": "Project", 29 | "launchBrowser": true, 30 | //#if(NoHttps) 31 | "applicationUrl": "http://localhost:5000", 32 | //#else 33 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 34 | //#endif 35 | "environmentVariables": { 36 | "ASPNETCORE_ENVIRONMENT": "Development" 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.AspNetCore.Http; 8 | using Microsoft.Extensions.DependencyInjection; 9 | 10 | namespace Company.WebApplication1 11 | { 12 | public class Startup 13 | { 14 | // This method gets called by the runtime. Use this method to add services to the container. 15 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 16 | public void ConfigureServices(IServiceCollection services) 17 | { 18 | } 19 | 20 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 21 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 22 | { 23 | if (env.IsDevelopment()) 24 | { 25 | app.UseDeveloperExceptionPage(); 26 | } 27 | 28 | app.Run(async (context) => 29 | { 30 | await context.Response.WriteAsync("Hello World!"); 31 | }); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "Framework": { 5 | "longName": "framework" 6 | }, 7 | "skipRestore": { 8 | "longName": "no-restore", 9 | "shortName": "" 10 | }, 11 | "HttpPort": { 12 | "isHidden": true 13 | }, 14 | "HttpsPort": { 15 | "isHidden": true 16 | }, 17 | "ExcludeLaunchSettings": { 18 | "longName": "exclude-launch-settings", 19 | "shortName": "" 20 | }, 21 | "NoHttps": { 22 | "longName": "no-https", 23 | "shortName": "" 24 | } 25 | }, 26 | "usageExamples": [ 27 | "" 28 | ] 29 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "Empty", 5 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 6 | "id": "1011" 7 | }, 8 | "description": { 9 | "text": "An empty project template for creating an ASP.NET Core application. This template does not have any content in it.", 10 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 11 | "id": "1012" 12 | }, 13 | "order": 100, 14 | "icon": "vs-2017.3/Empty.png", 15 | "learnMoreLink": "https://go.microsoft.com/fwlink/?LinkID=784883", 16 | "uiFilters": [ "oneaspnet" ], 17 | "supportedAuthentications": [ 18 | { 19 | "auth": "None", 20 | "authenticationType": "NoAuth", 21 | "allowUnsecured": true 22 | } 23 | ], 24 | "supportsDocker": true, 25 | "ports": [ 26 | { 27 | "name": "HttpPort", 28 | "useHttps": false 29 | }, 30 | { 31 | "name": "HttpsPort", 32 | "useHttps": true 33 | } 34 | ], 35 | "minFullFrameworkVersion": "4.6.1", 36 | "disableHttpsSymbol": "NoHttps" 37 | } 38 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/.template.config/vs-2017.3/Empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/.template.config/vs-2017.3/Empty.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/Program.fs: -------------------------------------------------------------------------------- 1 | namespace Company.WebApplication1 2 | 3 | open System 4 | open System.Collections.Generic 5 | open System.IO 6 | open System.Linq 7 | open System.Threading.Tasks 8 | open Microsoft.AspNetCore 9 | open Microsoft.AspNetCore.Hosting 10 | open Microsoft.Extensions.Configuration 11 | open Microsoft.Extensions.Logging 12 | 13 | module Program = 14 | let exitCode = 0 15 | 16 | let CreateWebHostBuilder args = 17 | WebHost 18 | .CreateDefaultBuilder(args) 19 | .UseStartup(); 20 | 21 | [] 22 | let main args = 23 | CreateWebHostBuilder(args).Build().Run() 24 | 25 | exitCode 26 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:8080", 7 | //#if(NoHttps) 8 | "sslPort": 0 9 | //#else 10 | "sslPort": 44300 11 | //#endif 12 | } 13 | }, 14 | "profiles": { 15 | "IIS Express": { 16 | "commandName": "IISExpress", 17 | "launchBrowser": true, 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "Company.WebApplication1": { 23 | "commandName": "Project", 24 | "launchBrowser": true, 25 | //#if(NoHttps) 26 | "applicationUrl": "http://localhost:5000", 27 | //#else 28 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 29 | //#endif 30 | "environmentVariables": { 31 | "ASPNETCORE_ENVIRONMENT": "Development" 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/Startup.fs: -------------------------------------------------------------------------------- 1 | namespace Company.WebApplication1 2 | 3 | open System 4 | open Microsoft.AspNetCore.Builder 5 | open Microsoft.AspNetCore.Hosting 6 | open Microsoft.AspNetCore.Http 7 | open Microsoft.Extensions.DependencyInjection 8 | 9 | type Startup() = 10 | 11 | // This method gets called by the runtime. Use this method to add services to the container. 12 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 13 | member this.ConfigureServices(services: IServiceCollection) = 14 | () 15 | 16 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 17 | member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) = 18 | if env.IsDevelopment() then 19 | app.UseDeveloperExceptionPage() |> ignore 20 | 21 | app.Run(fun context -> context.Response.WriteAsync("Hello World!")) |> ignore -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-FSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "Framework": { 5 | "longName": "framework", 6 | "isHidden": true 7 | }, 8 | "skipRestore": { 9 | "longName": "no-restore", 10 | "shortName": "" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "Razor Class Library", 5 | "id": "1023", 6 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}" 7 | }, 8 | "description": { 9 | "text": "A project template for creating a Razor class library.", 10 | "id": "1024", 11 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}" 12 | }, 13 | "order": 305, 14 | "icon": "vs-2017.3/RazorClassLibrary.ico", 15 | "learnMoreLink": "https://go.microsoft.com/fwlink/?linkid=872103" 16 | } 17 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3/RazorClassLibrary.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/vs-2017.3/RazorClassLibrary.ico -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model Company.RazorClassLibrary1.MyFeature.Pages.Page1Model 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page1 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorClassLibrary-CSharp/Areas/MyFeature/Pages/Page1.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace Company.RazorClassLibrary1.MyFeature.Pages 9 | { 10 | public class Page1Model : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/vs-2017.3/WebApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/vs-2017.3/WebApplication.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Pages/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 5 | using Microsoft.EntityFrameworkCore; 6 | 7 | namespace Company.WebApplication1.Data 8 | { 9 | public class ApplicationDbContext : IdentityDbContext 10 | { 11 | public ApplicationDbContext(DbContextOptions options) 12 | : base(options) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | 9 | namespace Company.WebApplication1.Pages 10 | { 11 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 12 | public class ErrorModel : PageModel 13 | { 14 | public string RequestId { get; set; } 15 | 16 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 17 | 18 | public void OnGet() 19 | { 20 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Home page"; 5 | } 6 | 7 |
8 |

Welcome

9 |

Learn about building Web apps with ASP.NET Core.

10 |
11 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace Company.WebApplication1.Pages 9 | { 10 | public class IndexModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

@ViewData["Title"]

7 | 8 |

Use this page to detail your site's privacy policy.

9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace Company.WebApplication1.Pages 9 | { 10 | public class PrivacyModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Shared/_CookieConsentPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Http.Features 2 | 3 | @{ 4 | var consentFeature = Context.Features.Get(); 5 | var showBanner = !consentFeature?.CanTrack ?? false; 6 | var cookieString = consentFeature?.CreateConsentCookie(); 7 | } 8 | 9 | @if (showBanner) 10 | { 11 | 17 | 25 | } 26 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Shared/_LoginPartial.Identity.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | 5 | 27 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @*#if (IndividualLocalAuth) 2 | @using Microsoft.AspNetCore.Identity 3 | #endif*@ 4 | @using Company.WebApplication1 5 | @*#if (IndividualLocalAuth) 6 | @using Company.WebApplication1.Data 7 | #endif*@ 8 | @namespace Company.WebApplication1.Pages 9 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace Company.WebApplication1 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | //#if (WindowsAuth) 4 | "windowsAuthentication": true, 5 | "anonymousAuthentication": false, 6 | //#else 7 | "windowsAuthentication": false, 8 | "anonymousAuthentication": true, 9 | //#endif 10 | "iisExpress": { 11 | "applicationUrl": "http://localhost:8080", 12 | //#if(RequiresHttps) 13 | "sslPort": 44300 14 | //#else 15 | "sslPort": 0 16 | //#endif 17 | } 18 | }, 19 | "profiles": { 20 | "IIS Express": { 21 | "commandName": "IISExpress", 22 | "launchBrowser": true, 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | }, 27 | "Company.WebApplication1": { 28 | "commandName": "Project", 29 | "launchBrowser": true, 30 | //#if(RequiresHttps) 31 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 32 | //#else 33 | "applicationUrl": "http://localhost:5000", 34 | //#endif 35 | "environmentVariables": { 36 | "ASPNETCORE_ENVIRONMENT": "Development" 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/app.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/app.db -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | ////#if (IndividualB2CAuth) 3 | // "AzureAdB2C": { 4 | // "Instance": "https:////login.microsoftonline.com/tfp/", 5 | // "ClientId": "11111111-1111-1111-11111111111111111", 6 | // "CallbackPath": "/signin-oidc", 7 | // "Domain": "qualified.domain.name", 8 | // "SignUpSignInPolicyId": "MySignUpSignInPolicyId", 9 | // "ResetPasswordPolicyId": "MyResetPasswordPolicyId", 10 | // "EditProfilePolicyId": "MyEditProfilePolicyId" 11 | // }, 12 | ////#elseif (OrganizationalAuth) 13 | // "AzureAd": { 14 | //#if (MultiOrgAuth) 15 | // "Instance": "https:////login.microsoftonline.com/common", 16 | //#elseif (SingleOrgAuth) 17 | // "Instance": "https:////login.microsoftonline.com/", 18 | // "Domain": "qualified.domain.name", 19 | // "TenantId": "22222222-2222-2222-2222-222222222222", 20 | //#endif 21 | // "ClientId": "11111111-1111-1111-11111111111111111", 22 | // "CallbackPath": "/signin-oidc" 23 | // }, 24 | //#endif 25 | ////#if (IndividualLocalAuth) 26 | // "ConnectionStrings": { 27 | ////#if (UseLocalDB) 28 | // "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true" 29 | ////#else 30 | // "DefaultConnection": "DataSource=app.db" 31 | //#endif 32 | // }, 33 | //#endif 34 | "Logging": { 35 | "LogLevel": { 36 | "Default": "Warning" 37 | } 38 | }, 39 | "AllowedHosts": "*" 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | /* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | for details on configuring this project to bundle and minify static web assets. */ 3 | 4 | a.navbar-brand { 5 | white-space: normal; 6 | text-align: center; 7 | word-break: break-all; 8 | } 9 | 10 | /* Sticky footer styles 11 | -------------------------------------------------- */ 12 | html { 13 | font-size: 14px; 14 | } 15 | @media (min-width: 768px) { 16 | html { 17 | font-size: 16px; 18 | } 19 | } 20 | 21 | .border-top { 22 | border-top: 1px solid #e5e5e5; 23 | } 24 | .border-bottom { 25 | border-bottom: 1px solid #e5e5e5; 26 | } 27 | 28 | .box-shadow { 29 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 30 | } 31 | 32 | button.accept-policy { 33 | font-size: 1rem; 34 | line-height: inherit; 35 | } 36 | 37 | /* Sticky footer styles 38 | -------------------------------------------------- */ 39 | html { 40 | position: relative; 41 | min-height: 100%; 42 | } 43 | 44 | body { 45 | /* Margin bottom by footer height */ 46 | margin-bottom: 60px; 47 | } 48 | .footer { 49 | position: absolute; 50 | bottom: 0; 51 | width: 100%; 52 | white-space: nowrap; 53 | /* Set the fixed height of the footer here */ 54 | height: 60px; 55 | line-height: 60px; /* Vertically center the text there */ 56 | } 57 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/vs-2017.3/WebApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/vs-2017.3/WebApplication.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | #if (OrganizationalAuth) 7 | using Microsoft.AspNetCore.Authorization; 8 | #endif 9 | using Microsoft.AspNetCore.Mvc; 10 | using Company.WebApplication1.Models; 11 | 12 | namespace Company.WebApplication1.Controllers 13 | { 14 | #if (OrganizationalAuth) 15 | [Authorize] 16 | #endif 17 | public class HomeController : Controller 18 | { 19 | public IActionResult Index() 20 | { 21 | return View(); 22 | } 23 | 24 | public IActionResult Privacy() 25 | { 26 | return View(); 27 | } 28 | 29 | #if (OrganizationalAuth) 30 | [AllowAnonymous] 31 | #endif 32 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 33 | public IActionResult Error() 34 | { 35 | return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 5 | using Microsoft.EntityFrameworkCore; 6 | 7 | namespace Company.WebApplication1.Data 8 | { 9 | public class ApplicationDbContext : IdentityDbContext 10 | { 11 | public ApplicationDbContext(DbContextOptions options) 12 | : base(options) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Company.WebApplication1.Models 4 | { 5 | public class ErrorViewModel 6 | { 7 | public string RequestId { get; set; } 8 | 9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 10 | } 11 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace Company.WebApplication1 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | //#if (WindowsAuth) 4 | "windowsAuthentication": true, 5 | "anonymousAuthentication": false, 6 | //#else 7 | "windowsAuthentication": false, 8 | "anonymousAuthentication": true, 9 | //#endif 10 | "iisExpress": { 11 | "applicationUrl": "http://localhost:8080", 12 | //#if(RequiresHttps) 13 | "sslPort": 44300 14 | //#else 15 | "sslPort": 0 16 | //#endif 17 | } 18 | }, 19 | "profiles": { 20 | "IIS Express": { 21 | "commandName": "IISExpress", 22 | "launchBrowser": true, 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | }, 27 | "Company.WebApplication1": { 28 | "commandName": "Project", 29 | "launchBrowser": true, 30 | //#if(RequiresHttps) 31 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 32 | //#else 33 | "applicationUrl": "http://localhost:5000", 34 | //#endif 35 | "environmentVariables": { 36 | "ASPNETCORE_ENVIRONMENT": "Development" 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |
6 |

Welcome

7 |

Learn about building Web apps with ASP.NET Core.

8 |
9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/_CookieConsentPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Http.Features 2 | 3 | @{ 4 | var consentFeature = Context.Features.Get(); 5 | var showBanner = !consentFeature?.CanTrack ?? false; 6 | var cookieString = consentFeature?.CreateConsentCookie(); 7 | } 8 | 9 | @if (showBanner) 10 | { 11 | 17 | 25 | } 26 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/_LoginPartial.Identity.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | 5 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Company.WebApplication1 2 | @using Company.WebApplication1.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/app.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/app.db -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | ////#if (IndividualB2CAuth) 3 | // "AzureAdB2C": { 4 | // "Instance": "https:////login.microsoftonline.com/tfp/", 5 | // "ClientId": "11111111-1111-1111-11111111111111111", 6 | // "CallbackPath": "/signin-oidc", 7 | // "Domain": "qualified.domain.name", 8 | // "SignUpSignInPolicyId": "MySignUpSignInPolicyId", 9 | // "ResetPasswordPolicyId": "MyResetPasswordPolicyId", 10 | // "EditProfilePolicyId": "MyEditProfilePolicyId" 11 | // }, 12 | ////#elseif (OrganizationalAuth) 13 | // "AzureAd": { 14 | //#if (MultiOrgAuth) 15 | // "Instance": "https:////login.microsoftonline.com/common", 16 | //#elseif (SingleOrgAuth) 17 | // "Instance": "https:////login.microsoftonline.com/", 18 | // "Domain": "qualified.domain.name", 19 | // "TenantId": "22222222-2222-2222-2222-222222222222", 20 | //#endif 21 | // "ClientId": "11111111-1111-1111-11111111111111111", 22 | // "CallbackPath": "/signin-oidc" 23 | // }, 24 | //#endif 25 | ////#if (IndividualLocalAuth) 26 | // "ConnectionStrings": { 27 | ////#if (UseLocalDB) 28 | // "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true" 29 | ////#else 30 | // "DefaultConnection": "DataSource=app.db" 31 | //#endif 32 | // }, 33 | //#endif 34 | "Logging": { 35 | "LogLevel": { 36 | "Default": "Warning" 37 | } 38 | }, 39 | "AllowedHosts": "*" 40 | } 41 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | /* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | for details on configuring this project to bundle and minify static web assets. */ 3 | 4 | a.navbar-brand { 5 | white-space: normal; 6 | text-align: center; 7 | word-break: break-all; 8 | } 9 | 10 | /* Sticky footer styles 11 | -------------------------------------------------- */ 12 | html { 13 | font-size: 14px; 14 | } 15 | @media (min-width: 768px) { 16 | html { 17 | font-size: 16px; 18 | } 19 | } 20 | 21 | .border-top { 22 | border-top: 1px solid #e5e5e5; 23 | } 24 | .border-bottom { 25 | border-bottom: 1px solid #e5e5e5; 26 | } 27 | 28 | .box-shadow { 29 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 30 | } 31 | 32 | button.accept-policy { 33 | font-size: 1rem; 34 | line-height: inherit; 35 | } 36 | 37 | /* Sticky footer styles 38 | -------------------------------------------------- */ 39 | html { 40 | position: relative; 41 | min-height: 100%; 42 | } 43 | 44 | body { 45 | /* Margin bottom by footer height */ 46 | margin-bottom: 60px; 47 | } 48 | .footer { 49 | position: absolute; 50 | bottom: 0; 51 | width: 100%; 52 | white-space: nowrap; 53 | /* Set the fixed height of the footer here */ 54 | height: 60px; 55 | line-height: 60px; /* Vertically center the text there */ 56 | } 57 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "HttpPort": { 5 | "isHidden": true 6 | }, 7 | "HttpsPort": { 8 | "isHidden": true 9 | }, 10 | "ExcludeLaunchSettings": { 11 | "longName": "exclude-launch-settings", 12 | "shortName": "" 13 | }, 14 | "Framework": { 15 | "longName": "framework" 16 | }, 17 | "skipRestore": { 18 | "longName": "no-restore", 19 | "shortName": "" 20 | }, 21 | "NoHttps": { 22 | "longName": "no-https", 23 | "shortName": "" 24 | } 25 | }, 26 | "usageExamples": [ 27 | "" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Controllers/HomeController.fs: -------------------------------------------------------------------------------- 1 | namespace Company.WebApplication1.Controllers 2 | 3 | open System 4 | open System.Collections.Generic 5 | open System.Linq 6 | open System.Threading.Tasks 7 | open Microsoft.AspNetCore.Mvc 8 | 9 | type HomeController () = 10 | inherit Controller() 11 | 12 | member this.Index () = 13 | this.View() 14 | 15 | member this.Privacy () = 16 | this.View() 17 | 18 | member this.Error () = 19 | this.View(); 20 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Models/ErrorViewModel.fs: -------------------------------------------------------------------------------- 1 | namespace Company.WebApplication1 2 | 3 | open System 4 | 5 | type ErrorViewModel private () = 6 | member val RequestId : string = null with get, set 7 | 8 | member val ShowRequestId : bool = true with get, set 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Program.fs: -------------------------------------------------------------------------------- 1 | namespace Company.WebApplication1 2 | 3 | open System 4 | open System.Collections.Generic 5 | open System.IO 6 | open System.Linq 7 | open System.Threading.Tasks 8 | open Microsoft.AspNetCore 9 | open Microsoft.AspNetCore.Hosting 10 | open Microsoft.Extensions.Configuration 11 | open Microsoft.Extensions.Logging 12 | 13 | module Program = 14 | let exitCode = 0 15 | 16 | let CreateWebHostBuilder args = 17 | WebHost 18 | .CreateDefaultBuilder(args) 19 | .UseStartup(); 20 | 21 | [] 22 | let main args = 23 | CreateWebHostBuilder(args).Build().Run() 24 | 25 | exitCode 26 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | //#if (WindowsAuth) 4 | "windowsAuthentication": true, 5 | "anonymousAuthentication": false, 6 | //#else 7 | "windowsAuthentication": false, 8 | "anonymousAuthentication": true, 9 | //#endif 10 | "iisExpress": { 11 | "applicationUrl": "http://localhost:8080", 12 | //#if(NoHttps) 13 | "sslPort": 0 14 | //#else 15 | "sslPort": 44300 16 | //#endif 17 | } 18 | }, 19 | "profiles": { 20 | "IIS Express": { 21 | "commandName": "IISExpress", 22 | "launchBrowser": true, 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | }, 27 | "Company.WebApplication1": { 28 | "commandName": "Project", 29 | "launchBrowser": true, 30 | //#if(NoHttps) 31 | "applicationUrl": "http://localhost:5000", 32 | //#else 33 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 34 | //#endif 35 | "environmentVariables": { 36 | "ASPNETCORE_ENVIRONMENT": "Development" 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |
6 |

Welcome

7 |

Learn about building Web apps with ASP.NET Core.

8 |
9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Views/Shared/_CookieConsentPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Http.Features 2 | 3 | @{ 4 | var consentFeature = Context.Features.Get(); 5 | var showBanner = !consentFeature?.CanTrack ?? false; 6 | var cookieString = consentFeature?.CreateConsentCookie(); 7 | } 8 | 9 | @if (showBanner) 10 | { 11 | 17 | 25 | } 26 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Company.WebApplication1 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | /* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | for details on configuring this project to bundle and minify static web assets. */ 3 | 4 | a.navbar-brand { 5 | white-space: normal; 6 | text-align: center; 7 | word-break: break-all; 8 | } 9 | 10 | /* Sticky footer styles 11 | -------------------------------------------------- */ 12 | html { 13 | font-size: 14px; 14 | } 15 | @media (min-width: 768px) { 16 | html { 17 | font-size: 16px; 18 | } 19 | } 20 | 21 | .border-top { 22 | border-top: 1px solid #e5e5e5; 23 | } 24 | .border-bottom { 25 | border-bottom: 1px solid #e5e5e5; 26 | } 27 | 28 | .box-shadow { 29 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 30 | } 31 | 32 | button.accept-policy { 33 | font-size: 1rem; 34 | line-height: inherit; 35 | } 36 | 37 | /* Sticky footer styles 38 | -------------------------------------------------- */ 39 | html { 40 | position: relative; 41 | min-height: 100%; 42 | } 43 | 44 | body { 45 | /* Margin bottom by footer height */ 46 | margin-bottom: 60px; 47 | } 48 | .footer { 49 | position: absolute; 50 | bottom: 0; 51 | width: 100%; 52 | white-space: nowrap; 53 | /* Set the fixed height of the footer here */ 54 | height: 60px; 55 | line-height: 60px; /* Vertically center the text there */ 56 | } 57 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "UseLocalDB": { 5 | "longName": "use-local-db" 6 | }, 7 | "AADInstance": { 8 | "longName": "aad-instance", 9 | "shortName": "" 10 | }, 11 | "AAdB2CInstance": { 12 | "longName": "aad-b2c-instance", 13 | "shortName": "" 14 | }, 15 | "SignUpSignInPolicyId": { 16 | "longName": "susi-policy-id", 17 | "shortName": "ssp" 18 | }, 19 | "OrgReadAccess": { 20 | "longName": "org-read-access", 21 | "shortName": "r" 22 | }, 23 | "ClientId": { 24 | "longName": "client-id", 25 | "shortName": "" 26 | }, 27 | "Domain": { 28 | "longName": "domain", 29 | "shortName": "" 30 | }, 31 | "TenantId": { 32 | "longName": "tenant-id", 33 | "shortName": "" 34 | }, 35 | "Framework": { 36 | "longName": "framework" 37 | }, 38 | "skipRestore": { 39 | "longName": "no-restore", 40 | "shortName": "" 41 | }, 42 | "HttpPort": { 43 | "isHidden": true 44 | }, 45 | "HttpsPort": { 46 | "isHidden": true 47 | }, 48 | "ExcludeLaunchSettings": { 49 | "longName": "exclude-launch-settings", 50 | "shortName": "" 51 | }, 52 | "UserSecretsId": { 53 | "isHidden": true 54 | }, 55 | "NoHttps": { 56 | "longName": "no-https", 57 | "shortName": "" 58 | } 59 | }, 60 | "usageExamples": [ 61 | "" 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/.template.config/vs-2017.3/WebAPI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/.template.config/vs-2017.3/WebAPI.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace Company.WebApplication1 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | //#if (WindowsAuth) 5 | "windowsAuthentication": true, 6 | "anonymousAuthentication": false, 7 | //#else 8 | "windowsAuthentication": false, 9 | "anonymousAuthentication": true, 10 | //#endif 11 | "iisExpress": { 12 | "applicationUrl": "http://localhost:8080", 13 | //#if(RequiresHttps) 14 | "sslPort": 44300 15 | //#else 16 | "sslPort": 0 17 | //#endif 18 | } 19 | }, 20 | "profiles": { 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "launchUrl": "api/values", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "Company.WebApplication1": { 30 | "commandName": "Project", 31 | "launchBrowser": true, 32 | "launchUrl": "api/values", 33 | //#if(RequiresHttps) 34 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 35 | //#else 36 | "applicationUrl": "http://localhost:5000", 37 | //#endif 38 | "environmentVariables": { 39 | "ASPNETCORE_ENVIRONMENT": "Development" 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-CSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | ////#if (IndividualB2CAuth) 3 | // "AzureAdB2C": { 4 | // "Instance": "https:////login.microsoftonline.com/tfp/", 5 | // "ClientId": "11111111-1111-1111-11111111111111111", 6 | // "Domain": "qualified.domain.name", 7 | // "SignUpSignInPolicyId": "MySignUpSignInPolicyId" 8 | // }, 9 | ////#elseif (OrganizationalAuth) 10 | // "AzureAd": { 11 | //#if (!SingleOrgAuth) 12 | // "Instance": "https:////login.microsoftonline.com/common", 13 | //#else 14 | // "Instance": "https:////login.microsoftonline.com/", 15 | // "Domain": "qualified.domain.name", 16 | // "TenantId": "22222222-2222-2222-2222-222222222222", 17 | //#endif 18 | // "ClientId": "11111111-1111-1111-11111111111111111" 19 | // }, 20 | //#endif 21 | "Logging": { 22 | "LogLevel": { 23 | "Default": "Warning" 24 | } 25 | }, 26 | "AllowedHosts": "*" 27 | } 28 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "HttpPort": { 5 | "isHidden": true 6 | }, 7 | "HttpsPort": { 8 | "isHidden": true 9 | }, 10 | "ExcludeLaunchSettings": { 11 | "longName": "exclude-launch-settings", 12 | "shortName": "" 13 | }, 14 | "Framework": { 15 | "longName": "framework" 16 | }, 17 | "skipRestore": { 18 | "longName": "no-restore", 19 | "shortName": "" 20 | }, 21 | "NoHttps": { 22 | "longName": "no-https", 23 | "shortName": "" 24 | } 25 | }, 26 | "usageExamples": [ 27 | "" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "API", 5 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 6 | "id": "1013" 7 | }, 8 | "description": { 9 | "text": "A project template for creating an ASP.NET Core application with an example Controller for a RESTful HTTP service. This template can also be used for ASP.NET Core MVC Views and Controllers.", 10 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 11 | "id": "1014" 12 | }, 13 | "order": 200, 14 | "icon": "vs-2017.3/WebAPI.png", 15 | "learnMoreLink": "https://go.microsoft.com/fwlink/?LinkID=784882", 16 | "uiFilters": [ "oneaspnet" ], 17 | "supportsDocker": true, 18 | "isApi": true, 19 | "supportedAuthentications": [ 20 | { 21 | "auth": "None", 22 | "authenticationType": "NoAuth", 23 | "allowUnsecured": true 24 | } 25 | ], 26 | "ports": [ 27 | { 28 | "name": "HttpPort", 29 | "useHttps": false 30 | }, 31 | { 32 | "name": "HttpsPort", 33 | "useHttps": true 34 | } 35 | ], 36 | "azureReplyUrlPortName": "HttpsPort", 37 | "minFullFrameworkVersion": "4.6.1", 38 | "disableHttpsSymbol": "NoHttps" 39 | } 40 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/.template.config/vs-2017.3/WebAPI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/.template.config/vs-2017.3/WebAPI.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Controllers/ValuesController.fs: -------------------------------------------------------------------------------- 1 | namespace Company.WebApplication1.Controllers 2 | 3 | open System 4 | open System.Collections.Generic 5 | open System.Linq 6 | open System.Threading.Tasks 7 | open Microsoft.AspNetCore.Mvc 8 | 9 | [] 10 | [] 11 | type ValuesController () = 12 | inherit ControllerBase() 13 | 14 | [] 15 | member this.Get() = 16 | let values = [|"value1"; "value2"|] 17 | ActionResult(values) 18 | 19 | [] 20 | member this.Get(id:int) = 21 | let value = "value" 22 | ActionResult(value) 23 | 24 | [] 25 | member this.Post([] value:string) = 26 | () 27 | 28 | [] 29 | member this.Put(id:int, [] value:string ) = 30 | () 31 | 32 | [] 33 | member this.Delete(id:int) = 34 | () 35 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Program.fs: -------------------------------------------------------------------------------- 1 | namespace Company.WebApplication1 2 | 3 | open System 4 | open System.Collections.Generic 5 | open System.IO 6 | open System.Linq 7 | open System.Threading.Tasks 8 | open Microsoft.AspNetCore 9 | open Microsoft.AspNetCore.Hosting 10 | open Microsoft.Extensions.Configuration 11 | open Microsoft.Extensions.Logging 12 | 13 | module Program = 14 | let exitCode = 0 15 | 16 | let CreateWebHostBuilder args = 17 | WebHost 18 | .CreateDefaultBuilder(args) 19 | .UseStartup(); 20 | 21 | [] 22 | let main args = 23 | CreateWebHostBuilder(args).Build().Run() 24 | 25 | exitCode 26 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | //#if (WindowsAuth) 5 | "windowsAuthentication": true, 6 | "anonymousAuthentication": false, 7 | //#else 8 | "windowsAuthentication": false, 9 | "anonymousAuthentication": true, 10 | //#endif 11 | "iisExpress": { 12 | "applicationUrl": "http://localhost:8080", 13 | //#if(NoHttps) 14 | "sslPort": 0 15 | //#else 16 | "sslPort": 44300 17 | //#endif 18 | } 19 | }, 20 | "profiles": { 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "launchUrl": "api/values", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "Company.WebApplication1": { 30 | "commandName": "Project", 31 | "launchBrowser": true, 32 | "launchUrl": "api/values", 33 | //#if(NoHttps) 34 | "applicationUrl": "http://localhost:5000", 35 | //#else 36 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 37 | //#endif 38 | "environmentVariables": { 39 | "ASPNETCORE_ENVIRONMENT": "Development" 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/Startup.fs: -------------------------------------------------------------------------------- 1 | namespace Company.WebApplication1 2 | 3 | open System 4 | open System.Collections.Generic 5 | open System.Linq 6 | open System.Threading.Tasks 7 | open Microsoft.AspNetCore.Builder 8 | open Microsoft.AspNetCore.Hosting 9 | #if (!NoHttps) 10 | open Microsoft.AspNetCore.HttpsPolicy; 11 | #endif 12 | open Microsoft.AspNetCore.Mvc 13 | open Microsoft.Extensions.Configuration 14 | open Microsoft.Extensions.DependencyInjection 15 | 16 | type Startup private () = 17 | new (configuration: IConfiguration) as this = 18 | Startup() then 19 | this.Configuration <- configuration 20 | 21 | // This method gets called by the runtime. Use this method to add services to the container. 22 | member this.ConfigureServices(services: IServiceCollection) = 23 | // Add framework services. 24 | services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2) |> ignore 25 | 26 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 27 | member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) = 28 | if (env.IsDevelopment()) then 29 | app.UseDeveloperExceptionPage() |> ignore 30 | #if (!NoHttps) 31 | else 32 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 33 | app.UseHsts() |> ignore 34 | 35 | app.UseHttpsRedirection() |> ignore 36 | #else 37 | 38 | #endif 39 | app.UseMvc() |> ignore 40 | 41 | member val Configuration : IConfiguration = null with get, set 42 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.ProjectTemplates/content/WebApi-FSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is generated by the build 2 | content/*/*.*proj 3 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "Framework": { 5 | "longName": "framework" 6 | }, 7 | "skipRestore": { 8 | "longName": "no-restore", 9 | "shortName": "" 10 | }, 11 | "HttpPort": { 12 | "isHidden": true 13 | }, 14 | "HttpsPort": { 15 | "isHidden": true 16 | }, 17 | "ExcludeLaunchSettings": { 18 | "longName": "exclude-launch-settings", 19 | "shortName": "" 20 | }, 21 | "NoHttps": { 22 | "longName": "no-https", 23 | "shortName": "" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/.template.config/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/.template.config/icon.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "Angular", 5 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 6 | "id": "1100" 7 | }, 8 | "description": { 9 | "text": "A project template for creating an ASP.NET Core application with Angular", 10 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 11 | "id": "1101" 12 | }, 13 | "order": 310, 14 | "icon": "icon.png", 15 | "learnMoreLink": "https://github.com/aspnet/JavaScriptServices", 16 | "uiFilters": [ 17 | "oneaspnet" 18 | ], 19 | "supportedAuthentications": [ 20 | { 21 | "auth": "None", 22 | "authenticationType": "NoAuth", 23 | "allowUnsecured": true 24 | } 25 | ], 26 | "ports": [ 27 | { 28 | "name": "HttpPort", 29 | "useHttps": false 30 | }, 31 | { 32 | "name": "HttpsPort", 33 | "useHttps": true 34 | } 35 | ], 36 | "excludeLaunchSettings": false, 37 | "minFullFrameworkVersion": "4.6.1", 38 | "disableHttpsSymbol": "NoHttps" 39 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # System Files 39 | .DS_Store 40 | Thumbs.db 41 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/README.md: -------------------------------------------------------------------------------- 1 | # Company.WebApplication1 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getMainHeading()).toEqual('Hello, world!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | @media (max-width: 767px) { 2 | /* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */ 3 | .body-content { 4 | padding-top: 50px; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { HttpClientModule } from '@angular/common/http'; 5 | import { RouterModule } from '@angular/router'; 6 | 7 | import { AppComponent } from './app.component'; 8 | import { NavMenuComponent } from './nav-menu/nav-menu.component'; 9 | import { HomeComponent } from './home/home.component'; 10 | import { CounterComponent } from './counter/counter.component'; 11 | import { FetchDataComponent } from './fetch-data/fetch-data.component'; 12 | 13 | @NgModule({ 14 | declarations: [ 15 | AppComponent, 16 | NavMenuComponent, 17 | HomeComponent, 18 | CounterComponent, 19 | FetchDataComponent 20 | ], 21 | imports: [ 22 | BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }), 23 | HttpClientModule, 24 | FormsModule, 25 | RouterModule.forRoot([ 26 | { path: '', component: HomeComponent, pathMatch: 'full' }, 27 | { path: 'counter', component: CounterComponent }, 28 | { path: 'fetch-data', component: FetchDataComponent }, 29 | ]) 30 | ], 31 | providers: [], 32 | bootstrap: [AppComponent] 33 | }) 34 | export class AppModule { } 35 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/app.server.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ServerModule } from '@angular/platform-server'; 3 | import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader'; 4 | import { AppComponent } from './app.component'; 5 | import { AppModule } from './app.module'; 6 | 7 | @NgModule({ 8 | imports: [AppModule, ServerModule, ModuleMapLoaderModule], 9 | bootstrap: [AppComponent] 10 | }) 11 | export class AppServerModule { } 12 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/counter/counter.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CounterComponent } from './counter.component'; 4 | 5 | describe('CounterComponent', () => { 6 | let component: CounterComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CounterComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CounterComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should display a title', async(() => { 23 | const titleText = fixture.nativeElement.querySelector('h1').textContent; 24 | expect(titleText).toEqual('Counter'); 25 | })); 26 | 27 | it('should start with count 0, then increments by 1 when clicked', async(() => { 28 | const countElement = fixture.nativeElement.querySelector('strong'); 29 | expect(countElement.textContent).toEqual('0'); 30 | 31 | const incrementButton = fixture.nativeElement.querySelector('button'); 32 | incrementButton.click(); 33 | fixture.detectChanges(); 34 | expect(countElement.textContent).toEqual('1'); 35 | })); 36 | }); 37 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/counter/counter.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-counter-component', 5 | templateUrl: './counter.component.html' 6 | }) 7 | export class CounterComponent { 8 | public currentCount = 0; 9 | 10 | public incrementCounter() { 11 | this.currentCount++; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/fetch-data/fetch-data.component.html: -------------------------------------------------------------------------------- 1 |

Weather forecast

2 | 3 |

This component demonstrates fetching data from the server.

4 | 5 |

Loading...

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
DateTemp. (C)Temp. (F)Summary
{{ forecast.dateFormatted }}{{ forecast.temperatureC }}{{ forecast.temperatureF }}{{ forecast.summary }}
25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/fetch-data/fetch-data.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Inject } from '@angular/core'; 2 | import { HttpClient } from '@angular/common/http'; 3 | 4 | @Component({ 5 | selector: 'app-fetch-data', 6 | templateUrl: './fetch-data.component.html' 7 | }) 8 | export class FetchDataComponent { 9 | public forecasts: WeatherForecast[]; 10 | 11 | constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) { 12 | http.get(baseUrl + 'api/SampleData/WeatherForecasts').subscribe(result => { 13 | this.forecasts = result; 14 | }, error => console.error(error)); 15 | } 16 | } 17 | 18 | interface WeatherForecast { 19 | dateFormatted: string; 20 | temperatureC: number; 21 | temperatureF: number; 22 | summary: string; 23 | } 24 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/home/home.component.html: -------------------------------------------------------------------------------- 1 |

Hello, world!

2 |

Welcome to your new single-page application, built with:

3 | 8 |

To help you get started, we've also set up:

9 |
    10 |
  • Client-side navigation. For example, click Counter then Back to return here.
  • 11 |
  • Angular CLI integration. In development mode, there's no need to run ng serve. It runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.
  • 12 |
  • Efficient production builds. In production mode, development-time features are disabled, and your dotnet publish configuration automatically invokes ng build to produce minified, ahead-of-time compiled JavaScript files.
  • 13 |
14 |

The ClientApp subdirectory is a standard Angular CLI application. If you open a command prompt in that directory, you can run any ng command (e.g., ng test), or use npm to install extra packages into it.

15 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/nav-menu/nav-menu.component.css: -------------------------------------------------------------------------------- 1 | a.navbar-brand { 2 | white-space: normal; 3 | text-align: center; 4 | word-break: break-all; 5 | } 6 | 7 | html { 8 | font-size: 14px; 9 | } 10 | @media (min-width: 768px) { 11 | html { 12 | font-size: 16px; 13 | } 14 | } 15 | 16 | .box-shadow { 17 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 18 | } 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/nav-menu/nav-menu.component.html: -------------------------------------------------------------------------------- 1 |
2 | 24 |
25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/app/nav-menu/nav-menu.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-nav-menu', 5 | templateUrl: './nav-menu.component.html', 6 | styleUrls: ['./nav-menu.component.css'] 7 | }) 8 | export class NavMenuComponent { 9 | isExpanded = false; 10 | 11 | collapse() { 12 | this.isExpanded = false; 13 | } 14 | 15 | toggle() { 16 | this.isExpanded = !this.isExpanded; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * In development mode, to ignore zone related error stack frames such as 11 | * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can 12 | * import the following file, but please comment it out in production mode 13 | * because it will have performance impact when throw error 14 | */ 15 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 16 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Company.WebApplication1 6 | 7 | 8 | 9 | 10 | 11 | 12 | Loading... 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage'), 20 | reports: ['html', 'lcovonly'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | export function getBaseUrl() { 8 | return document.getElementsByTagName('base')[0].href; 9 | } 10 | 11 | const providers = [ 12 | { provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] } 13 | ]; 14 | 15 | if (environment.production) { 16 | enableProdMode(); 17 | } 18 | 19 | platformBrowserDynamic(providers).bootstrapModule(AppModule) 20 | .catch(err => console.log(err)); 21 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Controllers/SampleDataController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace Company.WebApplication1.Controllers 8 | { 9 | [Route("api/[controller]")] 10 | public class SampleDataController : Controller 11 | { 12 | private static string[] Summaries = new[] 13 | { 14 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 15 | }; 16 | 17 | [HttpGet("[action]")] 18 | public IEnumerable WeatherForecasts() 19 | { 20 | var rng = new Random(); 21 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 22 | { 23 | DateFormatted = DateTime.Now.AddDays(index).ToString("d"), 24 | TemperatureC = rng.Next(-20, 55), 25 | Summary = Summaries[rng.Next(Summaries.Length)] 26 | }); 27 | } 28 | 29 | public class WeatherForecast 30 | { 31 | public string DateFormatted { get; set; } 32 | public int TemperatureC { get; set; } 33 | public string Summary { get; set; } 34 | 35 | public int TemperatureF 36 | { 37 | get 38 | { 39 | return 32 + (int)(TemperatureC / 0.5556); 40 | } 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | 9 | namespace Company.WebApplication1.Pages 10 | { 11 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 12 | public class ErrorModel : PageModel 13 | { 14 | public string RequestId { get; set; } 15 | 16 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 17 | 18 | public void OnGet() 19 | { 20 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Company.WebApplication1 2 | @namespace Company.WebApplication1.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace Company.WebApplication1 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:8080", 7 | //#if(NoHttps) 8 | "sslPort": 0 9 | //#else 10 | "sslPort": 44300 11 | //#endif 12 | } 13 | }, 14 | "profiles": { 15 | "IIS Express": { 16 | "commandName": "IISExpress", 17 | "launchBrowser": true, 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "Company.WebApplication1": { 23 | "commandName": "Project", 24 | "launchBrowser": true, 25 | //#if(NoHttps) 26 | "applicationUrl": "http://localhost:5000", 27 | //#else 28 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 29 | //#endif 30 | "environmentVariables": { 31 | "ASPNETCORE_ENVIRONMENT": "Development" 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "Framework": { 5 | "longName": "framework" 6 | }, 7 | "skipRestore": { 8 | "longName": "no-restore", 9 | "shortName": "" 10 | }, 11 | "HttpPort": { 12 | "isHidden": true 13 | }, 14 | "HttpsPort": { 15 | "isHidden": true 16 | }, 17 | "ExcludeLaunchSettings": { 18 | "longName": "exclude-launch-settings", 19 | "shortName": "" 20 | }, 21 | "NoHttps": { 22 | "longName": "no-https", 23 | "shortName": "" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/.template.config/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/.template.config/icon.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "React.js", 5 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 6 | "id": "1500" 7 | }, 8 | "description": { 9 | "text": "A project template for creating an ASP.NET Core application with React.js", 10 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 11 | "id": "1501" 12 | }, 13 | "order": 315, 14 | "icon": "icon.png", 15 | "learnMoreLink": "https://github.com/aspnet/JavaScriptServices", 16 | "uiFilters": [ 17 | "oneaspnet" 18 | ], 19 | "supportedAuthentications": [ 20 | { 21 | "auth": "None", 22 | "authenticationType": "NoAuth", 23 | "allowUnsecured": true 24 | } 25 | ], 26 | "ports": [ 27 | { 28 | "name": "HttpPort", 29 | "useHttps": false 30 | }, 31 | { 32 | "name": "HttpsPort", 33 | "useHttps": true 34 | } 35 | ], 36 | "excludeLaunchSettings": false, 37 | "minFullFrameworkVersion": "4.6.1", 38 | "disableHttpsSymbol": "NoHttps" 39 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Company.WebApplication1", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "bootstrap": "^4.1.3", 7 | "jquery": "3.3.1", 8 | "react": "^16.0.0", 9 | "react-dom": "^16.0.0", 10 | "react-router-bootstrap": "^0.24.4", 11 | "react-router-dom": "^4.2.2", 12 | "react-scripts": "^1.1.5", 13 | "reactstrap": "^6.3.0", 14 | "rimraf": "^2.6.2" 15 | }, 16 | "devDependencies": { 17 | "ajv": "^6.0.0", 18 | "babel-eslint": "^7.2.3", 19 | "cross-env": "^5.2.0", 20 | "eslint": "^4.1.1", 21 | "eslint-config-react-app": "^2.1.0", 22 | "eslint-plugin-flowtype": "^2.50.3", 23 | "eslint-plugin-import": "^2.14.0", 24 | "eslint-plugin-jsx-a11y": "^5.1.1", 25 | "eslint-plugin-react": "^7.11.1" 26 | }, 27 | "eslintConfig": { 28 | "extends": "react-app" 29 | }, 30 | "scripts": { 31 | "start": "rimraf ./build && react-scripts start", 32 | "build": "react-scripts build", 33 | "test": "cross-env CI=true react-scripts test --env=jsdom", 34 | "eject": "react-scripts eject", 35 | "lint": "eslint ./src/" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/public/favicon.ico -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Company.WebApplication1", 3 | "name": "Company.WebApplication1", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/scss/custom.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/scss/custom.scss -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Route } from 'react-router'; 3 | import { Layout } from './components/Layout'; 4 | import { Home } from './components/Home'; 5 | import { FetchData } from './components/FetchData'; 6 | import { Counter } from './components/Counter'; 7 | 8 | export default class App extends Component { 9 | static displayName = App.name; 10 | 11 | render () { 12 | return ( 13 | 14 | 15 | 16 | 17 | 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { MemoryRouter } from 'react-router-dom'; 4 | import App from './App'; 5 | 6 | it('renders without crashing', () => { 7 | const div = document.createElement('div'); 8 | ReactDOM.render( 9 | 10 | 11 | , div); 12 | }); 13 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/Counter.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | export class Counter extends Component { 4 | static displayName = Counter.name; 5 | 6 | constructor (props) { 7 | super(props); 8 | this.state = { currentCount: 0 }; 9 | this.incrementCounter = this.incrementCounter.bind(this); 10 | } 11 | 12 | incrementCounter () { 13 | this.setState({ 14 | currentCount: this.state.currentCount + 1 15 | }); 16 | } 17 | 18 | render () { 19 | return ( 20 |
21 |

Counter

22 | 23 |

This is a simple example of a React component.

24 | 25 |

Current count: {this.state.currentCount}

26 | 27 | 28 |
29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/FetchData.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | export class FetchData extends Component { 4 | static displayName = FetchData.name; 5 | 6 | constructor (props) { 7 | super(props); 8 | this.state = { forecasts: [], loading: true }; 9 | 10 | fetch('api/SampleData/WeatherForecasts') 11 | .then(response => response.json()) 12 | .then(data => { 13 | this.setState({ forecasts: data, loading: false }); 14 | }); 15 | } 16 | 17 | static renderForecastsTable (forecasts) { 18 | return ( 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | {forecasts.map(forecast => 30 | 31 | 32 | 33 | 34 | 35 | 36 | )} 37 | 38 |
DateTemp. (C)Temp. (F)Summary
{forecast.dateFormatted}{forecast.temperatureC}{forecast.temperatureF}{forecast.summary}
39 | ); 40 | } 41 | 42 | render () { 43 | let contents = this.state.loading 44 | ?

Loading...

45 | : FetchData.renderForecastsTable(this.state.forecasts); 46 | 47 | return ( 48 |
49 |

Weather forecast

50 |

This component demonstrates fetching data from the server.

51 | {contents} 52 |
53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/Layout.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container } from 'reactstrap'; 3 | import { NavMenu } from './NavMenu'; 4 | 5 | export class Layout extends Component { 6 | static displayName = Layout.name; 7 | 8 | render () { 9 | return ( 10 |
11 | 12 | 13 | {this.props.children} 14 | 15 |
16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/NavMenu.css: -------------------------------------------------------------------------------- 1 | a.navbar-brand { 2 | white-space: normal; 3 | text-align: center; 4 | word-break: break-all; 5 | } 6 | 7 | html { 8 | font-size: 14px; 9 | } 10 | @media (min-width: 768px) { 11 | html { 12 | font-size: 16px; 13 | } 14 | } 15 | 16 | .box-shadow { 17 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 18 | } 19 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/index.js: -------------------------------------------------------------------------------- 1 | import 'bootstrap/dist/css/bootstrap.css'; 2 | import React from 'react'; 3 | import ReactDOM from 'react-dom'; 4 | import { BrowserRouter } from 'react-router-dom'; 5 | import App from './App'; 6 | import registerServiceWorker from './registerServiceWorker'; 7 | 8 | const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); 9 | const rootElement = document.getElementById('root'); 10 | 11 | ReactDOM.render( 12 | 13 | 14 | , 15 | rootElement); 16 | 17 | registerServiceWorker(); 18 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Controllers/SampleDataController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace Company.WebApplication1.Controllers 8 | { 9 | [Route("api/[controller]")] 10 | public class SampleDataController : Controller 11 | { 12 | private static string[] Summaries = new[] 13 | { 14 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 15 | }; 16 | 17 | [HttpGet("[action]")] 18 | public IEnumerable WeatherForecasts() 19 | { 20 | var rng = new Random(); 21 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 22 | { 23 | DateFormatted = DateTime.Now.AddDays(index).ToString("d"), 24 | TemperatureC = rng.Next(-20, 55), 25 | Summary = Summaries[rng.Next(Summaries.Length)] 26 | }); 27 | } 28 | 29 | public class WeatherForecast 30 | { 31 | public string DateFormatted { get; set; } 32 | public int TemperatureC { get; set; } 33 | public string Summary { get; set; } 34 | 35 | public int TemperatureF 36 | { 37 | get 38 | { 39 | return 32 + (int)(TemperatureC / 0.5556); 40 | } 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | 9 | namespace Company.WebApplication1.Pages 10 | { 11 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 12 | public class ErrorModel : PageModel 13 | { 14 | public string RequestId { get; set; } 15 | 16 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 17 | 18 | public void OnGet() 19 | { 20 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Company.WebApplication1 2 | @namespace Company.WebApplication1.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace Company.WebApplication1 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:8080", 7 | //#if(NoHttps) 8 | "sslPort": 0 9 | //#else 10 | "sslPort": 44300 11 | //#endif 12 | } 13 | }, 14 | "profiles": { 15 | "IIS Express": { 16 | "commandName": "IISExpress", 17 | "launchBrowser": true, 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "Company.WebApplication1": { 23 | "commandName": "Project", 24 | "launchBrowser": true, 25 | //#if(NoHttps) 26 | "applicationUrl": "http://localhost:5000", 27 | //#else 28 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 29 | //#endif 30 | "environmentVariables": { 31 | "ASPNETCORE_ENVIRONMENT": "Development" 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/React-CSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "Framework": { 5 | "longName": "framework" 6 | }, 7 | "HttpPort": { 8 | "isHidden": true 9 | }, 10 | "HttpsPort": { 11 | "isHidden": true 12 | }, 13 | "ExcludeLaunchSettings": { 14 | "longName": "exclude-launch-settings", 15 | "shortName": "" 16 | }, 17 | "skipRestore": { 18 | "longName": "no-restore", 19 | "shortName": "" 20 | }, 21 | "NoHttps": { 22 | "longName": "no-https", 23 | "shortName": "" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/.template.config/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/.template.config/icon.png -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "React.js and Redux", 5 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 6 | "id": "1400" 7 | }, 8 | "description": { 9 | "text": "A project template for creating an ASP.NET Core application with React.js and Redux", 10 | "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", 11 | "id": "1401" 12 | }, 13 | "order": 320, 14 | "icon": "icon.png", 15 | "learnMoreLink": "https://github.com/aspnet/JavaScriptServices", 16 | "uiFilters": [ 17 | "oneaspnet" 18 | ], 19 | "supportedAuthentications": [ 20 | { 21 | "auth": "None", 22 | "authenticationType": "NoAuth", 23 | "allowUnsecured": true 24 | } 25 | ], 26 | "ports": [ 27 | { 28 | "name": "HttpPort", 29 | "useHttps": false 30 | }, 31 | { 32 | "name": "HttpsPort", 33 | "useHttps": true 34 | } 35 | ], 36 | "excludeLaunchSettings": false, 37 | "minFullFrameworkVersion": "4.6.1", 38 | "disableHttpsSymbol": "NoHttps" 39 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Company.WebApplication1", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "bootstrap": "^4.1.3", 7 | "jquery": "3.3.1", 8 | "react": "^16.0.0", 9 | "react-dom": "^16.0.0", 10 | "react-redux": "^5.0.6", 11 | "react-router-bootstrap": "^0.24.4", 12 | "react-router-dom": "^4.2.2", 13 | "react-router-redux": "^5.0.0-alpha.8", 14 | "react-scripts": "^1.1.5", 15 | "reactstrap": "^6.3.0", 16 | "redux": "^3.7.2", 17 | "redux-thunk": "^2.2.0", 18 | "rimraf": "^2.6.2" 19 | }, 20 | "devDependencies": { 21 | "ajv": "^6.0.0", 22 | "babel-eslint": "^7.2.3", 23 | "cross-env": "^5.2.0", 24 | "eslint": "^4.1.1", 25 | "eslint-config-react-app": "^2.1.0", 26 | "eslint-plugin-flowtype": "^2.50.3", 27 | "eslint-plugin-import": "^2.14.0", 28 | "eslint-plugin-jsx-a11y": "^5.1.1", 29 | "eslint-plugin-react": "^7.11.1" 30 | }, 31 | "eslintConfig": { 32 | "extends": "react-app" 33 | }, 34 | "scripts": { 35 | "start": "rimraf ./build && react-scripts start", 36 | "build": "react-scripts build", 37 | "test": "cross-env CI=true react-scripts test --env=jsdom", 38 | "eject": "react-scripts eject", 39 | "lint": "eslint ./src/" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspnet/Templating/345e22e2d042f3fa3566d857ce1446868a41e1dd/src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/public/favicon.ico -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Company.WebApplication1", 3 | "name": "Company.WebApplication1", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route } from 'react-router'; 3 | import Layout from './components/Layout'; 4 | import Home from './components/Home'; 5 | import Counter from './components/Counter'; 6 | import FetchData from './components/FetchData'; 7 | 8 | export default () => ( 9 | 10 | 11 | 12 | 13 | 14 | ); 15 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { Provider } from 'react-redux'; 4 | import { MemoryRouter } from 'react-router-dom'; 5 | import App from './App'; 6 | 7 | it('renders without crashing', () => { 8 | const storeFake = (state) => ({ 9 | default: () => { }, 10 | subscribe: () => { }, 11 | dispatch: () => { }, 12 | getState: () => ({ ...state }) 13 | }); 14 | const store = storeFake({}); 15 | 16 | const div = document.createElement('div'); 17 | ReactDOM.render( 18 | 19 | 20 | 21 | 22 | , div); 23 | }); -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/Counter.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { bindActionCreators } from 'redux'; 3 | import { connect } from 'react-redux'; 4 | import { actionCreators } from '../store/Counter'; 5 | 6 | const Counter = props => ( 7 |
8 |

Counter

9 | 10 |

This is a simple example of a React component.

11 | 12 |

Current count: {props.count}

13 | 14 | 15 |
16 | ); 17 | 18 | export default connect( 19 | state => state.counter, 20 | dispatch => bindActionCreators(actionCreators, dispatch) 21 | )(Counter); 22 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/Layout.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container } from 'reactstrap'; 3 | import NavMenu from './NavMenu'; 4 | 5 | export default props => ( 6 |
7 | 8 | 9 | {props.children} 10 | 11 |
12 | ); 13 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/NavMenu.css: -------------------------------------------------------------------------------- 1 | a.navbar-brand { 2 | white-space: normal; 3 | text-align: center; 4 | word-break: break-all; 5 | } 6 | 7 | html { 8 | font-size: 14px; 9 | } 10 | @media (min-width: 768px) { 11 | html { 12 | font-size: 16px; 13 | } 14 | } 15 | 16 | .box-shadow { 17 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 18 | } 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/components/NavMenu.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Collapse, Container, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap'; 3 | import { Link } from 'react-router-dom'; 4 | import './NavMenu.css'; 5 | 6 | export default class NavMenu extends React.Component { 7 | constructor (props) { 8 | super(props); 9 | 10 | this.toggle = this.toggle.bind(this); 11 | this.state = { 12 | isOpen: false 13 | }; 14 | } 15 | toggle () { 16 | this.setState({ 17 | isOpen: !this.state.isOpen 18 | }); 19 | } 20 | render () { 21 | return ( 22 |
23 | 24 | 25 | Company.WebApplication1 26 | 27 | 28 |
    29 | 30 | Home 31 | 32 | 33 | Counter 34 | 35 | 36 | Fetch data 37 | 38 |
39 |
40 |
41 |
42 |
43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/index.js: -------------------------------------------------------------------------------- 1 | import 'bootstrap/dist/css/bootstrap.css'; 2 | import React from 'react'; 3 | import ReactDOM from 'react-dom'; 4 | import { Provider } from 'react-redux'; 5 | import { ConnectedRouter } from 'react-router-redux'; 6 | import { createBrowserHistory } from 'history'; 7 | import configureStore from './store/configureStore'; 8 | import App from './App'; 9 | import registerServiceWorker from './registerServiceWorker'; 10 | 11 | // Create browser history to use in the Redux store 12 | const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); 13 | const history = createBrowserHistory({ basename: baseUrl }); 14 | 15 | // Get the application-wide store instance, prepopulating with state from the server where available. 16 | const initialState = window.initialReduxState; 17 | const store = configureStore(history, initialState); 18 | 19 | const rootElement = document.getElementById('root'); 20 | 21 | ReactDOM.render( 22 | 23 | 24 | 25 | 26 | , 27 | rootElement); 28 | 29 | registerServiceWorker(); 30 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/store/Counter.js: -------------------------------------------------------------------------------- 1 | const incrementCountType = 'INCREMENT_COUNT'; 2 | const decrementCountType = 'DECREMENT_COUNT'; 3 | const initialState = { count: 0 }; 4 | 5 | export const actionCreators = { 6 | increment: () => ({ type: incrementCountType }), 7 | decrement: () => ({ type: decrementCountType }) 8 | }; 9 | 10 | export const reducer = (state, action) => { 11 | state = state || initialState; 12 | 13 | if (action.type === incrementCountType) { 14 | return { ...state, count: state.count + 1 }; 15 | } 16 | 17 | if (action.type === decrementCountType) { 18 | return { ...state, count: state.count - 1 }; 19 | } 20 | 21 | return state; 22 | }; 23 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/store/WeatherForecasts.js: -------------------------------------------------------------------------------- 1 | const requestWeatherForecastsType = 'REQUEST_WEATHER_FORECASTS'; 2 | const receiveWeatherForecastsType = 'RECEIVE_WEATHER_FORECASTS'; 3 | const initialState = { forecasts: [], isLoading: false }; 4 | 5 | export const actionCreators = { 6 | requestWeatherForecasts: startDateIndex => async (dispatch, getState) => { 7 | if (startDateIndex === getState().weatherForecasts.startDateIndex) { 8 | // Don't issue a duplicate request (we already have or are loading the requested data) 9 | return; 10 | } 11 | 12 | dispatch({ type: requestWeatherForecastsType, startDateIndex }); 13 | 14 | const url = `api/SampleData/WeatherForecasts?startDateIndex=${startDateIndex}`; 15 | const response = await fetch(url); 16 | const forecasts = await response.json(); 17 | 18 | dispatch({ type: receiveWeatherForecastsType, startDateIndex, forecasts }); 19 | } 20 | }; 21 | 22 | export const reducer = (state, action) => { 23 | state = state || initialState; 24 | 25 | if (action.type === requestWeatherForecastsType) { 26 | return { 27 | ...state, 28 | startDateIndex: action.startDateIndex, 29 | isLoading: true 30 | }; 31 | } 32 | 33 | if (action.type === receiveWeatherForecastsType) { 34 | return { 35 | ...state, 36 | startDateIndex: action.startDateIndex, 37 | forecasts: action.forecasts, 38 | isLoading: false 39 | }; 40 | } 41 | 42 | return state; 43 | }; 44 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/ClientApp/src/store/configureStore.js: -------------------------------------------------------------------------------- 1 | import { applyMiddleware, combineReducers, compose, createStore } from 'redux'; 2 | import thunk from 'redux-thunk'; 3 | import { routerReducer, routerMiddleware } from 'react-router-redux'; 4 | import * as Counter from './Counter'; 5 | import * as WeatherForecasts from './WeatherForecasts'; 6 | 7 | export default function configureStore (history, initialState) { 8 | const reducers = { 9 | counter: Counter.reducer, 10 | weatherForecasts: WeatherForecasts.reducer 11 | }; 12 | 13 | const middleware = [ 14 | thunk, 15 | routerMiddleware(history) 16 | ]; 17 | 18 | // In development, use the browser's Redux dev tools extension if installed 19 | const enhancers = []; 20 | const isDevelopment = process.env.NODE_ENV === 'development'; 21 | if (isDevelopment && typeof window !== 'undefined' && window.devToolsExtension) { 22 | enhancers.push(window.devToolsExtension()); 23 | } 24 | 25 | const rootReducer = combineReducers({ 26 | ...reducers, 27 | routing: routerReducer 28 | }); 29 | 30 | return createStore( 31 | rootReducer, 32 | initialState, 33 | compose(applyMiddleware(...middleware), ...enhancers) 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Controllers/SampleDataController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace Company.WebApplication1.Controllers 8 | { 9 | [Route("api/[controller]")] 10 | public class SampleDataController : Controller 11 | { 12 | private static string[] Summaries = new[] 13 | { 14 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 15 | }; 16 | 17 | [HttpGet("[action]")] 18 | public IEnumerable WeatherForecasts(int startDateIndex) 19 | { 20 | var rng = new Random(); 21 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 22 | { 23 | DateFormatted = DateTime.Now.AddDays(index + startDateIndex).ToString("d"), 24 | TemperatureC = rng.Next(-20, 55), 25 | Summary = Summaries[rng.Next(Summaries.Length)] 26 | }); 27 | } 28 | 29 | public class WeatherForecast 30 | { 31 | public string DateFormatted { get; set; } 32 | public int TemperatureC { get; set; } 33 | public string Summary { get; set; } 34 | 35 | public int TemperatureF 36 | { 37 | get 38 | { 39 | return 32 + (int)(TemperatureC / 0.5556); 40 | } 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | 9 | namespace Company.WebApplication1.Pages 10 | { 11 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 12 | public class ErrorModel : PageModel 13 | { 14 | public string RequestId { get; set; } 15 | 16 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 17 | 18 | public void OnGet() 19 | { 20 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Company.WebApplication1 2 | @namespace Company.WebApplication1.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace Company.WebApplication1 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:8080", 7 | //#if(NoHttps) 8 | "sslPort": 0 9 | //#else 10 | "sslPort": 44300 11 | //#endif 12 | } 13 | }, 14 | "profiles": { 15 | "IIS Express": { 16 | "commandName": "IISExpress", 17 | "launchBrowser": true, 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "Company.WebApplication1": { 23 | "commandName": "Project", 24 | "launchBrowser": true, 25 | //#if(NoHttps) 26 | "applicationUrl": "http://localhost:5000", 27 | //#else 28 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 29 | //#endif 30 | "environmentVariables": { 31 | "ASPNETCORE_ENVIRONMENT": "Development" 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/SetPackageProperties.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $(NuspecProperties); 6 | id=$(PackageId); 7 | version=$(PackageVersion); 8 | licenseUrl=$(PackageLicenseUrl); 9 | iconUrl=$(PackageIconUrl); 10 | description=$(Description); 11 | author=$(Authors); 12 | copyright=$(Copyright); 13 | tags=$(PackageTags.Replace(';', ' ')); 14 | projectUrl=$(PackageProjectUrl); 15 | repositoryUrl=$(RepositoryUrl); 16 | repositoryType=$(RepositoryType); 17 | repositoryCommit=$(RepositoryCommit); 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/templates.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $author$ 7 | $description$ 8 | $iconUrl$ 9 | en-US 10 | true 11 | $projectUrl$ 12 | $licenseUrl$ 13 | $copyright$ 14 | $tags$ 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/DotNetToolsInstaller/DotNetToolsInstaller.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netcoreapp3.0 4 | DotnetToolReference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/GenerateTestProps.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | RestoreSources=$([MSBuild]::Escape($(RestoreSources))); 6 | RuntimeFrameworkVersion=$(RuntimeFrameworkVersion); 7 | MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion); 8 | BundledAspNetCoreAppTargetFrameworkVersion=$(MicrosoftAspNetCoreAppPackageVersion.Split('.')[0]).$(MicrosoftAspNetCoreAppPackageVersion.Split('.')[1]); 9 | BundledAspNetCoreAppPackageVersion=$(MicrosoftAspNetCoreAppPackageVersion) 10 | 11 | 12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/TemplateTests.props.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | ${RestoreSources} 5 | ${RuntimeFrameworkVersion} 6 | ${MicrosoftNETSdkRazorPackageVersion} 7 | ${BundledAspNetCoreAppTargetFrameworkVersion} 8 | ${BundledAspNetCoreAppPackageVersion} 9 | 10 | 99.9 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/Templates.Test/.gitattributes: -------------------------------------------------------------------------------- 1 | .json diff -------------------------------------------------------------------------------- /test/Templates.Test/EmptyWebTemplateTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using Microsoft.AspNetCore.Testing.xunit; 5 | using Xunit; 6 | using Xunit.Abstractions; 7 | 8 | namespace Templates.Test 9 | { 10 | public class EmptyWebTemplateTest : TemplateTestBase 11 | { 12 | public EmptyWebTemplateTest(ITestOutputHelper output) : base(output) 13 | { 14 | } 15 | 16 | [Fact] 17 | public void EmptyWebTemplate() 18 | { 19 | RunDotNetNew("web"); 20 | 21 | foreach (var publish in new[] { false, true }) 22 | { 23 | using (var aspNetProcess = StartAspNetProcess(publish)) 24 | { 25 | aspNetProcess.AssertOk("/"); 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/Templates.Test/Infrastructure/AssemblyFixtureAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using System; 5 | 6 | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] 7 | public class AssemblyFixtureAttribute : Attribute 8 | { 9 | public AssemblyFixtureAttribute(Type fixtureType) 10 | { 11 | FixtureType = fixtureType; 12 | } 13 | public Type FixtureType { get; private set; } 14 | } 15 | -------------------------------------------------------------------------------- /test/Templates.Test/Infrastructure/BrowserTestBase.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using System.Threading; 5 | using OpenQA.Selenium; 6 | using Xunit; 7 | using Xunit.Abstractions; 8 | 9 | namespace Templates.Test.Infrastructure 10 | { 11 | [CaptureSeleniumLogs] 12 | public class BrowserTestBase : TemplateTestBase, IClassFixture 13 | { 14 | private static readonly AsyncLocal _browser = new AsyncLocal(); 15 | private static readonly AsyncLocal _logs = new AsyncLocal(); 16 | 17 | public static IWebDriver Browser => _browser.Value; 18 | 19 | public static ILogs Logs => _logs.Value; 20 | 21 | public BrowserTestBase(BrowserFixture browserFixture, ITestOutputHelper output) : base(output) 22 | { 23 | _browser.Value = browserFixture.Browser; 24 | _logs.Value = browserFixture.Logs; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/Templates.Test/Infrastructure/XUnitExtensions/XunitTestFrameworkExecutorWithAssemblyFixture.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Reflection; 6 | using Xunit.Abstractions; 7 | using Xunit.Sdk; 8 | 9 | namespace Templates.Test.Helpers.XunitExtensions 10 | { 11 | public class XunitTestFrameworkExecutorWithAssemblyFixture : XunitTestFrameworkExecutor 12 | { 13 | public XunitTestFrameworkExecutorWithAssemblyFixture(AssemblyName assemblyName, ISourceInformationProvider sourceInformationProvider, IMessageSink diagnosticMessageSink) 14 | : base(assemblyName, sourceInformationProvider, diagnosticMessageSink) 15 | { 16 | } 17 | 18 | protected override async void RunTestCases(IEnumerable testCases, IMessageSink executionMessageSink, ITestFrameworkExecutionOptions executionOptions) 19 | { 20 | using (var assemblyRunner = new XunitTestAssemblyRunnerWithAssemblyFixture(TestAssembly, testCases, DiagnosticMessageSink, executionMessageSink, executionOptions)) 21 | { 22 | await assemblyRunner.RunAsync(); 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /test/Templates.Test/Infrastructure/XUnitExtensions/XunitTestFrameworkWithAssemblyFixture.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using System.Reflection; 5 | using Xunit.Abstractions; 6 | using Xunit.Sdk; 7 | 8 | namespace Templates.Test.Helpers.XunitExtensions 9 | { 10 | public class XunitTestFrameworkWithAssemblyFixture : XunitTestFramework 11 | { 12 | public XunitTestFrameworkWithAssemblyFixture(IMessageSink messageSink) 13 | : base(messageSink) 14 | { 15 | } 16 | 17 | protected override ITestFrameworkExecutor CreateExecutor(AssemblyName assemblyName) 18 | => new XunitTestFrameworkExecutorWithAssemblyFixture(assemblyName, SourceInformationProvider, DiagnosticMessageSink); 19 | } 20 | } -------------------------------------------------------------------------------- /test/Templates.Test/SpaTemplateTest/AngularTemplateTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using Microsoft.AspNetCore.Testing.xunit; 5 | using Templates.Test.Infrastructure; 6 | using Xunit; 7 | using Xunit.Abstractions; 8 | 9 | [assembly: AssemblyFixture(typeof(SeleniumServerFixture))] 10 | namespace Templates.Test.SpaTemplateTest 11 | { 12 | public class AngularTemplateTest : SpaTemplateTestBase 13 | { 14 | public AngularTemplateTest(BrowserFixture browserFixture, ITestOutputHelper output) : base(browserFixture, output) 15 | { 16 | } 17 | 18 | [Fact] 19 | public void AngularTemplate_Works() 20 | => SpaTemplateImpl("angular"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/Templates.Test/SpaTemplateTest/ReactReduxTemplateTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using Templates.Test.Infrastructure; 5 | using Xunit; 6 | using Xunit.Abstractions; 7 | 8 | [assembly: AssemblyFixture(typeof(SeleniumServerFixture))] 9 | namespace Templates.Test.SpaTemplateTest 10 | { 11 | public class ReactReduxTemplateTest : SpaTemplateTestBase 12 | { 13 | public ReactReduxTemplateTest(BrowserFixture browserFixture, ITestOutputHelper output) : base(browserFixture, output) 14 | { 15 | } 16 | 17 | [Fact] 18 | public void ReactReduxTemplate_Works_NetCore() 19 | => SpaTemplateImpl("reactredux"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/Templates.Test/SpaTemplateTest/ReactTemplateTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using Templates.Test.Infrastructure; 5 | using Xunit; 6 | using Xunit.Abstractions; 7 | 8 | [assembly: AssemblyFixture(typeof(SeleniumServerFixture))] 9 | namespace Templates.Test.SpaTemplateTest 10 | { 11 | public class ReactTemplateTest : SpaTemplateTestBase 12 | { 13 | public ReactTemplateTest(BrowserFixture browserFixture, ITestOutputHelper output) : base(browserFixture, output) 14 | { 15 | } 16 | 17 | [Fact] 18 | public void ReactTemplate_Works_NetCore() 19 | => SpaTemplateImpl("react"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/Templates.Test/SpaTemplateTest/ReactTemplateTest.cs~RF9c2cf40.TMP: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Abstractions; 3 | 4 | namespace Templates.Test.SpaTemplateTest 5 | { 6 | public class ReactTemplateTest : SpaTemplateTestBase 7 | { 8 | public ReactTemplateTest(BrowserFixture browserFixture, ITestOutputHelper output) : base(browserFixture, output) 9 | { 10 | } 11 | 12 | [Fact] 13 | public void ReactTemplate_Works_NetCore() 14 | => SpaTemplateImpl(null, "react"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/Templates.Test/WebApiTemplateTest.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 3 | 4 | using Xunit; 5 | using Xunit.Abstractions; 6 | 7 | namespace Templates.Test 8 | { 9 | public class WebApiTemplateTest : TemplateTestBase 10 | { 11 | public WebApiTemplateTest(ITestOutputHelper output) : base(output) 12 | { 13 | } 14 | 15 | [Fact] 16 | public void WebApiTemplate() 17 | { 18 | RunDotNetNew("webapi"); 19 | 20 | foreach (var publish in new[] { false, true }) 21 | { 22 | using (var aspNetProcess = StartAspNetProcess(publish)) 23 | { 24 | aspNetProcess.AssertOk("/api/values"); 25 | aspNetProcess.AssertNotFound("/"); 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /version.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 3.0.0 4 | alpha1 5 | $(VersionPrefix) 6 | $(VersionPrefix)-$(VersionSuffix)-final 7 | t000 8 | a- 9 | $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) 10 | $(VersionSuffix)-$(BuildNumber) 11 | 12 | 13 | --------------------------------------------------------------------------------