├── .editorconfig ├── .github └── FUNDING.yml ├── .gitignore ├── Directory.Build.Props ├── Directory.Build.Targets ├── LICENSE.txt ├── MSBuild.SDK.SystemWeb.sln ├── README.md ├── Test.snk ├── azure-pipelines.yml ├── build ├── ConvertTo-MarkdownTable.ps1 ├── DetectPackages.ps1 ├── ImportCert.ps1 ├── RemoveCert.ps1 └── nuget.publish.config ├── docs ├── Binding_Redirects │ ├── Autogenerating-Binding-Redirects.md │ └── How-to-show-Suggested-Binding-Redirects.md ├── README.md ├── RazorLibrary.md ├── SDK.md ├── Templates.md └── docs.csproj ├── global.json ├── samples ├── ExampleEmptyWebApplication │ ├── ExampleEmptyWebApplication.csproj │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── launchSettings.json │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── ExampleFullWebApplication │ ├── App_Start │ │ ├── BundleConfig.vb │ │ ├── FilterConfig.vb │ │ ├── RouteConfig.vb │ │ └── WebApiConfig.vb │ ├── Content │ │ └── Site.css │ ├── Controllers │ │ └── HomeController.vb │ ├── ExampleFullWebApplication.vbproj │ ├── Global.asax │ ├── Global.asax.vb │ ├── My Project │ │ ├── Application.Designer.vb │ │ ├── Application.myapp │ │ ├── AssemblyInfo.vb │ │ ├── Resources.Designer.vb │ │ ├── Resources.resx │ │ ├── Settings.Designer.vb │ │ ├── Settings.settings │ │ └── launchSettings.json │ ├── Views │ │ ├── Home │ │ │ ├── About.vbhtml │ │ │ ├── Contact.vbhtml │ │ │ └── Index.vbhtml │ │ ├── Shared │ │ │ ├── Error.vbhtml │ │ │ └── _Layout.vbhtml │ │ ├── Web.config │ │ └── _ViewStart.vbhtml │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.StagingEnvironment.config │ ├── Web.config │ ├── favicon.ico │ └── libman.json ├── Nuget.config ├── RazorLibrary │ ├── ExampleRazorLibrary │ │ ├── App_Start │ │ │ └── RazorGeneratorMvcStart.cs │ │ ├── Controllers │ │ │ └── HomeController.cs │ │ ├── ExampleRazorLibrary.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Views │ │ │ ├── Home │ │ │ │ ├── About.cshtml │ │ │ │ ├── Contact.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ └── _Layout.cshtml │ │ │ ├── Web.config │ │ │ └── _ViewStart.cshtml │ │ ├── Web.config │ │ └── razorgenerator.directives │ ├── ExampleRazorLibraryApplication │ │ ├── App_Start │ │ │ ├── BundleConfig.cs │ │ │ ├── FilterConfig.cs │ │ │ ├── RouteConfig.cs │ │ │ └── WebApiConfig.cs │ │ ├── Content │ │ │ └── Site.css │ │ ├── ExampleRazorLibraryApplication.csproj │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── launchSettings.json │ │ ├── Views │ │ │ └── Web.config │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ ├── favicon.ico │ │ └── libman.json │ └── ExampleRazorLibraryVB │ │ ├── App_Start │ │ └── RazorGeneratorMvcStart.vb │ │ ├── ExampleRazorLibraryVB.vbproj │ │ ├── My Project │ │ ├── AssemblyInfo.vb │ │ └── launchSettings.json │ │ ├── Views │ │ └── web.config │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ └── razorgenerator.directives └── WCF │ ├── WCF.Service.ClassLibrary │ ├── Service2.cs │ └── WCF.Service.ClassLibrary.csproj │ └── WCF.Service.WebApplication │ ├── ExampleWCFWebApplication.csproj │ ├── Properties │ ├── AssemblyInfo.cs │ └── launchSettings.json │ ├── Services │ └── CalculatorService.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── global.asax │ └── service.svc ├── src ├── MSBuild.SDK.SystemWeb.CommonFiles │ ├── MSBuild.SDK.SystemWeb.Common.csproj │ └── Sdk │ │ ├── MSBuild.SDK.SystemWeb.Common.DefaultPackages.props │ │ └── MSBuild.SDK.SystemWeb.Common.DefaultPackages.targets ├── MSBuild.SDK.SystemWeb.RazorLibrary │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.csproj │ ├── README.md │ ├── Sdk │ │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.BindingRedirects.props │ │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.BindingRedirects.targets │ │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.DefaultItems.props │ │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.DefaultItems.targets │ │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.DefaultPackages.props │ │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.DefaultPackages.targets │ │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.RazorGeneratorDirectives.props │ │ ├── MSBuild.SDK.SystemWeb.RazorLibrary.RazorGeneratorDirectives.targets │ │ ├── Sdk.props │ │ └── Sdk.targets │ └── version.json ├── MSBuild.SDK.SystemWeb.Templates │ ├── MSBuild.SDK.SystemWeb.Templates.csproj │ ├── README.md │ ├── images │ │ └── create-new-project.png │ ├── templates │ │ ├── Empty.SystemWeb.CS │ │ │ ├── .template.config │ │ │ │ ├── dotnetcli.host.json │ │ │ │ ├── template.json │ │ │ │ ├── vs-2017.3.host.json │ │ │ │ └── vs-2017.3 │ │ │ │ │ └── WebApplication.png │ │ │ ├── EmptySystemWeb.csproj │ │ │ ├── Properties │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ └── launchSettings.json │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ └── Web.config │ │ ├── Empty.SystemWeb.VB │ │ │ ├── .template.config │ │ │ │ ├── dotnetcli.host.json │ │ │ │ ├── template.json │ │ │ │ ├── vs-2017.3.host.json │ │ │ │ └── vs-2017.3 │ │ │ │ │ └── WebApplication.png │ │ │ ├── EmptySystemWeb.vbproj │ │ │ ├── My Project │ │ │ │ ├── AssemblyInfo.vb │ │ │ │ └── launchSettings.json │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ └── Web.config │ │ ├── Full.SystemWeb.CS │ │ │ ├── .template.config │ │ │ │ ├── dotnetcli.host.json │ │ │ │ ├── template.json │ │ │ │ ├── vs-2017.3.host.json │ │ │ │ └── vs-2017.3 │ │ │ │ │ └── WebApplication.png │ │ │ ├── App_Data │ │ │ │ └── _._ │ │ │ ├── App_Start │ │ │ │ ├── BundleConfig.cs │ │ │ │ ├── FilterConfig.cs │ │ │ │ ├── RouteConfig.cs │ │ │ │ └── WebApiConfig.cs │ │ │ ├── Content │ │ │ │ └── Site.css │ │ │ ├── Controllers │ │ │ │ └── HomeController.cs │ │ │ ├── FullSystemWeb.csproj │ │ │ ├── Global.asax │ │ │ ├── Global.asax.cs │ │ │ ├── Models │ │ │ │ └── _._ │ │ │ ├── Properties │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ └── launchSettings.json │ │ │ ├── Scripts │ │ │ │ └── _._ │ │ │ ├── Views │ │ │ │ ├── Home │ │ │ │ │ ├── About.cshtml │ │ │ │ │ ├── Contact.cshtml │ │ │ │ │ └── Index.cshtml │ │ │ │ ├── Shared │ │ │ │ │ ├── Error.cshtml │ │ │ │ │ └── _Layout.cshtml │ │ │ │ ├── Web.config │ │ │ │ └── _ViewStart.cshtml │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── favicon.ico │ │ │ └── libman.json │ │ ├── Full.SystemWeb.VB │ │ │ ├── .template.config │ │ │ │ ├── dotnetcli.host.json │ │ │ │ ├── template.json │ │ │ │ ├── vs-2017.3.host.json │ │ │ │ └── vs-2017.3 │ │ │ │ │ └── WebApplication.png │ │ │ ├── App_Data │ │ │ │ └── _._ │ │ │ ├── App_Start │ │ │ │ ├── BundleConfig.vb │ │ │ │ ├── FilterConfig.vb │ │ │ │ ├── RouteConfig.vb │ │ │ │ └── WebApiConfig.vb │ │ │ ├── Content │ │ │ │ └── Site.css │ │ │ ├── Controllers │ │ │ │ └── HomeController.vb │ │ │ ├── FullSystemWeb.vbproj │ │ │ ├── Global.asax │ │ │ ├── Global.asax.vb │ │ │ ├── Models │ │ │ │ └── _._ │ │ │ ├── My Project │ │ │ │ ├── Application.Designer.vb │ │ │ │ ├── Application.myapp │ │ │ │ ├── AssemblyInfo.vb │ │ │ │ ├── Resources.Designer.vb │ │ │ │ ├── Resources.resx │ │ │ │ ├── Settings.Designer.vb │ │ │ │ ├── Settings.settings │ │ │ │ └── launchSettings.json │ │ │ ├── Scripts │ │ │ │ └── _._ │ │ │ ├── Views │ │ │ │ ├── Home │ │ │ │ │ ├── About.vbhtml │ │ │ │ │ ├── Contact.vbhtml │ │ │ │ │ └── Index.vbhtml │ │ │ │ ├── Shared │ │ │ │ │ ├── Error.vbhtml │ │ │ │ │ └── _Layout.vbhtml │ │ │ │ ├── Web.config │ │ │ │ └── _ViewStart.vbhtml │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── favicon.ico │ │ │ └── libman.json │ │ ├── RazorLibrary.SystemWeb.CS │ │ │ ├── .template.config │ │ │ │ ├── dotnetcli.host.json │ │ │ │ ├── template.json │ │ │ │ ├── vs-2017.3.host.json │ │ │ │ └── vs-2017.3 │ │ │ │ │ └── WebApplication.png │ │ │ ├── App_Start │ │ │ │ └── RazorGeneratorMvcStart.cs │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── RazorSystemWeb.csproj │ │ │ ├── Views │ │ │ │ └── Web.config │ │ │ └── Web.config │ │ └── RazorLibrary.SystemWeb.VB │ │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── template.json │ │ │ ├── vs-2017.3.host.json │ │ │ └── vs-2017.3 │ │ │ │ └── WebApplication.png │ │ │ ├── App_Start │ │ │ └── RazorGeneratorMvcStart.vb │ │ │ ├── My Project │ │ │ └── AssemblyInfo.vb │ │ │ ├── RazorSystemWeb.vbproj │ │ │ ├── Views │ │ │ └── Web.config │ │ │ └── Web.config │ └── version.json └── MSBuild.SDK.SystemWeb │ ├── MSBuild.SDK.SystemWeb.csproj │ ├── README.md │ ├── Sdk │ ├── MSBuild.SDK.SystemWeb.BindingRedirects.targets │ ├── MSBuild.SDK.SystemWeb.DefaultItems.props │ ├── MSBuild.SDK.SystemWeb.DefaultItems.targets │ ├── MSBuild.SDK.SystemWeb.DefaultPackages.props │ ├── MSBuild.SDK.SystemWeb.DefaultPackages.targets │ ├── Sdk.props │ └── Sdk.targets │ └── version.json └── version.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: CZEMacLeod 4 | -------------------------------------------------------------------------------- /Directory.Build.Props: -------------------------------------------------------------------------------- 1 | 2 | 3 | *log 4 | true 5 | Latest 6 | $(MSBuildThisFileDirectory)packages\ 7 | false 8 | $(NoWarn);NU5128;SA0001 9 | 10 | $(BaseArtifactsPath)$(MSBuildProjectName)\ 11 | 12 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Cloud3D Ltd. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE -------------------------------------------------------------------------------- /Test.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/Test.snk -------------------------------------------------------------------------------- /build/DetectPackages.ps1: -------------------------------------------------------------------------------- 1 | Import-Module .\build\ConvertTo-MarkdownTable.ps1 2 | $dir = $env:BUILD_ARTIFACTSTAGINGDIRECTORY + "\*.nupkg" 3 | Write-Host "Package Directory: $dir" 4 | $packages = Get-ChildItem -Path $dir -Recurse 5 | $ids = $packages | Select-Object -ExpandProperty name 6 | $pkgs = @() 7 | Write-Host "Source Branch Name: $env:BUILD_SOURCEBRANCHNAME" 8 | Write-Host "Branch Name: $env:branchName" 9 | $origin = "HEAD:$env:branchName" 10 | ForEach ($id in $ids) { 11 | $names = $id.Split(".") 12 | $name = $names[(0..($names.Length-5))] -join "." 13 | $version = $names[(($names.Length-4)..($names.Length-2))] -join "." 14 | $pkg = New-Object -TypeName PSObject -Property @{ 15 | Name = $name 16 | Version = $version 17 | } 18 | if ($env:branchName -eq "main") { 19 | $tag = "$($pkg.Name)_v$($pkg.Version)" 20 | Write-Host "Tagging Build: $tag" 21 | git tag $tag 22 | } 23 | $pkgs += $pkg 24 | } 25 | if ($env:branchName -eq "main") { 26 | git push origin --tags 27 | } 28 | $pkgs | Format-Table -Property Name, Version 29 | Write-Host "Package Count: $($packages.Count)" 30 | Write-Host ("##vso[task.setvariable variable=package_count;]$($packages.Count)") 31 | $pushPackages = ($env:branchName -eq "main") -and ($packages.Count -gt 0) 32 | Write-Host ("##vso[task.setvariable variable=push_packages;]$($pushPackages)") 33 | $releaseNotes = $env:BUILD_ARTIFACTSTAGINGDIRECTORY + "\ReleaseNotes.md" 34 | $header = "## Packages$([Environment]::NewLine)" 35 | $header | Out-File $releaseNotes -Encoding ascii 36 | $pkgs | ConvertTo-MarkdownTable | Add-Content $releaseNotes -Encoding ascii -------------------------------------------------------------------------------- /build/ImportCert.ps1: -------------------------------------------------------------------------------- 1 | $password = "$($env:password)" 2 | $pfx64 = "$($env:pfx)" 3 | 4 | $PfxUnprotectedBytes = [Convert]::FromBase64String($pfx64) 5 | 6 | Add-Type -AssemblyName System.Security 7 | 8 | $Pfx = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection 9 | 10 | $Pfx.Import($PfxUnprotectedBytes, $null, [Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) 11 | 12 | $PfxProtectedBytes = $Pfx.Export([Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $password) 13 | 14 | $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 15 | $cert.Import($PfxProtectedBytes, $password, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]"PersistKeySet") 16 | $store = new-object system.security.cryptography.X509Certificates.X509Store -argumentlist "MY", CurrentUser 17 | $store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]"ReadWrite") 18 | $store.Add($cert) 19 | $store.Close() 20 | Write-Host Imported certificate $cert 21 | $thumb = $cert.Thumbprint 22 | Write-Host ("##vso[task.setvariable variable=app_pfx_thumbprint;]$thumb") 23 | Write-Host ("##vso[task.setvariable variable=MSBuildEmitSolution;]0") -------------------------------------------------------------------------------- /build/RemoveCert.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [string]$thumb 3 | ) 4 | if ($thumb -ne "") { 5 | Add-Type -AssemblyName System.Security 6 | $store = new-object system.security.cryptography.X509Certificates.X509Store -argumentlist "MY", CurrentUser 7 | $store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]"ReadWrite") 8 | $certs = $store.Certificates.Find([System.Security.Cryptography.X509Certificates.X509FindType]"FindByThumbprint", $thumb, $false) 9 | if ($certs -ne $null) { 10 | $store.RemoveRange($certs) 11 | } 12 | $store.Close() 13 | } -------------------------------------------------------------------------------- /build/nuget.publish.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/Binding_Redirects/Autogenerating-Binding-Redirects.md: -------------------------------------------------------------------------------- 1 | # Autogenerating Binding Redirects 2 | 3 | The template will, on compile, discover any required binding redirects. 4 | 5 | You may see a build warning `Warning MSB3276 Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.`, and one of three possible actions can be taken with these discovered Binding Redirections 6 | 7 | ## None 8 | If you Would like No Action to be taken with these suggestions, set the `GeneratedBindingRedirectionsAction` to `None` in your project file. 9 | ```xml 10 | 11 | None 12 | 13 | ``` 14 | 15 | ## Preview 16 | You can also choose to `Preview` and generate a file `Web.BindingRedirects.config` that contains the suggested Binding Redirects. 17 | ```xml 18 | 19 | Preview 20 | 21 | ``` 22 | 23 | ## Overwrite 24 | Alternatively the suggested Binding Redirects can be written directly to the `web.config`. 25 | If you want this to happen automatically, you can add the following to your project file. 26 | ```xml 27 | 28 | Overwrite 29 | 30 | ``` -------------------------------------------------------------------------------- /docs/Binding_Redirects/How-to-show-Suggested-Binding-Redirects.md: -------------------------------------------------------------------------------- 1 | # How to show Suggested Binding Redirects 2 | 3 | The following may be useful if you need to see generated binding redirects. 4 | e.g. if you want to manually add them to your `web.config` 5 | 6 | Add this into your csproj 7 | ```xml 8 | 9 | Preview 10 | 11 | ``` 12 | 13 | And then look for a `Web.BindingRedirects.config` file in your project's Solution Explorer. -------------------------------------------------------------------------------- /docs/Templates.md: -------------------------------------------------------------------------------- 1 | # MSBuild.SDK.SystemWeb.Templates 2 | 3 | [![Build Status](https://dev.azure.com/flexviews/MSBuild.SDKs.SystemWeb/_apis/build/status/CZEMacLeod.MSBuild.SDK.SystemWeb?branchName=main)](https://dev.azure.com/flexviews/MSBuild.SDKs.SystemWeb/_build/latest?definitionId=69&branchName=main) 4 | [![NuGet package](https://img.shields.io/nuget/v/MSBuild.SDK.SystemWeb.Templates.svg)](https://nuget.org/packages/MSBuild.SDK.SystemWeb) 5 | [![NuGet downloads](https://img.shields.io/nuget/dt/MSBuild.SDK.SystemWeb.Templates.svg)](https://nuget.org/packages/MSBuild.SDK.SystemWeb) 6 | 7 | ## Installation 8 | 9 | ```cmd 10 | dotnet new -i MSBuild.SDK.SystemWeb.Templates 11 | ``` 12 | 13 | ## Updating 14 | 15 | Optionally 16 | ```cmd 17 | dotnet new --update-check 18 | ``` 19 | and 20 | ```cmd 21 | dotnet new --update-apply 22 | ``` 23 | **N.B.** This applies to all installed templates. 24 | ```cmd 25 | dotnet new -i MSBuild.SDK.SystemWeb.Templates 26 | ``` 27 | Should update you to the latest version even if you have them already installed. 28 | 29 | ## Usage 30 | 31 | ### CLI 32 | ```cmd 33 | dotnet new systemweb 34 | ``` 35 | or 36 | ```cmd 37 | dotnet new systemwebfull 38 | ``` 39 | 40 | To select the VB.Net version use the flag `-lang VB` 41 | e.g. 42 | ```cmd 43 | dotnet new systemweb -lang VB 44 | ``` 45 | 46 | #### Web Applications 47 | ```cmd 48 | dotnet new systemweb 49 | ``` 50 | or 51 | ```cmd 52 | dotnet new systemwebfull 53 | ``` 54 | 55 | To select the VB.Net version use the flag `-lang VB` 56 | e.g. 57 | ```cmd 58 | dotnet new systemweb -lang VB 59 | ``` 60 | 61 | #### Razor Class Libraries 62 | ```cmd 63 | dotnet new systemwebrazorlib 64 | ``` 65 | 66 | To select the VB.Net version use the flag `-lang VB` 67 | e.g. 68 | ```cmd 69 | dotnet new systemwebrazorlib -lang VB 70 | ``` 71 | 72 | 73 | ### Visual Studio 2019 74 | Alternatively use the Visual Studio Add Project dialog. 75 | You need to have enabled the Preview feature to show [.NET CLI Templates in Visual Studio](https://devblogs.microsoft.com/dotnet/net-cli-templates-in-visual-studio/) and have Visual Studio 16.8 Preview 2 or higher. 76 | 77 | ![Visual Studio New Project Dialog](https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/main/src/MSBuild.SDK.SystemWeb.Templates/images/create-new-project.png) 78 | 79 | You can find the new templates easily by selecting `System.Web` from the Project Type dropdown. 80 | 81 | ### Visual Studio 2022 82 | Same as VS2019 except the feature should automatically be enabled as it is no longer in preview. -------------------------------------------------------------------------------- /docs/docs.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "6.0.100", 4 | "rollForward": "latestMajor", 5 | "allowPrerelease": true 6 | }, 7 | "msbuild-sdks": { 8 | "Microsoft.Build.NoTargets": "2.0.1", 9 | "MSBuild.SDK.SystemWeb": "4.0.97", 10 | "MSBuild.SDK.SystemWeb.RazorLibrary": "4.0.97" 11 | } 12 | } -------------------------------------------------------------------------------- /samples/ExampleEmptyWebApplication/ExampleEmptyWebApplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | 5 | 6 | Copyright © 2021 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/ExampleEmptyWebApplication/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | // Setting ComVisible to false makes the types in this assembly not visible 4 | // to COM components. If you need to access a type in this assembly from 5 | // COM, set the ComVisible attribute to true on that type. 6 | [assembly: ComVisible(false)] 7 | 8 | // The following GUID is for the ID of the typelib if this project is exposed to COM 9 | [assembly: Guid("8e2485cd-8e48-443b-9bb5-029c0531467e")] 10 | -------------------------------------------------------------------------------- /samples/ExampleEmptyWebApplication/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:51867/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /samples/ExampleEmptyWebApplication/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /samples/ExampleEmptyWebApplication/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /samples/ExampleEmptyWebApplication/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/App_Start/BundleConfig.vb: -------------------------------------------------------------------------------- 1 | Imports System.Web.Optimization 2 | 3 | Public Module BundleConfig 4 | ' For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862 5 | Public Sub RegisterBundles(ByVal bundles As BundleCollection) 6 | 7 | bundles.Add(New ScriptBundle("~/bundles/jquery").Include( 8 | "~/lib/jquery/jquery.js")) 9 | 10 | bundles.Add(New ScriptBundle("~/bundles/jqueryval").Include( 11 | "~/lib/jquery-validate/jquery.validate.js").Include( 12 | "~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js")) 13 | 14 | ' Use the development version of Modernizr to develop with and learn from. Then, when you're 15 | ' ready for production, use the build tool at https://modernizr.com to pick only the tests you need. 16 | bundles.Add(New ScriptBundle("~/bundles/modernizr").Include( 17 | "~/lib/modernizr/modernizr.js")) 18 | 19 | bundles.Add(New ScriptBundle("~/bundles/bootstrap").Include( 20 | "~/lib/bootstrap/dist/js/bootstrap.js")) 21 | 22 | bundles.Add(New StyleBundle("~/Content/css").Include( 23 | "~/lib/bootstrap/dist/css/bootstrap.css", 24 | "~/Content/site.css")) 25 | End Sub 26 | End Module 27 | 28 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/App_Start/FilterConfig.vb: -------------------------------------------------------------------------------- 1 | Imports System.Web 2 | Imports System.Web.Mvc 3 | 4 | Public Module FilterConfig 5 | Public Sub RegisterGlobalFilters(ByVal filters As GlobalFilterCollection) 6 | filters.Add(New HandleErrorAttribute()) 7 | End Sub 8 | End Module -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/App_Start/RouteConfig.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Collections.Generic 3 | Imports System.Linq 4 | Imports System.Web 5 | Imports System.Web.Mvc 6 | Imports System.Web.Routing 7 | 8 | Public Module RouteConfig 9 | Public Sub RegisterRoutes(ByVal routes As RouteCollection) 10 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}") 11 | 12 | routes.MapRoute( 13 | name:="Default", 14 | url:="{controller}/{action}/{id}", 15 | defaults:=New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional} 16 | ) 17 | End Sub 18 | End Module -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/App_Start/WebApiConfig.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Collections.Generic 3 | Imports System.Linq 4 | Imports System.Web.Http 5 | 6 | Public Module WebApiConfig 7 | Public Sub Register(ByVal config As HttpConfiguration) 8 | ' Web API configuration and services 9 | 10 | ' Web API routes 11 | config.MapHttpAttributeRoutes() 12 | 13 | config.Routes.MapHttpRoute( 14 | name:="DefaultApi", 15 | routeTemplate:="api/{controller}/{id}", 16 | defaults:=New With {.id = RouteParameter.Optional} 17 | ) 18 | End Sub 19 | End Module 20 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | input, 21 | select, 22 | textarea { 23 | max-width: 280px; 24 | } 25 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Controllers/HomeController.vb: -------------------------------------------------------------------------------- 1 | Public Class HomeController 2 | Inherits System.Web.Mvc.Controller 3 | 4 | Function Index() As ActionResult 5 | Return View() 6 | End Function 7 | 8 | Function About() As ActionResult 9 | ViewData("Message") = "Your application description page." 10 | 11 | Return View() 12 | End Function 13 | 14 | Function Contact() As ActionResult 15 | ViewData("Message") = "Your contact page." 16 | 17 | Return View() 18 | End Function 19 | End Class 20 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.vb" Inherits="ExampleFullWebApplication.MvcApplication" Language="VB" %> 2 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Global.asax.vb: -------------------------------------------------------------------------------- 1 | Imports System.Web.Http 2 | Imports System.Web.Optimization 3 | Imports System.Web.Security 4 | Imports System.Web.SessionState 5 | 6 | Public Class MvcApplication 7 | Inherits System.Web.HttpApplication 8 | 9 | Protected Sub Application_Start() 10 | AreaRegistration.RegisterAllAreas() 11 | GlobalConfiguration.Configure(AddressOf WebApiConfig.Register) 12 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters) 13 | RouteConfig.RegisterRoutes(RouteTable.Routes) 14 | BundleConfig.RegisterBundles(BundleTable.Bundles) 15 | End Sub 16 | End Class 17 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.18033 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | false 4 | false 5 | 0 6 | true 7 | 0 8 | 1 9 | true 10 | 11 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Runtime.InteropServices 2 | 3 | 4 | 5 | ' The following GUID is for the ID of the typelib if this project is exposed to COM 6 | 7 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.18033 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My.Resources 16 | 17 | 'This class was auto-generated by the StronglyTypedResourceBuilder 18 | 'class via a tool like ResGen or Visual Studio. 19 | 'To add or remove a member, edit your .ResX file then rerun ResGen 20 | 'with the /str option, or rebuild your VS project. 21 | ' 22 | ' A strongly-typed resource class, for looking up localized strings, etc. 23 | ' 24 | _ 28 | Friend Module Resources 29 | 30 | Private resourceMan As Global.System.Resources.ResourceManager 31 | 32 | Private resourceCulture As Global.System.Globalization.CultureInfo 33 | 34 | ' 35 | ' Returns the cached ResourceManager instance used by this class. 36 | ' 37 | _ 38 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 39 | Get 40 | If Object.ReferenceEquals(resourceMan, Nothing) Then 41 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WebAPI_VB_NoAuth.Resources", GetType(Resources).Assembly) 42 | resourceMan = temp 43 | End If 44 | Return resourceMan 45 | End Get 46 | End Property 47 | 48 | ' 49 | ' Overrides the current thread's CurrentUICulture property for all 50 | ' resource lookups using this strongly typed resource class. 51 | ' 52 | _ 53 | Friend Property Culture() As Global.System.Globalization.CultureInfo 54 | Get 55 | Return resourceCulture 56 | End Get 57 | Set(ByVal value As Global.System.Globalization.CultureInfo) 58 | resourceCulture = value 59 | End Set 60 | End Property 61 | End Module 62 | End Namespace 63 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.18033 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) 24 | 25 | #Region "My.Settings Auto-Save Functionality" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | End Class 57 | End Namespace 58 | 59 | Namespace My 60 | 61 | _ 64 | Friend Module MySettingsProperty 65 | 66 | _ 67 | Friend ReadOnly Property Settings() As Global.ExampleFullWebApplication.My.MySettings 68 | Get 69 | Return Global.ExampleFullWebApplication.My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/My Project/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:52893/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "ExampleFullWebApplication": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:5000" 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Views/Home/About.vbhtml: -------------------------------------------------------------------------------- 1 | @Code 2 | ViewData("Title") = "About" 3 | End Code 4 | 5 |

