Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fine-tune msbuild snippets #30

Merged
merged 2 commits into from
Jan 29, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 175 additions & 15 deletions snippets/msbuild-project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Load Metapackage for ASP.NET Core": {
"prefix": "msbuild-metapackage-aspnetcore",
"ASP.NET Core Metapackage": {
"prefix": "aspnetcore-metapackage",
"body": [
"<ItemGroup>",
" <PackageReference Include=\"Microsoft.AspNetCore.All\" Version=\"${1:2.0.5}\" />",
Expand All @@ -9,8 +9,153 @@
],
"description": "Load Metapackage for ASP.NET Core"
},
"ASP.NET Core Full Packages": {
"prefix": "aspnetcore-metapackage-full",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought - perhaps you might want to make the prefix something like aspnetcore-full rather than including the term metapackage in the prefix? Might improve discoverability by helping consumers understand why they'd choose one over the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. 👍

"body": [
"<ItemGroup Condition=\"'$(TargetFramework)' == 'netcoreapp2.0'\">",
" <PackageReference Include=\"Microsoft.AspNetCore\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Antiforgery\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.ApplicationInsights.HostingStartup\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.Cookies\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.Core\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.Facebook\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.Google\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.JwtBearer\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.MicrosoftAccount\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.OAuth\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.OpenIdConnect\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authentication.Twitter\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authorization\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Authorization.Policy\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.AzureAppServices.HostingStartup\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.AzureAppServicesIntegration\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.CookiePolicy\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Cors\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Cryptography.Internal\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Cryptography.KeyDerivation\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.DataProtection\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.DataProtection.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.DataProtection.AzureStorage\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.DataProtection.Extensions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Diagnostics\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Diagnostics.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Hosting\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Hosting.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Hosting.Server.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Html.Abstractions\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Http\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Http.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Http.Extensions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Http.Features\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.HttpOverrides\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Identity\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Identity.EntityFrameworkCore\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.JsonPatch\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Localization\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Localization.Routing\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.MiddlewareAnalysis\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Abstractions\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.ApiExplorer\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Core\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Cors\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.DataAnnotations\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Formatters.Json\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Formatters.Xml\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Localization\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Razor\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Razor.Extensions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Razor.ViewCompilation\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.RazorPages\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.TagHelpers\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Mvc.ViewFeatures\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.NodeServices\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Owin\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Razor\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Razor.Language\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Razor.Runtime\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.ResponseCaching\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.ResponseCaching.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.ResponseCompression\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Rewrite\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Routing\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Routing.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Server.HttpSys\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Server.IISIntegration\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Server.Kestrel\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Server.Kestrel.Core\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Server.Kestrel.Https\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.Session\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.SpaServices\" Version=\"2.0.2\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.StaticFiles\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.WebSockets\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.AspNetCore.WebUtilities\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.CodeAnalysis.Razor\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.Data.Sqlite\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Data.Sqlite.Core\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.EntityFrameworkCore\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.EntityFrameworkCore.Design\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.EntityFrameworkCore.InMemory\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.EntityFrameworkCore.Relational\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.EntityFrameworkCore.SqlServer\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.EntityFrameworkCore.Sqlite\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.EntityFrameworkCore.Sqlite.Core\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.EntityFrameworkCore.Tools\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.Extensions.Caching.Abstractions\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Caching.Memory\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Caching.Redis\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Caching.SqlServer\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.Abstractions\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.AzureKeyVault\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.Binder\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.CommandLine\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.EnvironmentVariables\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.FileExtensions\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.Ini\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.Json\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.UserSecrets\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Configuration.Xml\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.DependencyInjection\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.DependencyInjection.Abstractions\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.DiagnosticAdapter\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.FileProviders.Abstractions\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.FileProviders.Composite\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.FileProviders.Embedded\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.FileProviders.Physical\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.FileSystemGlobbing\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Hosting.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.Extensions.Identity.Core\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.Extensions.Identity.Stores\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.Extensions.Localization\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.Extensions.Localization.Abstractions\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.Extensions.Logging\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Logging.Abstractions\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Logging.AzureAppServices\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Logging.Configuration\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Logging.Console\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Logging.Debug\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Logging.EventSource\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Logging.TraceSource\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.ObjectPool\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Options\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Options.ConfigurationExtensions\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.Primitives\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Extensions.WebEncoders\" Version=\"2.0.0\" />",
" <PackageReference Include=\"Microsoft.Net.Http.Headers\" Version=\"2.0.1\" />",
" <PackageReference Include=\"Microsoft.VisualStudio.Web.BrowserLink\" Version=\"2.0.1\" />",
"</ItemGroup>",
""
],
"description": "Load Metapackage for ASP.NET Core"
},
"Microsoft.DotNet.Watcher.Tools": {
"prefix": "msbuild-dotnet-watcher-tools",
"prefix": "dotnet-watcher-tools",
"body": [
"<ItemGroup>",
" <DotNetCliToolReference Include=\"Microsoft.DotNet.Watcher.Tools\" Version=\"${1:2.0.0}\" />",
Expand All @@ -20,7 +165,7 @@
"description": "Load DotNetCliToolReference for Microsoft.DotNet.Watcher.Tools"
},
"Set to IsTransformWebConfigDisabled": {
"prefix": "msbuild-iis-deployment",
"prefix": "iis-deployment",
"body": [
"<PropertyGroup>",
" <IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>",
Expand All @@ -30,23 +175,38 @@
"description": "Enable IIS Deployment Settings"
},
"NuGet Properties": {
"prefix": "msbuild-nuget-properties",
"prefix": "nuget-properties",
"body": [
"<PropertyGroup>",
" <Company>${1:MyCompany Inc}</Company>",
" <Authors>${2:Your Name}</Authors>",
" <Version>${3:1.0.0}</Version>",
" <Description>${4:Description}</Description>",
" <IncludeSymbols>${5:true}</IncludeSymbols>",
" <IncludeSource>${6:true}</IncludeSource>",
" <GeneratePackageOnBuild>${7:false}</GeneratePackageOnBuild>",
" <PackageId>${1:PackageId}</PackageId>",
" <Title>${1}</Title>",
" <Version>${2:1.0.0}</Version>",
" <Authors>${3:Your Name}</Authors>",
" <Company>${4:MyCompany Inc}</Company>",
" <Product>${5:Product Name}</Product>",
" <Description>${6:Package Description}</Description>",
" <Copyright>${7:© MyCompany Corporation. All rights reserved.}</Copyright>",

" <PackageLicenseUrl>${8:http://Your.License.Url}</PackageLicenseUrl>",
" <PackageProjectUrl>${9:http://Your.Project.Url}</PackageProjectUrl>",
" <PackageIconUrl>${10:http://Your.Icon.Url}</PackageIconUrl>",
" <PackageTags>${11:space-separated tag list}</PackageTags>",
" <PackageReleaseNotes>${12:http://Your.ReleaseNotes.Url}</PackageReleaseNotes>",
" <PackageRequireLicenseAcceptance>${13|false,true|}</PackageRequireLicenseAcceptance>",

" <RepositoryUrl>${14:https://github.com/user/repo}</RepositoryUrl>",
" <RepositoryType>${15}</RepositoryType>",

" <IncludeSymbols>${16|true,false|}</IncludeSymbols>",
" <IncludeSource>${17|true,false|}</IncludeSource>",
" <GeneratePackageOnBuild>${18|false,true|}</GeneratePackageOnBuild>",
"</PropertyGroup>",
""
],
"description": "Enable IIS Deployment Settings"
"description": "MSBuild NuGet Properties"
},
"Multi-Targeting PropertyGroup in .NET Standard": {
"prefix": "msbuild-multi-targeting-propertygroup",
"prefix": "multi-targeting-propertygroup",
"body": [
"<PropertyGroup Condition=\"'$(TargetFramework)' == '${1|net471,net47,net462,net461,net461,net46,net452,net451,net45,net403,net40,net35,net20,net11,netcoreapp2.0,netcoreapp1.1,netcoreapp1.0,netstandard2.0,netstandard1.6,netstandard1.5,netstandard1.4,netstandard1.3,netstandard1.2,netstandard1.1,netstandard1.0|}'\">",
" $0",
Expand All @@ -56,7 +216,7 @@
"description": "Multi-Targeting PropertyGroup in .NET Standard"
},
"Multi-Targeting ItemGroup in .NET Standard": {
"prefix": "msbuild-multi-targeting-itemgroup",
"prefix": "multi-targeting-itemgroup",
"body": [
"<ItemGroup Condition=\"'$(TargetFramework)' == '${1|net471,net47,net462,net461,net461,net46,net452,net451,net45,net403,net40,net35,net20,net11,netcoreapp2.0,netcoreapp1.1,netcoreapp1.0,netstandard2.0,netstandard1.6,netstandard1.5,netstandard1.4,netstandard1.3,netstandard1.2,netstandard1.1,netstandard1.0|}'\">",
" $0",
Expand Down