@ViewData("Title").

6 |

@ViewData("Message")

7 | 8 |

Use this area to provide additional information.

9 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Views/Home/Contact.vbhtml: -------------------------------------------------------------------------------- 1 | @Code 2 | ViewData("Title") = "Contact" 3 | End Code 4 | 5 |

@ViewData("Title").

6 |

@ViewData("Message")

7 | 8 |
9 | One Microsoft Way
10 | Redmond, WA 98052-6399
11 | P: 12 | 425.555.0100 13 |
14 | 15 |
16 | Support: Support@example.com
17 | Marketing: Marketing@example.com 18 |
19 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Views/Home/Index.vbhtml: -------------------------------------------------------------------------------- 1 | @Code 2 | ViewData("Title") = "Home Page" 3 | End Code 4 | 5 |
6 |

ASP.NET

7 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

8 |

Learn more »

9 |
10 | 11 |
12 |
13 |

Getting started

14 |

15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that 16 | enables a clean separation of concerns and gives you full control over markup 17 | for enjoyable, agile development. 18 |

19 |

Learn more »

20 |
21 |
22 |

Get more libraries

23 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

24 |

Learn more »

25 |
26 |
27 |

Web Hosting

28 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

29 |

Learn more »

30 |
31 |
32 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Views/Shared/Error.vbhtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Error 6 | 7 | 8 |
9 |

Error.

10 |

An error occurred while processing your request.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Views/Shared/_Layout.vbhtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title - My ASP.NET Application 7 | @Styles.Render("~/Content/css") 8 | @Scripts.Render("~/bundles/modernizr") 9 | 10 | 11 | 30 |
31 | @RenderBody() 32 |
33 |
34 |

© @DateTime.Now.Year - My ASP.NET Application

35 |
36 |
37 | 38 | @Scripts.Render("~/bundles/jquery") 39 | @Scripts.Render("~/bundles/bootstrap") 40 | @RenderSection("scripts", required:=False) 41 | 42 | 43 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Views/_ViewStart.vbhtml: -------------------------------------------------------------------------------- 1 | @Code 2 | Layout = "~/Views/Shared/_Layout.vbhtml" 3 | End Code -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/Web.StagingEnvironment.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/samples/ExampleFullWebApplication/favicon.ico -------------------------------------------------------------------------------- /samples/ExampleFullWebApplication/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "cdnjs", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.5.1", 7 | "files": [ "jquery.js" ], 8 | "destination": "lib/jquery/" 9 | }, 10 | { 11 | "library": "jquery-validate@1.19.2", 12 | "files": [ "jquery.validate.js" ], 13 | "destination": "lib/jquery-validate/" 14 | }, 15 | { 16 | "library": "modernizr@2.8.3", 17 | "files": [ "modernizr.js" ], 18 | "destination": "lib/modernizr/" 19 | }, 20 | { 21 | "provider": "jsdelivr", 22 | "library": "bootstrap@3.4.1", 23 | "files": ["dist/**/*.*"], 24 | "destination": "lib/bootstrap/" 25 | }, 26 | { 27 | "library": "jquery-validation-unobtrusive@3.2.12", 28 | "files": ["jquery.validate.unobtrusive.js"], 29 | "destination": "lib/jquery-validation-unobtrusive/" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/App_Start/RazorGeneratorMvcStart.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.WebPages; 4 | using RazorGenerator.Mvc; 5 | 6 | [assembly: WebActivatorEx.PostApplicationStartMethod( 7 | typeof(ExampleRazorLibrary.RazorGeneratorMvcStart), 8 | nameof(ExampleRazorLibrary.RazorGeneratorMvcStart.Start) 9 | )] 10 | 11 | namespace ExampleRazorLibrary 12 | { 13 | public static class RazorGeneratorMvcStart 14 | { 15 | public static void Start() 16 | { 17 | var engine = new PrecompiledMvcEngine(typeof(RazorGeneratorMvcStart).Assembly) 18 | { 19 | UsePhysicalViewsIfNewer = HttpContext.Current.Request.IsLocal 20 | }; 21 | 22 | ViewEngines.Engines.Insert(0, engine); 23 | 24 | // StartPage lookups are done by WebPages. 25 | VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace ExampleRazorLibrary.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() 17 | { 18 | ViewBag.Message = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public ActionResult Contact() 24 | { 25 | ViewBag.Message = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/ExampleRazorLibrary.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | Copyright © 2022 5 | ASP 6 | 5.2.9 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | // Setting ComVisible to false makes the types in this assembly not visible 4 | // to COM components. If you need to access a type in this assembly from 5 | // COM, set the ComVisible attribute to true on that type. 6 | [assembly: ComVisible(false)] 7 | 8 | // The following GUID is for the ID of the typelib if this project is exposed to COM 9 | [assembly: Guid("0A21D348-E2B6-4282-92DE-2F5E79BA14C2")] 10 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Home Page"; 3 | } 4 | 5 |
6 |

ASP.NET

7 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

8 |

Learn more »

9 |
10 | 11 |
12 |
13 |

Getting started

14 |

15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that 16 | enables a clean separation of concerns and gives you full control over markup 17 | for enjoyable, agile development. 18 |

19 |

Learn more »

20 |
21 |
22 |

Get more libraries

23 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

24 |

Learn more »

25 |
26 |
27 |

Web Hosting

28 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

29 |

Learn more »

30 |
31 |
-------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Error 6 | 7 | 8 |
9 |

Error.

10 |

An error occurred while processing your request.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title - My ASP.NET Application 7 | @Styles.Render("~/Content/css") 8 | @Scripts.Render("~/bundles/modernizr") 9 | 10 | 11 | 30 |
31 | @RenderBody() 32 |
33 |
34 |

© @DateTime.Now.Year - My ASP.NET Application

35 |
36 |
37 | 38 | @Scripts.Render("~/bundles/jquery") 39 | @Scripts.Render("~/bundles/bootstrap") 40 | @RenderSection("scripts", required: false) 41 | 42 | 43 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibrary/razorgenerator.directives: -------------------------------------------------------------------------------- 1 | RazorVersion: 3 2 | Generator: MvcView 3 | GeneratePrettyNames : true 4 | GenerateAbsolutePathLinePragmas : true 5 | ExcludeForCodeCoverage : true 6 | Namespace : ASP 7 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace ExampleRazorLibraryApplication 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/lib/jquery/jquery-{version}.js")); 13 | 14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( 15 | "~/lib/jquery-validate/jquery.validate.js*").Include( 16 | "~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js")); 17 | 18 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 19 | // ready for production, use the build tool at https://modernizr.com to pick only the tests you need. 20 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 21 | "~/lib/modernizr/modernizr.js")); 22 | 23 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 24 | "~/lib/bootstrap/dist/js/bootstrap.js")); 25 | 26 | bundles.Add(new StyleBundle("~/Content/css").Include( 27 | "~/lib/bootstrap/dist/css/bootstrap.css", 28 | "~/Content/site.css")); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace ExampleRazorLibraryApplication 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace ExampleRazorLibraryApplication 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | 6 | namespace ExampleRazorLibraryApplication 7 | { 8 | public static class WebApiConfig 9 | { 10 | public static void Register(HttpConfiguration config) 11 | { 12 | // Web API configuration and services 13 | 14 | // Web API routes 15 | config.MapHttpAttributeRoutes(); 16 | 17 | config.Routes.MapHttpRoute( 18 | name: "DefaultApi", 19 | routeTemplate: "api/{controller}/{id}", 20 | defaults: new { id = RouteParameter.Optional } 21 | ); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | input, 21 | select, 22 | textarea { 23 | max-width: 280px; 24 | } 25 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/ExampleRazorLibraryApplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | Copyright © 2022 5 | true 6 | Overwrite 7 | 8 | 9 | 10 | 11 | Global.asax 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="ExampleRazorLibraryApplication.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Mvc; 7 | using System.Web.Optimization; 8 | using System.Web.Routing; 9 | using System.Web.Security; 10 | using System.Web.SessionState; 11 | 12 | namespace ExampleRazorLibraryApplication 13 | { 14 | public class MvcApplication : System.Web.HttpApplication 15 | { 16 | protected void Application_Start() 17 | { 18 | AreaRegistration.RegisterAllAreas(); 19 | GlobalConfiguration.Configure(WebApiConfig.Register); 20 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 21 | RouteConfig.RegisterRoutes(RouteTable.Routes); 22 | BundleConfig.RegisterBundles(BundleTable.Bundles); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | // Setting ComVisible to false makes the types in this assembly not visible 4 | // to COM components. If you need to access a type in this assembly from 5 | // COM, set the ComVisible attribute to true on that type. 6 | [assembly: ComVisible(false)] 7 | 8 | // The following GUID is for the ID of the typelib if this project is exposed to COM 9 | [assembly: Guid("15309AFE-46D3-44F5-B579-E4AD54E4033D")] 10 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:42591", 7 | "sslPort": 44363 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/samples/RazorLibrary/ExampleRazorLibraryApplication/favicon.ico -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryApplication/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "cdnjs", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.5.1", 7 | "files": [ "jquery.js" ], 8 | "destination": "lib/jquery/" 9 | }, 10 | { 11 | "library": "jquery-validate@1.19.2", 12 | "files": [ "jquery.validate.js" ], 13 | "destination": "lib/jquery-validate/" 14 | }, 15 | { 16 | "library": "modernizr@2.8.3", 17 | "files": [ "modernizr.js" ], 18 | "destination": "lib/modernizr/" 19 | }, 20 | { 21 | "provider": "jsdelivr", 22 | "library": "bootstrap@3.4.1", 23 | "files": ["dist/**/*.*"], 24 | "destination": "lib/bootstrap/" 25 | }, 26 | { 27 | "library": "jquery-validation-unobtrusive@3.2.12", 28 | "files": ["jquery.validate.unobtrusive.js"], 29 | "destination": "lib/jquery-validation-unobtrusive/" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/App_Start/RazorGeneratorMvcStart.vb: -------------------------------------------------------------------------------- 1 | Imports System.Web.WebPages 2 | Imports RazorGenerator.Mvc 3 | 4 | 8 | 9 | Namespace RazorSystemWeb 10 | Public NotInheritable Class RazorGeneratorMvcStart 11 | Private Sub New() 12 | 13 | End Sub 14 | 15 | Public Shared Sub Start() 16 | Dim engine = New PrecompiledMvcEngine(GetType(RazorGeneratorMvcStart).Assembly) With { 17 | .UsePhysicalViewsIfNewer = HttpContext.Current.Request.IsLocal 18 | } 19 | 20 | ViewEngines.Engines.Insert(0, engine) 21 | 22 | '' StartPage lookups are done by WebPages. 23 | VirtualPathFactoryManager.RegisterVirtualPathFactory(engine) 24 | End Sub 25 | End Class 26 | End Namespace 27 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/ExampleRazorLibraryVB.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | Copyright © 2022 5 | 5.2.9 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Runtime.InteropServices 2 | 3 | 4 | 5 | ' The following GUID is for the ID of the typelib if this project is exposed to COM 6 | 7 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/My Project/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:40742", 7 | "sslPort": 44360 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /samples/RazorLibrary/ExampleRazorLibraryVB/razorgenerator.directives: -------------------------------------------------------------------------------- 1 | RazorVersion: 3 2 | Generator: MvcView 3 | GeneratePrettyNames : true 4 | GenerateAbsolutePathLinePragmas : true 5 | ExcludeForCodeCoverage : true 6 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.ClassLibrary/Service2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ServiceModel; 3 | using System.ServiceModel.Activation; 4 | using System.ServiceModel.Web; 5 | 6 | namespace WCF.Service.ClassLibrary; 7 | 8 | [ServiceContract] 9 | public interface ICalculator2 10 | { 11 | [OperationContract] 12 | [WebGet] 13 | double Add(double n1, double n2); 14 | [OperationContract] 15 | [WebGet] 16 | double Subtract(double n1, double n2); 17 | [OperationContract] 18 | [WebGet] 19 | double Multiply(double n1, double n2); 20 | [OperationContract] 21 | [WebGet] 22 | double Divide(double n1, double n2); 23 | } 24 | 25 | [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] 26 | public class CalculatorService2 : ICalculator2 27 | { 28 | public double Add(double n1, double n2) 29 | { 30 | return n1 + n2; 31 | } 32 | public double Subtract(double n1, double n2) 33 | { 34 | return n1 - n2; 35 | } 36 | public double Multiply(double n1, double n2) 37 | { 38 | return n1 * n2; 39 | } 40 | public double Divide(double n1, double n2) 41 | { 42 | return n1 / n2; 43 | } 44 | } -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.ClassLibrary/WCF.Service.ClassLibrary.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net48 5 | enable 6 | enable 7 | 10 8 | 9 | 10 | 11 | 12 | all 13 | runtime; build; native; contentfiles; analyzers; buildtransitive 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceModel.Web.dll 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/ExampleWCFWebApplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | 4.3.0 5 | 10 6 | 7 | 8 | Copyright © 2022 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | // Setting ComVisible to false makes the types in this assembly not visible 4 | // to COM components. If you need to access a type in this assembly from 5 | // COM, set the ComVisible attribute to true on that type. 6 | [assembly: ComVisible(false)] 7 | 8 | // The following GUID is for the ID of the typelib if this project is exposed to COM 9 | [assembly: Guid("5FBFD242-8B80-4E81-9D44-B147FA7E0A69")] 10 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:57506", 7 | "sslPort": 44386 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express Local Service": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | }, 17 | "launchUrl": "http://localhost:57506/service.svc" 18 | }, 19 | "IIS Express Class Library": { 20 | "commandName": "IISExpress", 21 | "launchBrowser": true, 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | }, 25 | "launchUrl": "http://localhost:57506/service2/Add?n1=420&n2=0.69" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/Services/CalculatorService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ServiceModel; 3 | 4 | namespace ExampleWCFWebApplication.Services; 5 | 6 | [ServiceContract] 7 | public interface ICalculator 8 | { 9 | [OperationContract] 10 | double Add(double n1, double n2); 11 | [OperationContract] 12 | double Subtract(double n1, double n2); 13 | [OperationContract] 14 | double Multiply(double n1, double n2); 15 | [OperationContract] 16 | double Divide(double n1, double n2); 17 | } 18 | 19 | public class CalculatorService : ICalculator 20 | { 21 | public double Add(double n1, double n2) 22 | { 23 | return n1 + n2; 24 | } 25 | public double Subtract(double n1, double n2) 26 | { 27 | return n1 - n2; 28 | } 29 | public double Multiply(double n1, double n2) 30 | { 31 | return n1 * n2; 32 | } 33 | public double Divide(double n1, double n2) 34 | { 35 | return n1 / n2; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Language="C#" %> 2 | <%@ Import Namespace="System.Web.Routing" %> 3 | <%@ Import Namespace="System.ServiceModel.Activation" %> 4 | <%@ Import Namespace="System.ServiceModel.Web " %> 5 | 6 | -------------------------------------------------------------------------------- /samples/WCF/WCF.Service.WebApplication/service.svc: -------------------------------------------------------------------------------- 1 | <%@ServiceHost language="c#" Debug="true" Service="ExampleWCFWebApplication.Services.CalculatorService"%> -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.CommonFiles/MSBuild.SDK.SystemWeb.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net472 5 | false 6 | None 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.CommonFiles/Sdk/MSBuild.SDK.SystemWeb.Common.DefaultPackages.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4.5.0 4 | 3.6.0 5 | 6 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.CommonFiles/Sdk/MSBuild.SDK.SystemWeb.Common.DefaultPackages.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 6 | false 7 | 10 | false 11 | true 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/MSBuild.SDK.SystemWeb.RazorLibrary.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | Provides targets for Razor Library projects that target System.Web. 5 | MSBuild;MSBuildSdk;System.Web;Razor;MVC5 6 | true 7 | MSBuildSdk 8 | README.md 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/README.md: -------------------------------------------------------------------------------- 1 | # MSBuild.SDK.SystemWeb.RazorLibrary 2 | 3 | [![Build Status](https://dev.azure.com/flexviews/MSBuild.SDKs.SystemWeb/_apis/build/status/CZEMacLeod.MSBuild.SDK.SystemWeb?branchName=main)](https://dev.azure.com/flexviews/MSBuild.SDKs.SystemWeb/_build/latest?definitionId=69&branchName=main) 4 | [![NuGet package](https://img.shields.io/nuget/v/MSBuild.SDK.SystemWeb.RazorLibrary.svg)](https://nuget.org/packages/MSBuild.SDK.SystemWeb.RazorLibrary) 5 | [![NuGet downloads](https://img.shields.io/nuget/dt/MSBuild.SDK.SystemWeb.RazorLibrary.svg)](https://nuget.org/packages/MSBuild.SDK.SystemWeb.RazorLibrary) 6 | 7 | This project complements the MSBuild.SDK.SystemWeb SDK (based on the discussion and ideas in [Add support for ASP.NET (non-Core) projects](https://github.com/dotnet/project-system/issues/2670)) by adding an SDK project type for Razor Libraries. 8 | This uses the [RazorGenerator](https://github.com/RazorGenerator/RazorGenerator) project to provide compile time support for MVC5 views with-in a library. 9 | 10 | ## How can I use this SDKs? 11 | 12 | When using an MSBuild Project SDK obtained via NuGet (such as the SDKs in this repo) a specific version **must** be specified. 13 | 14 | Either append the version to the package name: 15 | 16 | ```xml 17 | 18 | ... 19 | ``` 20 | 21 | Or omit the version from the SDK attribute and specify it in the version in `global.json`, which can be useful to synchronise versions across multiple projects in a solution: 22 | 23 | ```json 24 | { 25 | "msbuild-sdks": { 26 | "MSBuild.SDK.SystemWeb.RazorLibrary" : "$version$" 27 | } 28 | } 29 | ``` 30 | 31 | You can also use the [templates](../MSBuild.SDK.SystemWeb.Templates) to easily create new projects. 32 | 33 | ## Documentation 34 | 35 | For more information see 36 | 37 | [![Source](https://img.shields.io/badge/github-source-lightgrey?logo=github)](https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb) 38 | [![Docs](https://img.shields.io/badge/github_pages-docs-lightgrey?logo=github)](https://czemacleod.github.io/MSBuild.SDK.SystemWeb/) 39 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.BindingRedirects.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | true 4 | 5 | 6 | true 7 | true 8 | 9 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.BindingRedirects.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | <_DllConfig Remove="@(_DllConfig)" /> 5 | <_AppConfig Remove="@(_AppConfig)" /> 6 | <_ConfigFile Remove="@(_ConfigFileHash)" /> 7 | <_DllConfig Include="$(OutDir)$(AssemblyName).dll.config" /> 8 | <_AppConfig Include="web.config" /> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | <_ConfigFileHash Include="@(_DllConfigFileHash)" /> 20 | <_ConfigFileHash Include="@(_AppConfigFileHash)" /> 21 | 22 | 23 | 24 | 25 | <Namespace Prefix='asm' Uri='urn:schemas-microsoft-com:asm.v1' /> 26 | 27 | 30 | 31 | 32 | 33 | 34 | @(_bindings ,'') 35 | 36 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.DefaultItems.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | $(DefaultItemExcludes);**\web.config 4 | $(DefaultItemExcludes);web.config 5 | 6 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.DefaultItems.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.DefaultPackages.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | $(ExcludeDefaultRazorPackages) 6 | 7 | 8 | 5.2.9 9 | 10 | 2.5.0 11 | 2.4.9 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.DefaultPackages.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.RazorGeneratorDirectives.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 3 4 | MvcView 5 | true 6 | true 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/MSBuild.SDK.SystemWeb.RazorLibrary.RazorGeneratorDirectives.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/Sdk.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | true 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | false 14 | web.config 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/Sdk/Sdk.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.RazorLibrary/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/v3.3.37/src/NerdBank.GitVersioning/version.schema.json", 3 | "inherit": true, 4 | "version": "4.0", 5 | "buildNumberOffset": 21 6 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/MSBuild.SDK.SystemWeb.Templates.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | 5 | Template 6 | Provides templates for projects that target System.Web using the MSBuild.SDK.SystemWeb SDK. 7 | MSBuild;MSBuildSdk;System.Web;Templates 8 | 9 | true 10 | false 11 | content 12 | $(NoWarn);NU5128 13 | 14 | true 15 | README.md 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/README.md: -------------------------------------------------------------------------------- 1 | # MSBuild.SDK.SystemWeb.Templates 2 | 3 | [![Build Status](https://dev.azure.com/flexviews/MSBuild.SDKs.SystemWeb/_apis/build/status/CZEMacLeod.MSBuild.SDK.SystemWeb?branchName=main)](https://dev.azure.com/flexviews/MSBuild.SDKs.SystemWeb/_build/latest?definitionId=69&branchName=main) 4 | [![NuGet package](https://img.shields.io/nuget/v/MSBuild.SDK.SystemWeb.Templates.svg)](https://nuget.org/packages/MSBuild.SDK.SystemWeb.Templates) 5 | [![NuGet downloads](https://img.shields.io/nuget/dt/MSBuild.SDK.SystemWeb.Templates.svg)](https://nuget.org/packages/MSBuild.SDK.SystemWeb.Templates) 6 | 7 | ## Installation 8 | ```cmd 9 | dotnet new -i MSBuild.SDK.SystemWeb.Templates 10 | ``` 11 | 12 | ## Usage 13 | 14 | ### CLI 15 | 16 | #### Web Applications 17 | ```cmd 18 | dotnet new systemweb 19 | ``` 20 | or 21 | ```cmd 22 | dotnet new systemwebfull 23 | ``` 24 | 25 | To select the VB.Net version use the flag `-lang VB` 26 | e.g. 27 | ```cmd 28 | dotnet new systemweb -lang VB 29 | ``` 30 | 31 | #### Razor Class Libraries 32 | ```cmd 33 | dotnet new systemwebrazorlib 34 | ``` 35 | 36 | To select the VB.Net version use the flag `-lang VB` 37 | e.g. 38 | ```cmd 39 | dotnet new systemwebrazorlib -lang VB 40 | ``` 41 | 42 | ### Visual Studio 43 | 44 | Alternatively use the Visual Studio Add Project dialog. 45 | #### 2019 46 | You need to have enabled the Preview feature to show [.NET CLI Templates in Visual Studio](https://devblogs.microsoft.com/dotnet/net-cli-templates-in-visual-studio/) and have Visual Studio 16.8 Preview 2 or higher. 47 | 48 | #### 2022 49 | The ability to use templates is built into VS2022. 50 | 51 | ![Visual Studio New Project Dialog](https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/main/src/MSBuild.SDK.SystemWeb.Templates/images/create-new-project.png) 52 | 53 | You can find the new templates easily by selecting System.Web from the Project Type dropdown. 54 | 55 | ## Documentation 56 | 57 | For more information see 58 | 59 | [![Source](https://img.shields.io/badge/github-source-lightgrey?logo=github)](https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb) 60 | [![Docs](https://img.shields.io/badge/github_pages-docs-lightgrey?logo=github)](https://czemacleod.github.io/MSBuild.SDK.SystemWeb/) 61 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/images/create-new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/images/create-new-project.png -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "TargetFrameworkOverride": { 5 | "isHidden": "true", 6 | "longName": "target-framework-override", 7 | "shortName": "" 8 | }, 9 | "Framework": { 10 | "longName": "framework" 11 | }, 12 | "skipRestore": { 13 | "longName": "no-restore", 14 | "shortName": "" 15 | }, 16 | "HttpPort": { 17 | "isHidden": true 18 | }, 19 | "HttpsPort": { 20 | "isHidden": true 21 | }, 22 | "ExcludeLaunchSettings": { 23 | "longName": "exclude-launch-settings", 24 | "shortName": "" 25 | }, 26 | "NoHttps": { 27 | "longName": "no-https", 28 | "shortName": "" 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "Web Application (Empty)" 5 | }, 6 | "description": { 7 | "text": "A project template for creating an ASP.NET 4.x application. This template does not have any content in it." 8 | }, 9 | "order": 1, 10 | "icon": "vs-2017.3/WebApplication.png", 11 | "learnMoreLink": "https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb", 12 | "isApi": false, 13 | "ports": [ 14 | { 15 | "name": "HttpPort", 16 | "useHttps": false 17 | }, 18 | { 19 | "name": "HttpsPort", 20 | "useHttps": true 21 | } 22 | ], 23 | "excludeLaunchSettings": false, 24 | "minFullFrameworkVersion": "4.6.1", 25 | "disableHttpsSymbol": "NoHttps" 26 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/.template.config/vs-2017.3/WebApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/.template.config/vs-2017.3/WebApplication.png -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/EmptySystemWeb.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | 5 | 6 | Copyright © (copyrightYear) 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | // Setting ComVisible to false makes the types in this assembly not visible 4 | // to COM components. If you need to access a type in this assembly from 5 | // COM, set the ComVisible attribute to true on that type. 6 | [assembly: ComVisible(false)] 7 | 8 | // The following GUID is for the ID of the typelib if this project is exposed to COM 9 | [assembly: Guid("(assemblyguid)")] 10 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/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 | } 28 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.CS/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "TargetFrameworkOverride": { 5 | "isHidden": "true", 6 | "longName": "target-framework-override", 7 | "shortName": "" 8 | }, 9 | "Framework": { 10 | "longName": "framework" 11 | }, 12 | "skipRestore": { 13 | "longName": "no-restore", 14 | "shortName": "" 15 | }, 16 | "HttpPort": { 17 | "isHidden": true 18 | }, 19 | "HttpsPort": { 20 | "isHidden": true 21 | }, 22 | "ExcludeLaunchSettings": { 23 | "longName": "exclude-launch-settings", 24 | "shortName": "" 25 | }, 26 | "NoHttps": { 27 | "longName": "no-https", 28 | "shortName": "" 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "Web Application (Empty)" 5 | }, 6 | "description": { 7 | "text": "A project template for creating an ASP.NET 4.x application. This template does not have any content in it." 8 | }, 9 | "order": 1, 10 | "icon": "vs-2017.3/WebApplication.png", 11 | "learnMoreLink": "https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb", 12 | "isApi": false, 13 | "ports": [ 14 | { 15 | "name": "HttpPort", 16 | "useHttps": false 17 | }, 18 | { 19 | "name": "HttpsPort", 20 | "useHttps": true 21 | } 22 | ], 23 | "excludeLaunchSettings": false, 24 | "minFullFrameworkVersion": "4.6.1", 25 | "disableHttpsSymbol": "NoHttps" 26 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/.template.config/vs-2017.3/WebApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/.template.config/vs-2017.3/WebApplication.png -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/EmptySystemWeb.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | 5 | 6 | Copyright © (copyrightYear) 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Runtime.InteropServices 2 | 3 | 4 | 5 | ' The following GUID is for the ID of the typelib if this project is exposed to COM 6 | 7 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/My Project/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 | } 28 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Empty.SystemWeb.VB/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "TargetFrameworkOverride": { 5 | "isHidden": "true", 6 | "longName": "target-framework-override", 7 | "shortName": "" 8 | }, 9 | "Framework": { 10 | "longName": "framework" 11 | }, 12 | "skipRestore": { 13 | "longName": "no-restore", 14 | "shortName": "" 15 | }, 16 | "HttpPort": { 17 | "isHidden": true 18 | }, 19 | "HttpsPort": { 20 | "isHidden": true 21 | }, 22 | "ExcludeLaunchSettings": { 23 | "longName": "exclude-launch-settings", 24 | "shortName": "" 25 | }, 26 | "NoHttps": { 27 | "longName": "no-https", 28 | "shortName": "" 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "Web Application (Model-View-Controller)" 5 | }, 6 | "description": { 7 | "text": "A project template for creating an ASP.NET 4.x application with example ASP.NET MVC5 Views and Controllers. This template can also be used for RESTful HTTP services." 8 | }, 9 | "order": 1, 10 | "icon": "vs-2017.3/WebApplication.png", 11 | "learnMoreLink": "https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb", 12 | "isApi": false, 13 | "ports": [ 14 | { 15 | "name": "HttpPort", 16 | "useHttps": false 17 | }, 18 | { 19 | "name": "HttpsPort", 20 | "useHttps": true 21 | } 22 | ], 23 | "excludeLaunchSettings": false, 24 | "minFullFrameworkVersion": "4.6.1", 25 | "disableHttpsSymbol": "NoHttps" 26 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/.template.config/vs-2017.3/WebApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/.template.config/vs-2017.3/WebApplication.png -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/App_Data/_._: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace FullSystemWeb 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/lib/jquery/jquery-{version}.js")); 13 | 14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( 15 | "~/lib/jquery-validate/jquery.validate.js*").Include( 16 | "~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js")); 17 | 18 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 19 | // ready for production, use the build tool at https://modernizr.com to pick only the tests you need. 20 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 21 | "~/lib/modernizr/modernizr.js")); 22 | 23 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 24 | "~/lib/bootstrap/dist/js/bootstrap.js")); 25 | 26 | bundles.Add(new StyleBundle("~/Content/css").Include( 27 | "~/lib/bootstrap/dist/css/bootstrap.css", 28 | "~/Content/site.css")); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace FullSystemWeb 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace FullSystemWeb 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | 6 | namespace FullSystemWeb 7 | { 8 | public static class WebApiConfig 9 | { 10 | public static void Register(HttpConfiguration config) 11 | { 12 | // Web API configuration and services 13 | 14 | // Web API routes 15 | config.MapHttpAttributeRoutes(); 16 | 17 | config.Routes.MapHttpRoute( 18 | name: "DefaultApi", 19 | routeTemplate: "api/{controller}/{id}", 20 | defaults: new { id = RouteParameter.Optional } 21 | ); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | input, 21 | select, 22 | textarea { 23 | max-width: 280px; 24 | } 25 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace FullSystemWeb.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() 17 | { 18 | ViewBag.Message = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public ActionResult Contact() 24 | { 25 | ViewBag.Message = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/FullSystemWeb.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | Copyright © (copyrightYear) 5 | 6 | 7 | 8 | 9 | Global.asax 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="FullSystemWeb.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Mvc; 7 | using System.Web.Optimization; 8 | using System.Web.Routing; 9 | using System.Web.Security; 10 | using System.Web.SessionState; 11 | 12 | namespace FullSystemWeb 13 | { 14 | public class MvcApplication : System.Web.HttpApplication 15 | { 16 | protected void Application_Start() 17 | { 18 | AreaRegistration.RegisterAllAreas(); 19 | GlobalConfiguration.Configure(WebApiConfig.Register); 20 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 21 | RouteConfig.RegisterRoutes(RouteTable.Routes); 22 | BundleConfig.RegisterBundles(BundleTable.Bundles); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Models/_._: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | // Setting ComVisible to false makes the types in this assembly not visible 4 | // to COM components. If you need to access a type in this assembly from 5 | // COM, set the ComVisible attribute to true on that type. 6 | [assembly: ComVisible(false)] 7 | 8 | // The following GUID is for the ID of the typelib if this project is exposed to COM 9 | [assembly: Guid("(assemblyguid)")] 10 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/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 | } 28 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Scripts/_._: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Home Page"; 3 | } 4 | 5 |
6 |

ASP.NET

7 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

8 |

Learn more »

9 |
10 | 11 |
12 |
13 |

Getting started

14 |

15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that 16 | enables a clean separation of concerns and gives you full control over markup 17 | for enjoyable, agile development. 18 |

19 |

Learn more »

20 |
21 |
22 |

Get more libraries

23 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

24 |

Learn more »

25 |
26 |
27 |

Web Hosting

28 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

29 |

Learn more »

30 |
31 |
-------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Error 6 | 7 | 8 |
9 |

Error.

10 |

An error occurred while processing your request.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title - My ASP.NET Application 7 | @Styles.Render("~/Content/css") 8 | @Scripts.Render("~/bundles/modernizr") 9 | 10 | 11 | 30 |
31 | @RenderBody() 32 |
33 |
34 |

© @DateTime.Now.Year - My ASP.NET Application

35 |
36 |
37 | 38 | @Scripts.Render("~/bundles/jquery") 39 | @Scripts.Render("~/bundles/bootstrap") 40 | @RenderSection("scripts", required: false) 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/favicon.ico -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.CS/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "cdnjs", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.5.1", 7 | "files": [ "jquery.js" ], 8 | "destination": "lib/jquery/" 9 | }, 10 | { 11 | "library": "jquery-validate@1.19.2", 12 | "files": [ "jquery.validate.js" ], 13 | "destination": "lib/jquery-validate/" 14 | }, 15 | { 16 | "library": "modernizr@2.8.3", 17 | "files": [ "modernizr.js" ], 18 | "destination": "lib/modernizr/" 19 | }, 20 | { 21 | "provider": "jsdelivr", 22 | "library": "bootstrap@3.4.1", 23 | "files": ["dist/**/*.*"], 24 | "destination": "lib/bootstrap/" 25 | }, 26 | { 27 | "library": "jquery-validation-unobtrusive@3.2.12", 28 | "files": ["jquery.validate.unobtrusive.js"], 29 | "destination": "lib/jquery-validation-unobtrusive/" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "TargetFrameworkOverride": { 5 | "isHidden": "true", 6 | "longName": "target-framework-override", 7 | "shortName": "" 8 | }, 9 | "Framework": { 10 | "longName": "framework" 11 | }, 12 | "skipRestore": { 13 | "longName": "no-restore", 14 | "shortName": "" 15 | }, 16 | "HttpPort": { 17 | "isHidden": true 18 | }, 19 | "HttpsPort": { 20 | "isHidden": true 21 | }, 22 | "ExcludeLaunchSettings": { 23 | "longName": "exclude-launch-settings", 24 | "shortName": "" 25 | }, 26 | "NoHttps": { 27 | "longName": "no-https", 28 | "shortName": "" 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/.template.config/vs-2017.3.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "name": { 4 | "text": "Web Application (Model-View-Controller)" 5 | }, 6 | "description": { 7 | "text": "A project template for creating an ASP.NET 4.x application with example ASP.NET MVC5 Views and Controllers. This template can also be used for RESTful HTTP services." 8 | }, 9 | "order": 1, 10 | "icon": "vs-2017.3/WebApplication.png", 11 | "learnMoreLink": "https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb", 12 | "isApi": true, 13 | "ports": [ 14 | { 15 | "name": "HttpPort", 16 | "useHttps": false 17 | }, 18 | { 19 | "name": "HttpsPort", 20 | "useHttps": true 21 | } 22 | ], 23 | "excludeLaunchSettings": false, 24 | "minFullFrameworkVersion": "4.6.1", 25 | "disableHttpsSymbol": "NoHttps" 26 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/.template.config/vs-2017.3/WebApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/.template.config/vs-2017.3/WebApplication.png -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/App_Data/_._: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/App_Start/BundleConfig.vb: -------------------------------------------------------------------------------- 1 | Imports System.Web.Optimization 2 | 3 | Public Module BundleConfig 4 | ' For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862 5 | Public Sub RegisterBundles(ByVal bundles As BundleCollection) 6 | 7 | bundles.Add(New ScriptBundle("~/bundles/jquery").Include( 8 | "~/lib/jquery/jquery.js")) 9 | 10 | bundles.Add(New ScriptBundle("~/bundles/jqueryval").Include( 11 | "~/lib/jquery-validate/jquery.validate.js").Include( 12 | "~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js")) 13 | 14 | ' Use the development version of Modernizr to develop with and learn from. Then, when you're 15 | ' ready for production, use the build tool at https://modernizr.com to pick only the tests you need. 16 | bundles.Add(New ScriptBundle("~/bundles/modernizr").Include( 17 | "~/lib/modernizr/modernizr.js")) 18 | 19 | bundles.Add(New ScriptBundle("~/bundles/bootstrap").Include( 20 | "~/lib/bootstrap/dist/js/bootstrap.js")) 21 | 22 | bundles.Add(New StyleBundle("~/Content/css").Include( 23 | "~/lib/bootstrap/dist/css/bootstrap.css", 24 | "~/Content/site.css")) 25 | End Sub 26 | End Module 27 | 28 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/App_Start/FilterConfig.vb: -------------------------------------------------------------------------------- 1 | Imports System.Web 2 | Imports System.Web.Mvc 3 | 4 | Public Module FilterConfig 5 | Public Sub RegisterGlobalFilters(ByVal filters As GlobalFilterCollection) 6 | filters.Add(New HandleErrorAttribute()) 7 | End Sub 8 | End Module -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/App_Start/RouteConfig.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Collections.Generic 3 | Imports System.Linq 4 | Imports System.Web 5 | Imports System.Web.Mvc 6 | Imports System.Web.Routing 7 | 8 | Public Module RouteConfig 9 | Public Sub RegisterRoutes(ByVal routes As RouteCollection) 10 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}") 11 | 12 | routes.MapRoute( 13 | name:="Default", 14 | url:="{controller}/{action}/{id}", 15 | defaults:=New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional} 16 | ) 17 | End Sub 18 | End Module -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/App_Start/WebApiConfig.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Collections.Generic 3 | Imports System.Linq 4 | Imports System.Web.Http 5 | 6 | Public Module WebApiConfig 7 | Public Sub Register(ByVal config As HttpConfiguration) 8 | ' Web API configuration and services 9 | 10 | ' Web API routes 11 | config.MapHttpAttributeRoutes() 12 | 13 | config.Routes.MapHttpRoute( 14 | name:="DefaultApi", 15 | routeTemplate:="api/{controller}/{id}", 16 | defaults:=New With {.id = RouteParameter.Optional} 17 | ) 18 | End Sub 19 | End Module 20 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | input, 21 | select, 22 | textarea { 23 | max-width: 280px; 24 | } 25 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Controllers/HomeController.vb: -------------------------------------------------------------------------------- 1 | Public Class HomeController 2 | Inherits System.Web.Mvc.Controller 3 | 4 | Function Index() As ActionResult 5 | Return View() 6 | End Function 7 | 8 | Function About() As ActionResult 9 | ViewData("Message") = "Your application description page." 10 | 11 | Return View() 12 | End Function 13 | 14 | Function Contact() As ActionResult 15 | ViewData("Message") = "Your contact page." 16 | 17 | Return View() 18 | End Function 19 | End Class 20 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.vb" Inherits="FullSystemWeb.MvcApplication" Language="VB" %> 2 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Global.asax.vb: -------------------------------------------------------------------------------- 1 | Imports System.Web.Http 2 | Imports System.Web.Optimization 3 | Imports System.Web.Security 4 | Imports System.Web.SessionState 5 | 6 | Public Class MvcApplication 7 | Inherits System.Web.HttpApplication 8 | 9 | Protected Sub Application_Start() 10 | AreaRegistration.RegisterAllAreas() 11 | GlobalConfiguration.Configure(AddressOf WebApiConfig.Register) 12 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters) 13 | RouteConfig.RegisterRoutes(RouteTable.Routes) 14 | BundleConfig.RegisterBundles(BundleTable.Bundles) 15 | End Sub 16 | End Class 17 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Models/_._: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.18033 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | false 4 | false 5 | 0 6 | true 7 | 0 8 | 1 9 | true 10 | 11 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Runtime.InteropServices 2 | 3 | 4 | 5 | ' The following GUID is for the ID of the typelib if this project is exposed to COM 6 | 7 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.18033 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My.Resources 16 | 17 | 'This class was auto-generated by the StronglyTypedResourceBuilder 18 | 'class via a tool like ResGen or Visual Studio. 19 | 'To add or remove a member, edit your .ResX file then rerun ResGen 20 | 'with the /str option, or rebuild your VS project. 21 | ' 22 | ' A strongly-typed resource class, for looking up localized strings, etc. 23 | ' 24 | _ 28 | Friend Module Resources 29 | 30 | Private resourceMan As Global.System.Resources.ResourceManager 31 | 32 | Private resourceCulture As Global.System.Globalization.CultureInfo 33 | 34 | ' 35 | ' Returns the cached ResourceManager instance used by this class. 36 | ' 37 | _ 38 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 39 | Get 40 | If Object.ReferenceEquals(resourceMan, Nothing) Then 41 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WebAPI_VB_NoAuth.Resources", GetType(Resources).Assembly) 42 | resourceMan = temp 43 | End If 44 | Return resourceMan 45 | End Get 46 | End Property 47 | 48 | ' 49 | ' Overrides the current thread's CurrentUICulture property for all 50 | ' resource lookups using this strongly typed resource class. 51 | ' 52 | _ 53 | Friend Property Culture() As Global.System.Globalization.CultureInfo 54 | Get 55 | Return resourceCulture 56 | End Get 57 | Set(ByVal value As Global.System.Globalization.CultureInfo) 58 | resourceCulture = value 59 | End Set 60 | End Property 61 | End Module 62 | End Namespace 63 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.18033 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) 24 | 25 | #Region "My.Settings Auto-Save Functionality" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | End Class 57 | End Namespace 58 | 59 | Namespace My 60 | 61 | _ 64 | Friend Module MySettingsProperty 65 | 66 | 67 | Friend ReadOnly Property Settings() As My.MySettings 68 | Get 69 | Return My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/My Project/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 | } 28 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Scripts/_._: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Views/Home/About.vbhtml: -------------------------------------------------------------------------------- 1 | @Code 2 | ViewData("Title") = "About" 3 | End Code 4 | 5 |

@ViewData("Title").

6 |

@ViewData("Message")

7 | 8 |

Use this area to provide additional information.

9 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Views/Home/Contact.vbhtml: -------------------------------------------------------------------------------- 1 | @Code 2 | ViewData("Title") = "Contact" 3 | End Code 4 | 5 |

@ViewData("Title").

6 |

@ViewData("Message")

7 | 8 |
9 | One Microsoft Way
10 | Redmond, WA 98052-6399
11 | P: 12 | 425.555.0100 13 |
14 | 15 |
16 | Support: Support@example.com
17 | Marketing: Marketing@example.com 18 |
19 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Views/Home/Index.vbhtml: -------------------------------------------------------------------------------- 1 | @Code 2 | ViewData("Title") = "Home Page" 3 | End Code 4 | 5 |
6 |

ASP.NET

7 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

8 |

Learn more »

9 |
10 | 11 |
12 |
13 |

Getting started

14 |

15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that 16 | enables a clean separation of concerns and gives you full control over markup 17 | for enjoyable, agile development. 18 |

19 |

Learn more »

20 |
21 |
22 |

Get more libraries

23 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

24 |

Learn more »

25 |
26 |
27 |

Web Hosting

28 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

29 |

Learn more »

30 |
31 |
32 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Views/Shared/Error.vbhtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Error 6 | 7 | 8 |
9 |

Error.

10 |

An error occurred while processing your request.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Views/Shared/_Layout.vbhtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title - My ASP.NET Application 7 | @Styles.Render("~/Content/css") 8 | @Scripts.Render("~/bundles/modernizr") 9 | 10 | 11 | 30 |
31 | @RenderBody() 32 |
33 |
34 |

© @DateTime.Now.Year - My ASP.NET Application

35 |
36 |
37 | 38 | @Scripts.Render("~/bundles/jquery") 39 | @Scripts.Render("~/bundles/bootstrap") 40 | @RenderSection("scripts", required:=False) 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Views/_ViewStart.vbhtml: -------------------------------------------------------------------------------- 1 | @Code 2 | Layout = "~/Views/Shared/_Layout.vbhtml" 3 | End Code -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/favicon.ico -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/Full.SystemWeb.VB/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "cdnjs", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.5.1", 7 | "files": [ "jquery.js" ], 8 | "destination": "lib/jquery/" 9 | }, 10 | { 11 | "library": "jquery-validate@1.19.2", 12 | "files": [ "jquery.validate.js" ], 13 | "destination": "lib/jquery-validate/" 14 | }, 15 | { 16 | "library": "modernizr@2.8.3", 17 | "files": [ "modernizr.js" ], 18 | "destination": "lib/modernizr/" 19 | }, 20 | { 21 | "provider": "jsdelivr", 22 | "library": "bootstrap@3.4.1", 23 | "files": ["dist/**/*.*"], 24 | "destination": "lib/bootstrap/" 25 | }, 26 | { 27 | "library": "jquery-validation-unobtrusive@3.2.12", 28 | "files": ["jquery.validate.unobtrusive.js"], 29 | "destination": "lib/jquery-validation-unobtrusive/" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "TargetFrameworkOverride": { 5 | "isHidden": "true", 6 | "longName": "target-framework-override", 7 | "shortName": "" 8 | }, 9 | "Framework": { 10 | "longName": "framework" 11 | }, 12 | "skipRestore": { 13 | "longName": "no-restore", 14 | "shortName": "" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "CZEMacLeod", 4 | "classifications": [ "Web", "System.Web", "Razor", "Library" ], 5 | "identity": "MSBuild.SDK.SystemWeb.RazorLibrary.CS", 6 | "groupIdentity": "MSBuild.SDK.SystemWeb.RazorLibrary", 7 | "name": "ASP.Net 4.x Razor Library", 8 | "shortName": "systemwebrazorlib", 9 | "tags": { 10 | "language": "C#", 11 | "type": "project" 12 | }, 13 | "sourceName": "RazorSystemWeb", 14 | "preferNameDirectory": true, 15 | "primaryOutputs": [ 16 | { "path": "RazorSystemWeb.csproj" } 17 | ], 18 | "symbols": { 19 | "AssemblyGuid": { 20 | "type": "generated", 21 | "generator": "guid", 22 | "replaces": "(assemblyguid)", 23 | "parameters": { 24 | "format": "D" 25 | } 26 | }, 27 | "Framework": { 28 | "type": "parameter", 29 | "description": "The target framework for the project.", 30 | "datatype": "choice", 31 | "choices": [ 32 | { 33 | "choice": "net48", 34 | "description": "Target .Net Framework 4.8" 35 | } 36 | ], 37 | "replaces": "net48", 38 | "defaultValue": "net48" 39 | }, 40 | "copyrightYear": { 41 | "type": "generated", 42 | "generator": "now", 43 | "replaces": "(copyrightYear)", 44 | "parameters": { 45 | "format": "yyyy" 46 | } 47 | }, 48 | "skipRestore": { 49 | "type": "parameter", 50 | "datatype": "bool", 51 | "description": "If specified, skips the automatic restore of the project on create.", 52 | "defaultValue": "false" 53 | } 54 | }, 55 | "defaultName": "RazorClassLibrary1", 56 | "postActions": [ 57 | { 58 | "condition": "(!skipRestore)", 59 | "description": "Restore NuGet packages required by this project.", 60 | "manualInstructions": [ 61 | { 62 | "text": "Run 'dotnet restore'" 63 | } 64 | ], 65 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", 66 | "continueOnError": true 67 | } 68 | ] 69 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/.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 | }, 6 | "description": { 7 | "text": "A project template for creating an ASP.NET 4.x Razor Class Library. This template does not have any content in it." 8 | }, 9 | "order": 1, 10 | "icon": "vs-2017.3/WebApplication.png", 11 | "learnMoreLink": "https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb", 12 | "isApi": false, 13 | "minFullFrameworkVersion": "4.6.1" 14 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/.template.config/vs-2017.3/WebApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/.template.config/vs-2017.3/WebApplication.png -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/App_Start/RazorGeneratorMvcStart.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.WebPages; 4 | using RazorGenerator.Mvc; 5 | 6 | [assembly: WebActivatorEx.PostApplicationStartMethod( 7 | typeof(ExampleRazorLibrary.RazorGeneratorMvcStart), 8 | nameof(ExampleRazorLibrary.RazorGeneratorMvcStart.Start) 9 | )] 10 | 11 | namespace ExampleRazorLibrary 12 | { 13 | public static class RazorGeneratorMvcStart 14 | { 15 | public static void Start() 16 | { 17 | var engine = new PrecompiledMvcEngine(typeof(RazorGeneratorMvcStart).Assembly) 18 | { 19 | UsePhysicalViewsIfNewer = HttpContext.Current.Request.IsLocal 20 | }; 21 | 22 | ViewEngines.Engines.Insert(0, engine); 23 | 24 | // StartPage lookups are done by WebPages. 25 | VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | // Setting ComVisible to false makes the types in this assembly not visible 4 | // to COM components. If you need to access a type in this assembly from 5 | // COM, set the ComVisible attribute to true on that type. 6 | [assembly: ComVisible(false)] 7 | 8 | // The following GUID is for the ID of the typelib if this project is exposed to COM 9 | [assembly: Guid("(assemblyguid)")] 10 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/RazorSystemWeb.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | 5 | 6 | Copyright © (copyrightYear) 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/Views/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.CS/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "TargetFrameworkOverride": { 5 | "isHidden": "true", 6 | "longName": "target-framework-override", 7 | "shortName": "" 8 | }, 9 | "Framework": { 10 | "longName": "framework" 11 | }, 12 | "skipRestore": { 13 | "longName": "no-restore", 14 | "shortName": "" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "CZEMacLeod", 4 | "classifications": [ "Web", "System.Web", "Razor", "Library" ], 5 | "identity": "MSBuild.SDK.SystemWeb.RazorLibrary.VB", 6 | "groupIdentity": "MSBuild.SDK.SystemWeb.RazorLibrary", 7 | "name": "ASP.Net 4.x Razor Library", 8 | "shortName": "systemwebrazorlib", 9 | "tags": { 10 | "language": "VB", 11 | "type": "project" 12 | }, 13 | "sourceName": "RazorSystemWeb", 14 | "preferNameDirectory": true, 15 | "primaryOutputs": [ 16 | { "path": "RazorSystemWeb.vbproj" } 17 | ], 18 | "symbols": { 19 | "AssemblyGuid": { 20 | "type": "generated", 21 | "generator": "guid", 22 | "replaces": "(assemblyguid)", 23 | "parameters": { 24 | "format": "D" 25 | } 26 | }, 27 | "Framework": { 28 | "type": "parameter", 29 | "description": "The target framework for the project.", 30 | "datatype": "choice", 31 | "choices": [ 32 | { 33 | "choice": "net48", 34 | "description": "Target .Net Framework 4.8" 35 | } 36 | ], 37 | "replaces": "net48", 38 | "defaultValue": "net48" 39 | }, 40 | "copyrightYear": { 41 | "type": "generated", 42 | "generator": "now", 43 | "replaces": "(copyrightYear)", 44 | "parameters": { 45 | "format": "yyyy" 46 | } 47 | }, 48 | "skipRestore": { 49 | "type": "parameter", 50 | "datatype": "bool", 51 | "description": "If specified, skips the automatic restore of the project on create.", 52 | "defaultValue": "false" 53 | } 54 | }, 55 | "defaultName": "RazorClassLibrary1", 56 | "postActions": [ 57 | { 58 | "condition": "(!skipRestore)", 59 | "description": "Restore NuGet packages required by this project.", 60 | "manualInstructions": [ 61 | { 62 | "text": "Run 'dotnet restore'" 63 | } 64 | ], 65 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", 66 | "continueOnError": true 67 | } 68 | ] 69 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/.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 | }, 6 | "description": { 7 | "text": "A project template for creating an ASP.NET 4.x Razor Class Library. This template does not have any content in it." 8 | }, 9 | "order": 1, 10 | "icon": "vs-2017.3/WebApplication.png", 11 | "learnMoreLink": "https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb", 12 | "isApi": false, 13 | "minFullFrameworkVersion": "4.6.1" 14 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/.template.config/vs-2017.3/WebApplication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/.template.config/vs-2017.3/WebApplication.png -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/App_Start/RazorGeneratorMvcStart.vb: -------------------------------------------------------------------------------- 1 | Imports System.Web.WebPages 2 | Imports RazorGenerator.Mvc 3 | 4 | 8 | 9 | Namespace RazorSystemWeb 10 | Public NotInheritable Class RazorGeneratorMvcStart 11 | Private Sub New() 12 | 13 | End Sub 14 | 15 | Public Shared Sub Start() 16 | Dim engine = New PrecompiledMvcEngine(GetType(RazorGeneratorMvcStart).Assembly) With 17 | { 18 | .UsePhysicalViewsIfNewer = HttpContext.Current.Request.IsLocal 19 | } 20 | 21 | ViewEngines.Engines.Insert(0, engine) 22 | 23 | '' StartPage lookups are done by WebPages. 24 | VirtualPathFactoryManager.RegisterVirtualPathFactory(engine) 25 | End Sub 26 | End Class 27 | End Namespace 28 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Runtime.InteropServices 2 | 3 | 4 | 5 | ' The following GUID is for the ID of the typelib if this project is exposed to COM 6 | 7 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/RazorSystemWeb.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net48 4 | 5 | 6 | Copyright © (copyrightYear) 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/Views/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/templates/RazorLibrary.SystemWeb.VB/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb.Templates/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/v3.3.37/src/NerdBank.GitVersioning/version.schema.json", 3 | "inherit": true, 4 | "version": "4.0" 5 | } -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb/MSBuild.SDK.SystemWeb.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net472 4 | Provides targets for projects that target System.Web. 5 | MSBuild;MSBuildSdk;System.Web 6 | true 7 | MSBuildSdk 8 | README.md 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZEMacLeod/MSBuild.SDK.SystemWeb/86f997eb55138bae70232c3776b2033fb5f1e6bc/src/MSBuild.SDK.SystemWeb/README.md -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb/Sdk/MSBuild.SDK.SystemWeb.DefaultItems.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(DefaultItemExcludes);**\*.asax;*.asax 5 | $(DefaultItemExcludes);**\*.ascx;*.ascx 6 | $(DefaultItemExcludes);**\*.ashx;*.ashx 7 | $(DefaultItemExcludes);**\*.asmx;*.asmx 8 | $(DefaultItemExcludes);**\*.aspx;*.aspx 9 | $(DefaultItemExcludes);**\*.master;*.master 10 | $(DefaultItemExcludes);**\*.svc;*.svc 11 | $(DefaultItemExcludes);web.config;web.*.config 12 | 13 | $(DefaultWebFormsItemExcludes); 14 | $(DefaultWebFormsItemExcludes)$([MSBuild]::EnsureTrailingSlash($(OutputPath)))** 15 | $(DefaultWebFormsItemExcludes);$([MSBuild]::EnsureTrailingSlash($(PackageLocation)))** 16 | $(DefaultWebFormsItemExcludes);$([MSBuild]::EnsureTrailingSlash($(BaseIntermediateOutputPath)))** 17 | 18 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb/Sdk/MSBuild.SDK.SystemWeb.DefaultPackages.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | $(ExcludeASPNetCompilers) 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb/Sdk/MSBuild.SDK.SystemWeb.DefaultPackages.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | false 7 | true 8 | 9 | 10 | 11 | $(PkgMicrosoft_Net_Compilers_Toolset)\tasks\net472 12 | 13 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb/Sdk/Sdk.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | true 4 | 5 | 6 | 7 | Library 8 | bin\ 9 | false 10 | false 11 | true 12 | web.config 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb/Sdk/Sdk.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | true 11 | false 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 15.0 20 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 21 | $(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/MSBuild.SDK.SystemWeb/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/v3.3.37/src/NerdBank.GitVersioning/version.schema.json", 3 | "inherit": true, 4 | "version": "4.0", 5 | "buildNumberOffset": 0 6 | } -------------------------------------------------------------------------------- /version.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/v3.3.37/src/NerdBank.GitVersioning/version.schema.json", 3 | "version": "4.0", 4 | "publicReleaseRefSpec": [ 5 | "^refs/heads/main$", // we release out of main 6 | "^refs/heads/rel/v\\d+\\.\\d+" // we also release tags starting with rel/N.N 7 | ], 8 | "nugetPackageVersion": { 9 | "semVer": 2 10 | }, 11 | "buildNumberOffset": 11 12 | } --------------------------------------------------------------------------------