Merge build infrastructure changes from rel/2.0.3
Changes: - Replaces PackageLineup with the dependencies.props approach to manage package versions. - Generate the csproj/fsproj files that go into template packages - Remove the DependencyUpdater and PullRequestSubmitter tasks - Remove bower.json and bowerrc from Microsoft.DotNet.Web.ProjectTemplates - Set MyGet feeds via MSBuild instead of NuGet.config - Upgrades to the functional tests - Update Selenium - Make it possible to run tests on macOS/linux - Disable test parallelization
This commit is contained in:
commit
aee0d26d67
|
|
@ -7,6 +7,7 @@ branches:
|
|||
- master
|
||||
- release
|
||||
- dev
|
||||
- /^rel\/.*/
|
||||
- /^(.*\/)?ci-.*$/
|
||||
build_script:
|
||||
- ps: .\build.ps1
|
||||
|
|
|
|||
|
|
@ -38,4 +38,3 @@ node_modules
|
|||
.testPublish/
|
||||
.vscode
|
||||
global.json
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"*.json.in": "json",
|
||||
"*.*proj.in": "xml"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.tabSize": 2
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
<Project>
|
||||
<Import Project="version.xml" />
|
||||
<Import Project="TemplateDependencies.props" />
|
||||
<Import Project="version.props" />
|
||||
<Import Project="build\dependencies.props" />
|
||||
<Import Project="build\sources.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
|
||||
<GenerateSourceLinkFile>false</GenerateSourceLinkFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,14 +1 @@
|
|||
<Project InitialTargets="EnsureKoreBuildRestored">
|
||||
<Target Name="EnsureKoreBuildRestored" Condition=" '$(KoreBuildRestoreTargetsImported)' != 'true' AND '$(MSBuildProjectName)' != 'BenchmarkDotNet.Autogenerated'">
|
||||
<PropertyGroup>
|
||||
<_BootstrapperFile Condition=" $([MSBuild]::IsOSUnixLike()) ">build.sh</_BootstrapperFile>
|
||||
<_BootstrapperFile Condition="! $([MSBuild]::IsOSUnixLike()) ">build.cmd</_BootstrapperFile>
|
||||
<_BootstrapperError>
|
||||
Package references have not been pinned. Run './$(_BootstrapperFile) /t:Pin'.
|
||||
Also, you can run './$(_BootstrapperFile) /t:Restore' which will pin *and* restore packages. '$(_BootstrapperFile)' can be found in '$(MSBuildThisFileDirectory)'.
|
||||
</_BootstrapperError>
|
||||
</PropertyGroup>
|
||||
|
||||
<Error Code="KRB1001" Text="$(_BootstrapperError.Trim())" />
|
||||
</Target>
|
||||
</Project>
|
||||
<Project />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
|
||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||
<!-- Restore sources should be defined in build/sources.props. -->
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
These version strings are stamped into the template nupkg packages
|
||||
when the template projects are packed. Plus these dependency versions
|
||||
are used if you run the template projects directly from source.
|
||||
|
||||
If you add a new entry here, be sure to add a corresponding <Substitution>
|
||||
item into ./src/Directory.Build.targets, otherwise your value won't be
|
||||
stamped into the built template nupkg files.
|
||||
|
||||
Entries whose values are taken from @(PackageReference->...) are using
|
||||
whatever version is present in the latest package lineup. These dynamic
|
||||
values can be replaced by hardcoded values (e.g., '2.1.0') when we
|
||||
branch for a release.
|
||||
-->
|
||||
<TemplateDep_Coherence_2_0>2.0.0</TemplateDep_Coherence_2_0>
|
||||
<TemplateDep_Coherence_2_1>@(PackageReference->WithMetadataValue('Identity', 'Microsoft.AspNetCore')->Metadata('Version'))</TemplateDep_Coherence_2_1>
|
||||
<TemplateDep_RuntimeFramework_2_1>2.1.0-preview1-26751</TemplateDep_RuntimeFramework_2_1>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!--
|
||||
These references are here only so that KoreBuild will locate the applicable
|
||||
version in the current lineup and we can then access those versions in the
|
||||
code above.
|
||||
-->
|
||||
<PackageReference Include="Microsoft.AspNetCore" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Web.ItemTe
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TemplatePackages", "TemplatePackages", "{0AD6E692-E423-408C-B523-DAFB19412E4B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyUpdater", "tools\DependencyUpdater\DependencyUpdater.csproj", "{15806338-550D-4418-99AE-42FDAE03808A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaTemplates", "src\Microsoft.AspNetCore.SpaTemplates\Microsoft.AspNetCore.SpaTemplates.csproj", "{01E12D5E-8540-4BC8-9A54-41EDD55E762E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Web.Spa.ProjectTemplates", "src\Microsoft.DotNet.Web.Spa.ProjectTemplates\Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj", "{402E62D1-7FD0-4E07-812C-0E385D98D6D9}"
|
||||
|
|
@ -19,10 +17,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Web.Client
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Web.ProjectTemplates", "src\Microsoft.DotNet.Web.ProjectTemplates\Microsoft.DotNet.Web.ProjectTemplates.csproj", "{260EBA09-DEF5-429C-99BF-90CA1456A576}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{973DC5B6-710B-4FC8-AF20-E94B93859DE8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PullRequestSubmitter", "tools\PullRequestSubmitter\PullRequestSubmitter.csproj", "{AFF8B079-5BA1-4DA8-9EAF-BEC8414F889A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -37,10 +31,6 @@ Global
|
|||
{ABC9D95C-7FBD-4F8D-827A-00942EA3D0C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ABC9D95C-7FBD-4F8D-827A-00942EA3D0C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ABC9D95C-7FBD-4F8D-827A-00942EA3D0C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{15806338-550D-4418-99AE-42FDAE03808A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{15806338-550D-4418-99AE-42FDAE03808A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{15806338-550D-4418-99AE-42FDAE03808A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{15806338-550D-4418-99AE-42FDAE03808A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{01E12D5E-8540-4BC8-9A54-41EDD55E762E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{01E12D5E-8540-4BC8-9A54-41EDD55E762E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{01E12D5E-8540-4BC8-9A54-41EDD55E762E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
|
@ -57,22 +47,16 @@ Global
|
|||
{260EBA09-DEF5-429C-99BF-90CA1456A576}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{260EBA09-DEF5-429C-99BF-90CA1456A576}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{260EBA09-DEF5-429C-99BF-90CA1456A576}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AFF8B079-5BA1-4DA8-9EAF-BEC8414F889A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AFF8B079-5BA1-4DA8-9EAF-BEC8414F889A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AFF8B079-5BA1-4DA8-9EAF-BEC8414F889A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AFF8B079-5BA1-4DA8-9EAF-BEC8414F889A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{ABC9D95C-7FBD-4F8D-827A-00942EA3D0C0} = {0AD6E692-E423-408C-B523-DAFB19412E4B}
|
||||
{15806338-550D-4418-99AE-42FDAE03808A} = {973DC5B6-710B-4FC8-AF20-E94B93859DE8}
|
||||
{01E12D5E-8540-4BC8-9A54-41EDD55E762E} = {0AD6E692-E423-408C-B523-DAFB19412E4B}
|
||||
{402E62D1-7FD0-4E07-812C-0E385D98D6D9} = {0AD6E692-E423-408C-B523-DAFB19412E4B}
|
||||
{1731F6D9-1DFC-49D6-8F28-471194B1962C} = {0AD6E692-E423-408C-B523-DAFB19412E4B}
|
||||
{260EBA09-DEF5-429C-99BF-90CA1456A576} = {0AD6E692-E423-408C-B523-DAFB19412E4B}
|
||||
{AFF8B079-5BA1-4DA8-9EAF-BEC8414F889A} = {973DC5B6-710B-4FC8-AF20-E94B93859DE8}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E9B27B0D-4F85-431B-9C26-80CFE4393D36}
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
<Project>
|
||||
|
||||
<!--
|
||||
The "Pack" target which emits .nupkg files to disk also holds a lock on those file
|
||||
until the whole build process exits [1]. This makes it difficult to perform any
|
||||
subsequent work on the package files, such as moving them or modifying their
|
||||
contents. As a workaround, we cause the nupkgs to be written to a temporary
|
||||
subdirectory, and then after they are emitted, our SubstituteProjectFileVariables
|
||||
task writes its output to the original intended build directory.
|
||||
|
||||
[1] The file locking might be a bug in the NuGet client code. For example, see
|
||||
https://github.com/NuGet/NuGet.Client/blob/63e8539791d4f662efffceb2185ad4510396d76e/src/NuGet.Core/NuGet.Commands/CommandRunners/PackCommandRunner.cs#L135
|
||||
It opens a "PackageArchiveReader" (which in turn uses File.Open to open a file
|
||||
handle) after creating each package, but never close/disposes it.
|
||||
-->
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageDependsOn>RedirectPackageOutputDir;$(PackageDependsOn);RestorePackageOutputDir</PackageDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="RedirectPackageOutputDir">
|
||||
<PropertyGroup>
|
||||
<OrigBuildDir>$(BuildDir)</OrigBuildDir>
|
||||
<BuildDir>$(BuildDir)unversioned\</BuildDir>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="RestorePackageOutputDir">
|
||||
<PropertyGroup>
|
||||
<BuildDir>$(OrigBuildDir)</BuildDir>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="Package Versions">
|
||||
<InternalAspNetCoreSdkPackageVersion>2.1.0-preview1-15553</InternalAspNetCoreSdkPackageVersion>
|
||||
<MicrosoftAspNetCoreAllPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreAllPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>
|
||||
<MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>
|
||||
<MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>
|
||||
<MicrosoftAspNetCoreMvcPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreMvcPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion>
|
||||
<MicrosoftAspNetCorePackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCorePackageVersion>
|
||||
<MicrosoftAspNetCoreSpaServicesPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreSpaServicesPackageVersion>
|
||||
<MicrosoftAspNetCoreStaticFilesPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreStaticFilesPackageVersion>
|
||||
<MicrosoftAspNetCoreTestingPackageVersion>2.1.0-preview1-27424</MicrosoftAspNetCoreTestingPackageVersion>
|
||||
<MicrosoftBuildFrameworkPackageVersion>15.3.409</MicrosoftBuildFrameworkPackageVersion>
|
||||
<MicrosoftBuildUtilitiesCorePackageVersion>15.3.409</MicrosoftBuildUtilitiesCorePackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreDesignPackageVersion>2.1.0-preview1-27424</MicrosoftEntityFrameworkCoreDesignPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>2.1.0-preview1-27424</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>2.1.0-preview1-27424</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>2.1.0-preview1-27424</MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreToolsPackageVersion>2.1.0-preview1-27424</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
||||
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>2.1.0-preview1-27424</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
||||
<MicrosoftExtensionsSecretManagerToolsPackageVersion>2.1.0-preview1-27424</MicrosoftExtensionsSecretManagerToolsPackageVersion>
|
||||
<MicrosoftNETTestSdkPackageVersion>15.3.0</MicrosoftNETTestSdkPackageVersion>
|
||||
<MicrosoftVisualStudioWebBrowserLinkPackageVersion>2.1.0-preview1-27424</MicrosoftVisualStudioWebBrowserLinkPackageVersion>
|
||||
<MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>2.1.0-preview1-27424</MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion>
|
||||
<MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>2.1.0-preview1-27424</MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion>
|
||||
<MicrosoftNETCoreApp20PackageVersion>2.0.0</MicrosoftNETCoreApp20PackageVersion>
|
||||
<NETStandardLibraryPackageVersion>2.0.0</NETStandardLibraryPackageVersion>
|
||||
<SeleniumFirefoxWebDriverPackageVersion>0.19.0</SeleniumFirefoxWebDriverPackageVersion>
|
||||
<SeleniumSupportPackageVersion>3.6.0</SeleniumSupportPackageVersion>
|
||||
<SeleniumWebDriverMicrosoftDriverPackageVersion>16.16299.0</SeleniumWebDriverMicrosoftDriverPackageVersion>
|
||||
<SeleniumWebDriverPackageVersion>3.6.0</SeleniumWebDriverPackageVersion>
|
||||
<SystemSecurityPermissionsPackageVersion>4.4.0</SystemSecurityPermissionsPackageVersion>
|
||||
<XunitAnalyzersPackageVersion>0.7.0</XunitAnalyzersPackageVersion>
|
||||
<XunitPackageVersion>2.3.0</XunitPackageVersion>
|
||||
<XunitRunnerVisualStudioPackageVersion>2.3.0</XunitRunnerVisualStudioPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(DotNetPackageVersionPropsPath)" Condition=" '$(DotNetPackageVersionPropsPath)' != '' " />
|
||||
</Project>
|
||||
|
|
@ -1,23 +1,7 @@
|
|||
<Project>
|
||||
<ItemGroup>
|
||||
<PackageLineup Include="Internal.AspNetCore.Universe.Lineup" Version="2.1.0-*" />
|
||||
<PackageLineup Include="Internal.AspNetCore.Partners.Lineup" Version="2.1.0-*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<NuGetPublishFeed>https://dotnet.myget.org/f/aspnetcore-ci-dev</NuGetPublishFeed>
|
||||
<!-- These properties are use by the automation that updates dependencies.props -->
|
||||
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
|
||||
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json</LineupPackageRestoreSource>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
If this build has a .deps dir supplied by the CI system, use that (and *only* that)
|
||||
// to obtain the package lineup. This ensures we're building and testing against the
|
||||
// specific Coherence build that this Templating repo build is chained to.
|
||||
-->
|
||||
<PropertyGroup Condition="Exists('$(RepositoryRoot).deps\lineups')">
|
||||
<PolicyRestoreSources>$(RepositoryRoot).deps\lineups</PolicyRestoreSources>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="Exists('$(RepositoryRoot).deps\build')">
|
||||
<AdditionalRestoreSources Include="$(RepositoryRoot).deps\build" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
<Project>
|
||||
<Import Project="FixPackageOutputDirs.targets" />
|
||||
|
||||
<UsingTask
|
||||
TaskName="PullRequestSubmitter.PullRequestTask"
|
||||
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\PullRequestSubmitter\bin\Release\netcoreapp2.0\PullRequestSubmitter.dll" />
|
||||
|
||||
<Target Name="PushNuGetPackages">
|
||||
<ItemGroup>
|
||||
<PackagesToPublish Include="$(BuildDir)*.nupkg" />
|
||||
</ItemGroup>
|
||||
<PushNuGetPackages Packages="@(PackagesToPublish)" Feed="$(NuGetPublishFeed)" ApiKey="$(ApiKey)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SendPullRequestToCliRepo">
|
||||
<PropertyGroup>
|
||||
<!-- Read the ASP.NET Core package version from a .deps.json file, because
|
||||
the CI server doesn't otherwise have that information to supply -->
|
||||
<DepsFilePath>$(MSBuildThisFileDirectory)..\tools\DependencyUpdater\bin\Release\netstandard2.0\DependencyUpdater.deps.json</DepsFilePath>
|
||||
<DepsFileContent>$([System.IO.File]::ReadAllText('$(DepsFilePath)'))</DepsFileContent>
|
||||
<AspNetCoreRuntimePackageVersion>$([System.Text.RegularExpressions.Regex]::Match($(DepsFileContent), `\s+"Microsoft.AspNetCore": "([^"]+)"`).Groups[1].Value)</AspNetCoreRuntimePackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PropertyUpdate Include="AspNetCoreRuntimePackageFolderName" NewValue="$(AspNetCoreRuntimePackageFolderName)" />
|
||||
<PropertyUpdate Include="AspNetCoreRuntimePackageVersion" NewValue="$(AspNetCoreRuntimePackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<PullRequestTask
|
||||
ApiToken="$(GitHubApiToken)"
|
||||
UpstreamRepoOwner="$(UpstreamRepoOwner)"
|
||||
UpstreamRepoName="$(UpstreamRepoName)"
|
||||
UpstreamRepoBranch="$(UpstreamRepoBranch)"
|
||||
ForkRepoName="$(ForkRepoName)"
|
||||
ForkRepoBranch="$(ForkRepoBranch)"
|
||||
Message="Update ASP.NET Core to $(AspNetCoreRuntimePackageVersion)"
|
||||
FileToUpdate="build/DependencyVersions.props"
|
||||
PropertyUpdates="@(PropertyUpdate)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<Project>
|
||||
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>
|
||||
|
||||
<PropertyGroup Label="RestoreSources">
|
||||
<RestoreSources>$(DotNetRestoreSources)</RestoreSources>
|
||||
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true' AND '$(AspNetUniverseBuildOffline)' != 'true' ">
|
||||
$(RestoreSources);
|
||||
https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json;
|
||||
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
|
||||
</RestoreSources>
|
||||
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
|
||||
$(RestoreSources);
|
||||
https://api.nuget.org/v3/index.json;
|
||||
</RestoreSources>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
version:2.1.0-preview1-15552
|
||||
commithash:526c2d8d521343e5a29c2a1323925528cb94e873
|
||||
version:2.1.0-preview1-15553
|
||||
commithash:4af2f444ec8cba0faa866dd867370e6aa6df69ea
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json",
|
||||
"channel": "dev"
|
||||
}
|
||||
|
|
@ -2,31 +2,25 @@
|
|||
<Import Project="..\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<EnableApiCheck>false</EnableApiCheck>
|
||||
<EnableDefaultItems>False</EnableDefaultItems>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<IncludeBuildOutput>False</IncludeBuildOutput>
|
||||
<IncludeSource>False</IncludeSource>
|
||||
<NoWarn>2008;8021</NoWarn>
|
||||
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)</PackageVersion>
|
||||
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
|
||||
<PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(MSBuildThisFileDirectory)..\artifacts\build\unversioned\</PackageOutputPath>
|
||||
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
These are not regular projects. They are just wrappers for the .nuspec files in each
|
||||
of the template directories. The project files just provide a convenient way to package
|
||||
the template .nupkgs from MSBuild.
|
||||
|
||||
As such, the projects don't have any dependencies and don't even produce any
|
||||
.NET assemblies on build. So it's not relevant to participate in KoreBuild's lineup
|
||||
system. The following line bypasses lineup verification.
|
||||
-->
|
||||
<KoreBuildRestoreTargetsImported>true</KoreBuildRestoreTargetsImported>
|
||||
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' == 'true'">
|
||||
<!-- So you can make changes and re-run tests within VS without command-line builds -->
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageOutputPath>$(MSBuildThisFileDirectory)..\artifacts\build\</PackageOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)../tools/DependencyUpdater/DependencyUpdater.csproj" />
|
||||
<None Include="Content/**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkPackageVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,26 +1,10 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<IncludeSource>false</IncludeSource>
|
||||
<IncludeSymbols>false</IncludeSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\Directory.Build.targets" />
|
||||
|
||||
<!--
|
||||
Once we've written each template .nupkg file, we modify the ASP.NET references
|
||||
in its .csproj content files, injecting whatever version number exists in
|
||||
the curent build context.
|
||||
-->
|
||||
|
||||
<UsingTask
|
||||
TaskName="DependencyUpdater.SubstituteProjectFileVariables"
|
||||
AssemblyFile="$(MSBuildProjectDirectory)\$(OutputPath)DependencyUpdater.dll" />
|
||||
|
||||
<Target Name="InjectVersionsIntoProjectFilesInPackage" AfterTargets="Pack">
|
||||
<ItemGroup>
|
||||
<Substitution Include="TemplateDep_Coherence_2_0" Value="$(TemplateDep_Coherence_2_0)" />
|
||||
<Substitution Include="TemplateDep_Coherence_2_1" Value="$(TemplateDep_Coherence_2_1)" />
|
||||
<Substitution Include="TemplateDep_RuntimeFramework_2_1" Value="$(TemplateDep_RuntimeFramework_2_1)" />
|
||||
</ItemGroup>
|
||||
<SubstituteProjectFileVariables
|
||||
NupkgFile="$(PackageOutputPath)$(MSBuildProjectName).$(PackageVersion).nupkg"
|
||||
Substitutions="@(Substitution)"
|
||||
OutDir="$(PackageOutputPath)..\" />
|
||||
</Target>
|
||||
|
||||
<Import Project="GenerateContent.targets" />
|
||||
<Import Project="SetPackageProperties.targets" />
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
<Project>
|
||||
<!--
|
||||
Generates content using MSBuild variables.
|
||||
-->
|
||||
|
||||
<Target Name="_PrepareGeneratedContentFilesOutput">
|
||||
<Error Text="You must set OutputPath on GenerateContent items." Condition="@(GeneratedContent->WithMetadataValue('OutputPath','')->Count()) != 0" />
|
||||
<ItemGroup>
|
||||
<GenerateContentInputs Include="$(MSBuildAllProjects);$(MSBuildProjectFullPath)" />
|
||||
<GeneratedContentOutputs Include="%(GeneratedContent.OutputPath)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateContent"
|
||||
DependsOnTargets="_PrepareGeneratedContentFilesOutput"
|
||||
BeforeTargets="CoreCompile"
|
||||
Inputs="@(GeneratedContent);@(GenerateContentInputs)"
|
||||
Outputs="@(GeneratedContentOutputs)">
|
||||
|
||||
<Sdk_GenerateFileFromTemplate
|
||||
TemplateFile="%(GeneratedContent.Identity)"
|
||||
Properties="%(GeneratedContent.Properties)"
|
||||
OutputPath="%(GeneratedContent.OutputPath)">
|
||||
|
||||
<Output TaskParameter="OutputPath" ItemName="FileWrites" />
|
||||
<Output TaskParameter="OutputPath" ItemName="Content" />
|
||||
</Sdk_GenerateFileFromTemplate>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# This file is generated by the build
|
||||
content/*/*.*proj
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
|
|
@ -9,17 +9,17 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--/-:cnd:noEmit -->
|
||||
|
|
@ -54,4 +54,4 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
|
|
@ -9,17 +9,17 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--/-:cnd:noEmit -->
|
||||
|
|
@ -54,4 +54,4 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -1,10 +1,35 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\Directory.Build.props" />
|
||||
<Import Project="..\Directory.Build.targets" />
|
||||
<Project>
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<NuspecFile>Microsoft.AspNetCore.SpaTemplates.nuspec</NuspecFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<!-- Set this last to ensure the properties get the final versions which may be overridden by CI. -->
|
||||
<PropertyGroup>
|
||||
<GeneratedContentProperties>
|
||||
MicrosoftAspNetCoreAllPackageVersion=$(MicrosoftAspNetCoreAllPackageVersion);
|
||||
MicrosoftAspNetCoreMvcPackageVersion=$(MicrosoftAspNetCoreMvcPackageVersion);
|
||||
MicrosoftAspNetCorePackageVersion=$(MicrosoftAspNetCorePackageVersion);
|
||||
MicrosoftAspNetCoreSpaServicesPackageVersion=$(MicrosoftAspNetCoreSpaServicesPackageVersion);
|
||||
MicrosoftAspNetCoreStaticFilesPackageVersion=$(MicrosoftAspNetCoreStaticFilesPackageVersion);
|
||||
MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion=$(MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion);
|
||||
</GeneratedContentProperties>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<GeneratedContent Include="Aurelia-CSharp.csproj.in" OutputPath="content/Aurelia-CSharp/AureliaSpa.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="Knockout-CSharp.csproj.in" OutputPath="content/Knockout-CSharp/KnockoutSpa.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="Vue-CSharp.csproj.in" OutputPath="content/Vue-CSharp/VueSpa.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
</packageTypes>
|
||||
</metadata>
|
||||
<files>
|
||||
<file
|
||||
<file
|
||||
src="content/**/*"
|
||||
exclude="**/node_modules/**;**/bin/**;**/obj/**;**/.vs/**;**/.vscode/**;**/ClientApp/dist/**;**/wwwroot/dist/**"
|
||||
exclude="**/node_modules/**;**/bin/**;**/obj/**;**/.vs/**;**/.vscode/**;**/ClientApp/dist/**;**/wwwroot/dist/**;content/Directory.Build.*"
|
||||
target="Content" />
|
||||
</files>
|
||||
</package>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
|
|
@ -9,17 +9,17 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--/-:cnd:noEmit -->
|
||||
|
|
@ -54,4 +54,4 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -84,4 +84,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
<Project>
|
||||
<Import Project="..\..\..\Directory.Build.targets" />
|
||||
<!--
|
||||
This file intentionally left mostly blank to ensure the template projects
|
||||
are independent from the template package build config.
|
||||
-->
|
||||
</Project>
|
||||
|
|
@ -84,4 +84,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,4 +84,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
"binding": "HostIdentifier"
|
||||
},
|
||||
"NameIsPage": {
|
||||
"type": "computed",
|
||||
"type": "computed",
|
||||
"value": "(name == \"Page\")"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
# This file is generated by the build
|
||||
content/*/*.*proj
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">$(TemplateDep_RuntimeFramework_2_1)</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">$(TemplateDep_RuntimeFramework_2_1)</NETStandardImplicitPackageVersion>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${MicrosoftNETCoreApp20PackageVersion}</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${NETStandardLibraryPackageVersion}</NETStandardImplicitPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -12,10 +12,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">TemplateDep_RuntimeFramework_2_1</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">TemplateDep_RuntimeFramework_2_1</NETStandardImplicitPackageVersion>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${MicrosoftNETCoreApp20PackageVersion}</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${NETStandardLibraryPackageVersion}</NETStandardImplicitPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project>
|
||||
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
|
|
@ -6,4 +8,58 @@
|
|||
<NuspecFile>Microsoft.DotNet.Web.ProjectTemplates.nuspec</NuspecFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<!-- Set this last to ensure the properties get the final versions which may be overridden by CI. -->
|
||||
<PropertyGroup>
|
||||
<GeneratedContentProperties>
|
||||
MicrosoftAspNetCoreAllPackageVersion=$(MicrosoftAspNetCoreAllPackageVersion);
|
||||
MicrosoftAspNetCoreAuthenticationCookiesPackageVersion=$(MicrosoftAspNetCoreAuthenticationCookiesPackageVersion);
|
||||
MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion=$(MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion);
|
||||
MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion=$(MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion);
|
||||
MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion=$(MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion);
|
||||
MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion=$(MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion);
|
||||
MicrosoftAspNetCoreMvcPackageVersion=$(MicrosoftAspNetCoreMvcPackageVersion);
|
||||
MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion=$(MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion);
|
||||
MicrosoftAspNetCorePackageVersion=$(MicrosoftAspNetCorePackageVersion);
|
||||
MicrosoftAspNetCoreStaticFilesPackageVersion=$(MicrosoftAspNetCoreStaticFilesPackageVersion);
|
||||
MicrosoftEntityFrameworkCoreDesignPackageVersion=$(MicrosoftEntityFrameworkCoreDesignPackageVersion);
|
||||
MicrosoftEntityFrameworkCoreSqlitePackageVersion=$(MicrosoftEntityFrameworkCoreSqlitePackageVersion);
|
||||
MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion);
|
||||
MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion=$(MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion);
|
||||
MicrosoftEntityFrameworkCoreToolsPackageVersion=$(MicrosoftEntityFrameworkCoreToolsPackageVersion);
|
||||
MicrosoftExtensionsSecretManagerToolsPackageVersion=$(MicrosoftExtensionsSecretManagerToolsPackageVersion);
|
||||
MicrosoftVisualStudioWebBrowserLinkPackageVersion=$(MicrosoftVisualStudioWebBrowserLinkPackageVersion);
|
||||
MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion=$(MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion);
|
||||
MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion=$(MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion);
|
||||
MicrosoftNETCoreApp20PackageVersion=$(MicrosoftNETCoreApp20PackageVersion);
|
||||
NETStandardLibraryPackageVersion=$(NETStandardLibraryPackageVersion);
|
||||
</GeneratedContentProperties>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<GeneratedContent Include="EmptyWeb-CSharp.csproj.in" OutputPath="content/EmptyWeb-CSharp/Company.WebApplication1.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="EmptyWeb-FSharp.fsproj.in" OutputPath="content/EmptyWeb-FSharp/Company.WebApplication1.fsproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="RazorPagesWeb-CSharp.csproj.in" OutputPath="content/RazorPagesWeb-CSharp/Company.WebApplication1.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="StarterWeb-CSharp.csproj.in" OutputPath="content/StarterWeb-CSharp/Company.WebApplication1.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="StarterWeb-FSharp.fsproj.in" OutputPath="content/StarterWeb-FSharp/Company.WebApplication1.fsproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="WebApi-CSharp.csproj.in" OutputPath="content/WebApi-CSharp/Company.WebApplication1.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="WebApi-FSharp.fsproj.in" OutputPath="content/WebApi-FSharp/Company.WebApplication1.fsproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${MicrosoftNETCoreApp20PackageVersion}</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${NETStandardLibraryPackageVersion}</NETStandardImplicitPackageVersion>
|
||||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-Company.WebApplication1-0ce56475-d1db-490f-8af1-a881ea4fcd2d</UserSecretsId>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True' ">
|
||||
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="${MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="${MicrosoftAspNetCoreAuthenticationCookiesPackageVersion}" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="${MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion}" Condition="'$(OrganizationalAuth)' == 'True' OR '$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="${MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion}" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="${MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion}" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="${MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion}" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="${MicrosoftEntityFrameworkCoreDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqlitePackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="${MicrosoftEntityFrameworkCoreSqlServerPackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsPackageVersion}" PrivateAssets="All" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="${MicrosoftVisualStudioWebBrowserLinkPackageVersion}" Condition="'$(UseBrowserLink)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="${MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(NoTools)' != 'True'">
|
||||
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="${MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion}" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="${MicrosoftExtensionsSecretManagerToolsPackageVersion}" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${MicrosoftNETCoreApp20PackageVersion}</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${NETStandardLibraryPackageVersion}</NETStandardImplicitPackageVersion>
|
||||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502</UserSecretsId>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
</PropertyGroup>
|
||||
<!--#if (IndividualLocalAuth && UseLocalDB) -->
|
||||
|
||||
<!--#endif -->
|
||||
<ItemGroup Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True' ">
|
||||
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="${MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="${MicrosoftAspNetCoreAuthenticationCookiesPackageVersion}" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="${MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion}" Condition="'$(OrganizationalAuth)' == 'True' OR '$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="${MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion}" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="${MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion}" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="${MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion}" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="${MicrosoftEntityFrameworkCoreDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqlitePackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="${MicrosoftEntityFrameworkCoreSqlServerPackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsPackageVersion}" PrivateAssets="All" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="${MicrosoftVisualStudioWebBrowserLinkPackageVersion}" Condition="'$(UseBrowserLink)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="${MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(NoTools)' != 'True'">
|
||||
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="${MicrosoftEntityFrameworkCoreToolsDotNetPackageVersion}" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="${MicrosoftExtensionsSecretManagerToolsPackageVersion}" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,11 +1,10 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">TemplateDep_RuntimeFramework_2_1</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">TemplateDep_RuntimeFramework_2_1</NETStandardImplicitPackageVersion>
|
||||
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${MicrosoftNETCoreApp20PackageVersion}</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${NETStandardLibraryPackageVersion}</NETStandardImplicitPackageVersion>
|
||||
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -17,13 +16,13 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="${MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion}" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">$(TemplateDep_RuntimeFramework_2_1)</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">$(TemplateDep_RuntimeFramework_2_1)</NETStandardImplicitPackageVersion>
|
||||
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${MicrosoftNETCoreApp20PackageVersion}</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${NETStandardLibraryPackageVersion}</NETStandardImplicitPackageVersion>
|
||||
|
||||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502</UserSecretsId>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
|
|
@ -16,17 +16,17 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(OrganizationalAuth)' == 'True' OR '$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="${MicrosoftAspNetCoreAuthenticationJwtBearerPackageVersion}" Condition="'$(OrganizationalAuth)' == 'True' OR '$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="${MicrosoftExtensionsSecretManagerToolsPackageVersion}" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">TemplateDep_RuntimeFramework_2_1</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">TemplateDep_RuntimeFramework_2_1</NETStandardImplicitPackageVersion>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${MicrosoftNETCoreApp20PackageVersion}</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">${NETStandardLibraryPackageVersion}</NETStandardImplicitPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<Project>
|
||||
<Import Project="..\..\..\Directory.Build.targets" />
|
||||
<!--
|
||||
This file intentionally left mostly blank to ensure the template projects
|
||||
are independent from the template package build config.
|
||||
-->
|
||||
</Project>
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/template",
|
||||
"author": "Microsoft",
|
||||
"classifications": ["Web", "Empty"],
|
||||
"classifications": [
|
||||
"Web",
|
||||
"Empty"
|
||||
],
|
||||
"name": "ASP.NET Core Empty",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "An empty project template for creating an ASP.NET Core application. This template does not have any content in it.",
|
||||
|
|
@ -16,16 +19,18 @@
|
|||
},
|
||||
"sourceName": "Company.WebApplication1",
|
||||
"preferNameDirectory": true,
|
||||
"guids": [ "53bc9b9d-9d6a-45d4-8429-2a2761773502" ],
|
||||
"guids": [
|
||||
"53bc9b9d-9d6a-45d4-8429-2a2761773502"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"modifiers": [
|
||||
"modifiers": [
|
||||
{
|
||||
"condition": "(!IncludeLaunchSettings)",
|
||||
"exclude": [
|
||||
"Properties/launchSettings.json"
|
||||
]
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -113,17 +118,23 @@
|
|||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"primaryOutputs": [ { "path": "Company.WebApplication1.csproj" } ],
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "Company.WebApplication1.csproj"
|
||||
}
|
||||
],
|
||||
"defaultName": "WebApplication1",
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{ "text": "Run 'dotnet restore'" }
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"author": "Microsoft",
|
||||
"classifications": ["Web", "Empty"],
|
||||
"classifications": [
|
||||
"Web",
|
||||
"Empty"
|
||||
],
|
||||
"name": "ASP.NET Core Empty",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "An empty project template for creating an ASP.NET Core application. This template does not have any content in it.",
|
||||
|
|
@ -57,17 +60,23 @@
|
|||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"primaryOutputs": [ { "path": "Company.WebApplication1.fsproj" } ],
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "Company.WebApplication1.fsproj"
|
||||
}
|
||||
],
|
||||
"defaultName": "WebApplication1",
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{ "text": "Run 'dotnet restore'" }
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"directory": "wwwroot/lib"
|
||||
}
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/template",
|
||||
"author": "Microsoft",
|
||||
"classifications": [ "Web", "MVC", "Razor Pages" ],
|
||||
"classifications": [
|
||||
"Web",
|
||||
"MVC",
|
||||
"Razor Pages"
|
||||
],
|
||||
"name": "ASP.NET Core Web App",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "A project template for creating an ASP.NET Core application with example ASP.NET Razor Pages content",
|
||||
|
|
@ -33,7 +37,9 @@
|
|||
},
|
||||
{
|
||||
"condition": "(!IndividualLocalAuth || UseLocalDB)",
|
||||
"exclude": [ "app.db" ]
|
||||
"exclude": [
|
||||
"app.db"
|
||||
]
|
||||
},
|
||||
{
|
||||
"condition": "(!IndividualLocalAuth)",
|
||||
|
|
@ -353,14 +359,20 @@
|
|||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"primaryOutputs": [ { "path": "Company.WebApplication1.csproj" } ],
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "Company.WebApplication1.csproj"
|
||||
}
|
||||
],
|
||||
"defaultName": "WebApplication1",
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{ "text": "Run 'dotnet restore'" }
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">$(TemplateDep_RuntimeFramework_2_1)</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">$(TemplateDep_RuntimeFramework_2_1)</NETStandardImplicitPackageVersion>
|
||||
|
||||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-Company.WebApplication1-0ce56475-d1db-490f-8af1-a881ea4fcd2d</UserSecretsId>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True' ">
|
||||
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(OrganizationalAuth)' == 'True' OR '$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(TemplateDep_Coherence_2_1)" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="$(TemplateDep_Coherence_2_1)" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(UseBrowserLink)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(NoTools)' != 'True'">
|
||||
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"name": "asp.net",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"bootstrap": "3.3.7",
|
||||
"jquery": "2.2.0",
|
||||
"jquery-validation": "1.14.0",
|
||||
"jquery-validation-unobtrusive": "3.2.6"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"directory": "wwwroot/lib"
|
||||
}
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/template",
|
||||
"author": "Microsoft",
|
||||
"classifications": ["Web", "MVC"],
|
||||
"classifications": [
|
||||
"Web",
|
||||
"MVC"
|
||||
],
|
||||
"name": "ASP.NET Core Web App (Model-View-Controller)",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "A project template for creating an ASP.NET Core application with example ASP.NET Core MVC Views and Controllers. This template can also be used for RESTful HTTP services.",
|
||||
|
|
@ -33,7 +36,9 @@
|
|||
},
|
||||
{
|
||||
"condition": "(!IndividualAuth || UseLocalDB)",
|
||||
"exclude": [ "app.db" ]
|
||||
"exclude": [
|
||||
"app.db"
|
||||
]
|
||||
},
|
||||
{
|
||||
"condition": "(!IndividualLocalAuth)",
|
||||
|
|
@ -328,14 +333,20 @@
|
|||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"primaryOutputs": [ { "path": "Company.WebApplication1.csproj" } ],
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "Company.WebApplication1.csproj"
|
||||
}
|
||||
],
|
||||
"defaultName": "WebApplication1",
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{ "text": "Run 'dotnet restore'" }
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
|
||||
<RuntimeFrameworkVersion Condition="'$(Framework)' == 'netcoreapp2.0'">$(TemplateDep_RuntimeFramework_2_1)</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition="'$(Framework)' == 'netcoreapp2.0'">$(TemplateDep_RuntimeFramework_2_1)</NETStandardImplicitPackageVersion>
|
||||
|
||||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502</UserSecretsId>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
</PropertyGroup>
|
||||
<!--#if (IndividualLocalAuth && UseLocalDB) -->
|
||||
|
||||
<!--#endif -->
|
||||
<ItemGroup Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True' ">
|
||||
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(OrganizationalAuth)' == 'True' OR '$(IndividualB2CAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(TemplateDep_Coherence_2_1)" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="$(TemplateDep_Coherence_2_1)" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(UseBrowserLink)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="$(TemplateDep_Coherence_2_1)" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(NoTools)' != 'True'">
|
||||
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualLocalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="$(TemplateDep_Coherence_2_1)" Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<img src="~/images/banner3.svg" alt="Package Management" class="img-responsive" />
|
||||
<div class="carousel-caption" role="option">
|
||||
<p>
|
||||
Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp.
|
||||
Bring in libraries from NuGet and npm, and automate tasks using Grunt or Gulp.
|
||||
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409">
|
||||
Learn More
|
||||
</a>
|
||||
|
|
@ -70,7 +70,6 @@
|
|||
<h2>Application uses</h2>
|
||||
<ul>
|
||||
<li>Sample pages using ASP.NET Core MVC</li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li>
|
||||
<li>Theming using <a href="https://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -81,7 +80,6 @@
|
|||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"name": "asp.net",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"bootstrap": "3.3.7",
|
||||
"jquery": "2.2.0",
|
||||
"jquery-validation": "1.14.0",
|
||||
"jquery-validation-unobtrusive": "3.2.6"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/template",
|
||||
"author": "Microsoft",
|
||||
"classifications": ["Web", "MVC"],
|
||||
"classifications": [
|
||||
"Web",
|
||||
"MVC"
|
||||
],
|
||||
"name": "ASP.NET Core Web App (Model-View-Controller)",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "A project template for creating an ASP.NET Core application with example ASP.NET Core MVC Views and Controllers. This template can also be used for RESTful HTTP services.",
|
||||
|
|
@ -58,17 +61,23 @@
|
|||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"primaryOutputs": [ { "path": "Company.WebApplication1.fsproj" } ],
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "Company.WebApplication1.fsproj"
|
||||
}
|
||||
],
|
||||
"defaultName": "WebApplication1",
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{ "text": "Run 'dotnet restore'" }
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<img src="~/images/banner3.svg" alt="Package Management" class="img-responsive" />
|
||||
<div class="carousel-caption" role="option">
|
||||
<p>
|
||||
Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp.
|
||||
Bring in libraries from NuGet and npm, and automate tasks using Grunt or Gulp.
|
||||
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409">
|
||||
Learn More
|
||||
</a>
|
||||
|
|
@ -70,7 +70,6 @@
|
|||
<h2>Application uses</h2>
|
||||
<ul>
|
||||
<li>Sample pages using ASP.NET Core MVC</li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li>
|
||||
<li>Theming using <a href="https://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -81,7 +80,6 @@
|
|||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/template",
|
||||
"author": "Microsoft",
|
||||
"classifications": ["Web", "WebAPI"],
|
||||
"classifications": [
|
||||
"Web",
|
||||
"WebAPI"
|
||||
],
|
||||
"name": "ASP.NET Core Web API",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "A project template for creating an ASP.NET Core application with an example Controller for a RESTful HTTP service. This template can also be used for ASP.NET Core MVC Views and Controllers.",
|
||||
|
|
@ -268,14 +271,20 @@
|
|||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"primaryOutputs": [ { "path": "Company.WebApplication1.csproj" } ],
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "Company.WebApplication1.csproj"
|
||||
}
|
||||
],
|
||||
"defaultName": "WebApplication1",
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{ "text": "Run 'dotnet restore'" }
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"author": "Microsoft",
|
||||
"classifications": ["Web", "WebAPI"],
|
||||
"classifications": [
|
||||
"Web",
|
||||
"WebAPI"
|
||||
],
|
||||
"name": "ASP.NET Core Web API",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "A project template for creating an ASP.NET Core application with an example Controller for a RESTful HTTP service. This template can also be used for ASP.NET Core MVC Views and Controllers.",
|
||||
|
|
@ -57,17 +60,23 @@
|
|||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"primaryOutputs": [ { "path": "Company.WebApplication1.fsproj" } ],
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "Company.WebApplication1.fsproj"
|
||||
}
|
||||
],
|
||||
"defaultName": "WebApplication1",
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{ "text": "Run 'dotnet restore'" }
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# This file is generated by the build
|
||||
content/*/*.*proj
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
|
|
@ -9,17 +9,17 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -59,4 +59,4 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<Project>
|
||||
<!--
|
||||
This file intentionally left blank to ensure the template projects
|
||||
are independent from the template package build config.
|
||||
-->
|
||||
</Project>
|
||||
|
|
@ -1,10 +1,36 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\Directory.Build.props" />
|
||||
<Import Project="..\Directory.Build.targets" />
|
||||
<Project>
|
||||
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<NuspecFile>Microsoft.DotNet.Web.Spa.ProjectTemplates.nuspec</NuspecFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<!-- Set this last to ensure the properties get the final versions which may be overridden by CI. -->
|
||||
<PropertyGroup>
|
||||
<GeneratedContentProperties>
|
||||
MicrosoftAspNetCoreAllPackageVersion=$(MicrosoftAspNetCoreAllPackageVersion);
|
||||
MicrosoftAspNetCorePackageVersion=$(MicrosoftAspNetCorePackageVersion);
|
||||
MicrosoftAspNetCoreMvcPackageVersion=$(MicrosoftAspNetCoreMvcPackageVersion);
|
||||
MicrosoftAspNetCoreSpaServicesPackageVersion=$(MicrosoftAspNetCoreSpaServicesPackageVersion);
|
||||
MicrosoftAspNetCoreStaticFilesPackageVersion=$(MicrosoftAspNetCoreStaticFilesPackageVersion);
|
||||
MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion=$(MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion);
|
||||
</GeneratedContentProperties>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<GeneratedContent Include="Angular-CSharp.csproj.in" OutputPath="content/Angular-CSharp/AngularSpa.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="React-CSharp.csproj.in" OutputPath="content/React-CSharp/ReactSpa.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
<GeneratedContent Include="ReactRedux-CSharp.csproj.in" OutputPath="content/ReactRedux-CSharp/ReactReduxSpa.csproj">
|
||||
<Properties>$(GeneratedContentProperties)</Properties>
|
||||
</GeneratedContent>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
</packageTypes>
|
||||
</metadata>
|
||||
<files>
|
||||
<file
|
||||
<file
|
||||
src="content/**/*"
|
||||
exclude="**/node_modules/**;**/bin/**;**/obj/**;**/.vs/**;**/.vscode/**;**/ClientApp/dist/**;**/wwwroot/dist/**"
|
||||
exclude="**/node_modules/**;**/bin/**;**/obj/**;**/.vs/**;**/.vscode/**;**/ClientApp/dist/**;**/wwwroot/dist/**;content/Directory.Build.*"
|
||||
target="Content" />
|
||||
</files>
|
||||
</package>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
|
|
@ -9,17 +9,17 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -59,4 +59,4 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
|
||||
|
|
@ -9,17 +9,22 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(TemplateDep_Coherence_2_1)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="${MicrosoftAspNetCoreMvcPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="${MicrosoftAspNetCoreSpaServicesPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="${MicrosoftAspNetCoreStaticFilesPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="${MicrosoftVisualStudioWebCodeGenerationToolsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Files not to publish (note that the 'dist' subfolders are re-added below) -->
|
||||
<Content Remove="ClientApp\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--/-:cnd:noEmit -->
|
||||
|
|
@ -46,7 +51,7 @@
|
|||
|
||||
<!-- Include the newly-built files in the publish output -->
|
||||
<ItemGroup>
|
||||
<DistFiles Include="wwwroot\dist\**" />
|
||||
<DistFiles Include="wwwroot\dist\**; ClientApp\dist\**" />
|
||||
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
|
||||
<RelativePath>%(DistFiles.Identity)</RelativePath>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
|
|
@ -54,4 +59,4 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<Project>
|
||||
<Import Project="..\..\..\Directory.Build.targets" />
|
||||
<!--
|
||||
This file intentionally left mostly blank to ensure the template projects
|
||||
are independent from the template package build config.
|
||||
-->
|
||||
</Project>
|
||||
|
|
@ -84,4 +84,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
<Project>
|
||||
<Target Name="SetPackageProperties" BeforeTargets="GenerateNuspec">
|
||||
<PropertyGroup>
|
||||
<NuspecProperties>
|
||||
$(NuspecProperties);
|
||||
version=$(PackageVersion);
|
||||
</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<Project>
|
||||
<Import Project="..\Directory.Build.targets" />
|
||||
<Import Project="GenerateTestProps.targets" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<Project>
|
||||
<Target Name="GenerateTestProps" BeforeTargets="CoreCompile">
|
||||
<Sdk_GenerateFileFromTemplate
|
||||
TemplateFile="$(MSBuildThisFileDirectory)TemplateTests.props.in"
|
||||
Properties="RestoreSources=$([MSBuild]::Escape($(RestoreSources)));RuntimeFrameworkVersion=$(RuntimeFrameworkVersion)"
|
||||
OutputPath="$(OutputPath)TemplateTests.props" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<RestoreSources>${RestoreSources}</RestoreSources>
|
||||
<RuntimeFrameworkVersion>${RuntimeFrameworkVersion}</RuntimeFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
using Xunit;
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Templates.Test
|
||||
|
|
@ -9,10 +13,16 @@ namespace Templates.Test
|
|||
{
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("net461")]
|
||||
public void EmptyWebTemplate_Works(string targetFrameworkOverride)
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public void EmptyWebTemplate_Works_NetFramework()
|
||||
=> EmptyWebTemplateImpl("net461");
|
||||
|
||||
[Fact]
|
||||
public void EmptyWebTemplate_Works_NetCore()
|
||||
=> EmptyWebTemplateImpl(null);
|
||||
|
||||
private void EmptyWebTemplateImpl(string targetFrameworkOverride)
|
||||
{
|
||||
RunDotNetNew("web", targetFrameworkOverride);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
|
|
@ -30,7 +31,7 @@ namespace Templates.Test.Helpers
|
|||
{
|
||||
output.WriteLine("Publishing ASP.NET application...");
|
||||
ProcessEx
|
||||
.Run(output, workingDirectory, "dotnet", "publish -c Release")
|
||||
.Run(output, workingDirectory, DotNetMuxer.MuxerPathOrDefault(), "publish -c Release")
|
||||
.WaitForExit(assertSuccess: true);
|
||||
workingDirectory = Path.Combine(workingDirectory, "bin", "Release", framework, "publish");
|
||||
}
|
||||
|
|
@ -38,7 +39,7 @@ namespace Templates.Test.Helpers
|
|||
{
|
||||
output.WriteLine("Building ASP.NET application...");
|
||||
ProcessEx
|
||||
.Run(output, workingDirectory, "dotnet", "build --no-restore -c Debug")
|
||||
.Run(output, workingDirectory, DotNetMuxer.MuxerPathOrDefault(), "build --no-restore -c Debug")
|
||||
.WaitForExit(assertSuccess: true);
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +57,7 @@ namespace Templates.Test.Helpers
|
|||
if (framework.StartsWith("netcore"))
|
||||
{
|
||||
var dllPath = publish ? $"{projectName}.dll" : $"bin/Debug/{framework}/{projectName}.dll";
|
||||
_process = ProcessEx.Run(output, workingDirectory, "dotnet", $"exec {dllPath}", envVars: envVars);
|
||||
_process = ProcessEx.Run(output, workingDirectory, DotNetMuxer.MuxerPathOrDefault(), $"exec {dllPath}", envVars: envVars);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -74,7 +75,7 @@ namespace Templates.Test.Helpers
|
|||
.FirstOrDefault(line => line.StartsWith(ListeningMessagePrefix, StringComparison.Ordinal));
|
||||
Assert.True(!string.IsNullOrEmpty(listeningMessage), $"ASP.NET process exited without listening for requests.\nOutput: { _process.Output }\nError: { _process.Error }");
|
||||
|
||||
// Verify we have a valid URL to make requests to
|
||||
// Verify we have a valid URL to make requests to
|
||||
var listeningUrlString = listeningMessage.Substring(ListeningMessagePrefix.Length);
|
||||
_listeningUri = new Uri(listeningUrlString, UriKind.Absolute);
|
||||
output.WriteLine($"Detected that ASP.NET application is accepting connections on: {listeningUrlString}");
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ namespace Templates.Test.Helpers
|
|||
}
|
||||
}
|
||||
|
||||
output.WriteLine($"==> {startInfo.FileName} {startInfo.Arguments} [{startInfo.WorkingDirectory}]");
|
||||
var proc = Process.Start(startInfo);
|
||||
|
||||
return new ProcessEx(output, proc);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Templates.Test.Helpers
|
||||
|
|
@ -38,8 +39,8 @@ namespace Templates.Test.Helpers
|
|||
{
|
||||
var proc = ProcessEx.Run(
|
||||
output,
|
||||
Directory.GetCurrentDirectory(),
|
||||
"dotnet",
|
||||
AppContext.BaseDirectory,
|
||||
DotNetMuxer.MuxerPathOrDefault(),
|
||||
$"new --uninstall {packageName}");
|
||||
|
||||
// We don't need this command to succeed, because we'll verify next that
|
||||
|
|
@ -61,8 +62,8 @@ namespace Templates.Test.Helpers
|
|||
output.WriteLine($"Installing templates package {packagePath}...");
|
||||
var proc = ProcessEx.Run(
|
||||
output,
|
||||
Directory.GetCurrentDirectory(),
|
||||
"dotnet",
|
||||
AppContext.BaseDirectory,
|
||||
DotNetMuxer.MuxerPathOrDefault(),
|
||||
$"new --install \"{packagePath}\"");
|
||||
proc.WaitForExit(assertSuccess: true);
|
||||
}
|
||||
|
|
@ -72,7 +73,7 @@ namespace Templates.Test.Helpers
|
|||
private static void VerifyCannotFindTemplate(ITestOutputHelper output, string templateName)
|
||||
{
|
||||
// Verify we really did remove the previous templates
|
||||
var tempDir = Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid().ToString("D"));
|
||||
var tempDir = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName(), Guid.NewGuid().ToString("D"));
|
||||
Directory.CreateDirectory(tempDir);
|
||||
|
||||
try
|
||||
|
|
@ -80,9 +81,11 @@ namespace Templates.Test.Helpers
|
|||
var proc = ProcessEx.Run(
|
||||
output,
|
||||
tempDir,
|
||||
"dotnet",
|
||||
DotNetMuxer.MuxerPathOrDefault(),
|
||||
$"new \"{templateName}\"");
|
||||
proc.WaitForExit(assertSuccess: false);
|
||||
|
||||
proc.WaitForExit(assertSuccess: false);
|
||||
|
||||
if (!proc.Error.Contains($"No templates matched the input template name: {templateName}."))
|
||||
{
|
||||
throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
|
||||
|
|
@ -90,13 +93,13 @@ namespace Templates.Test.Helpers
|
|||
}
|
||||
finally
|
||||
{
|
||||
Directory.Delete(tempDir);
|
||||
Directory.Delete(tempDir, recursive: true);
|
||||
}
|
||||
}
|
||||
|
||||
private static string FindAncestorDirectoryContaining(string filename)
|
||||
{
|
||||
var dir = Directory.GetCurrentDirectory();
|
||||
var dir = AppContext.BaseDirectory;
|
||||
while (dir != null)
|
||||
{
|
||||
if (File.Exists(Path.Combine(dir, filename)))
|
||||
|
|
@ -107,7 +110,7 @@ namespace Templates.Test.Helpers
|
|||
dir = Directory.GetParent(dir)?.FullName;
|
||||
}
|
||||
|
||||
throw new InvalidOperationException($"Could not find any ancestor directory containing {filename} at or above {Directory.GetCurrentDirectory()}");
|
||||
throw new InvalidOperationException($"Could not find any ancestor directory containing {filename} at or above {AppContext.BaseDirectory}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
using System;
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
using Templates.Test.Helpers;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
|
@ -30,7 +35,7 @@ namespace Templates.Test
|
|||
// We don't want any of the host repo's build config interfering with
|
||||
// how the test project is built, so disconnect it from the
|
||||
// Directory.Build.props/targets context
|
||||
File.WriteAllText(Path.Combine(TemplateOutputDir, "Directory.Build.props"), "<Project />");
|
||||
File.WriteAllText(Path.Combine(TemplateOutputDir, "Directory.Build.props"), "<Project><Import Project=\"../../TemplateTests.props\" /></Project>");
|
||||
File.WriteAllText(Path.Combine(TemplateOutputDir, "Directory.Build.targets"), "<Project />");
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +63,7 @@ namespace Templates.Test
|
|||
args += $" -lang {language}";
|
||||
}
|
||||
|
||||
ProcessEx.Run(Output, TemplateOutputDir, "dotnet", args).WaitForExit(assertSuccess: true);
|
||||
ProcessEx.Run(Output, TemplateOutputDir, DotNetMuxer.MuxerPathOrDefault(), args).WaitForExit(assertSuccess: true);
|
||||
}
|
||||
|
||||
protected void RunNpmInstall()
|
||||
|
|
@ -66,7 +71,10 @@ namespace Templates.Test
|
|||
// The first time this runs on any given CI agent it may take several minutes.
|
||||
// If the agent has NPM 5+ installed, it should be quite a lot quicker on
|
||||
// subsequent runs because of package caching.
|
||||
ProcessEx.Run(Output, TemplateOutputDir, "cmd", "/c \"npm install\"").WaitForExit(assertSuccess: true);
|
||||
var (exe, args) = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||
? ("cmd", "/c")
|
||||
: ("bash", "-c");
|
||||
ProcessEx.Run(Output, TemplateOutputDir, exe, args + " \"npm install\"").WaitForExit(assertSuccess: true);
|
||||
}
|
||||
|
||||
protected void AssertDirectoryExists(string path, bool shouldExist)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
using Xunit;
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Templates.Test
|
||||
|
|
@ -9,12 +13,20 @@ namespace Templates.Test
|
|||
{
|
||||
}
|
||||
|
||||
[ConditionalTheory]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
[InlineData(null)]
|
||||
[InlineData("F#")]
|
||||
public void MvcTemplate_NoAuth_Works_NetFramework(string languageOverride)
|
||||
=> MvcTemplate_NoAuthImpl("net461", languageOverride);
|
||||
|
||||
[Theory]
|
||||
[InlineData(/* netcoreapp */ null, /* C# */ null)]
|
||||
[InlineData("net461", /* C# */ null)]
|
||||
[InlineData(/* netcoreapp */ null, "F#")]
|
||||
[InlineData("net461", "F#")]
|
||||
public void MvcTemplate_NoAuth_Works(string targetFrameworkOverride, string languageOverride)
|
||||
[InlineData(null)]
|
||||
[InlineData("F#")]
|
||||
public void MvcTemplate_NoAuth_Works_NetCore(string languageOverride)
|
||||
=> MvcTemplate_NoAuthImpl(null, languageOverride);
|
||||
|
||||
private void MvcTemplate_NoAuthImpl(string targetFrameworkOverride, string languageOverride)
|
||||
{
|
||||
RunDotNetNew("mvc", targetFrameworkOverride, language: languageOverride);
|
||||
|
||||
|
|
@ -42,13 +54,19 @@ namespace Templates.Test
|
|||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("net461")]
|
||||
public void MvcTemplate_IndividualAuth_Works(string targetFrameworkOverride)
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public void MvcTemplate_IndividualAuth_Works_NetFramework()
|
||||
=> MvcTemplate_IndividualAuthImpl("net461");
|
||||
|
||||
[Fact]
|
||||
public void MvcTemplate_IndividualAuth_Works_NetCore()
|
||||
=> MvcTemplate_IndividualAuthImpl(null);
|
||||
|
||||
private void MvcTemplate_IndividualAuthImpl(string targetFrameworkOverride)
|
||||
{
|
||||
RunDotNetNew("mvc", targetFrameworkOverride, auth: "Individual");
|
||||
|
||||
|
||||
AssertDirectoryExists("Extensions", false);
|
||||
AssertFileExists("urlRewrite.config", false);
|
||||
AssertFileExists("Controllers/AccountController.cs", true);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
[assembly: Xunit.CollectionBehavior(DisableTestParallelization = true)]
|
||||
|
|
@ -1,4 +1,8 @@
|
|||
using Xunit;
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Templates.Test
|
||||
|
|
@ -9,13 +13,19 @@ namespace Templates.Test
|
|||
{
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("net461")]
|
||||
public void RazorPagesTemplate_NoAuth_Works(string targetFrameworkOverride)
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public void RazorPagesTemplate_NoAuth_Works_NetFramework()
|
||||
=> RazorPagesTemplate_NoAuthImpl("net461");
|
||||
|
||||
[Fact]
|
||||
public void RazorPagesTemplate_NoAuth_Works_NetCore()
|
||||
=> RazorPagesTemplate_NoAuthImpl(null);
|
||||
|
||||
private void RazorPagesTemplate_NoAuthImpl(string targetFrameworkOverride)
|
||||
{
|
||||
RunDotNetNew("razor", targetFrameworkOverride);
|
||||
|
||||
|
||||
AssertDirectoryExists("Extensions", false);
|
||||
AssertFileExists("Controllers/AccountController.cs", false);
|
||||
|
||||
|
|
@ -37,10 +47,16 @@ namespace Templates.Test
|
|||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("net461")]
|
||||
public void RazorPagesTemplate_IndividualAuth_Works(string targetFrameworkOverride)
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public void RazorPagesTemplate_IndividualAuth_Works_NetFramework()
|
||||
=> RazorPagesTemplate_IndividualAuthImpl("net461");
|
||||
|
||||
[Fact]
|
||||
public void RazorPagesTemplate_IndividualAuth_Works_NetCore()
|
||||
=> RazorPagesTemplate_IndividualAuthImpl(null);
|
||||
|
||||
private void RazorPagesTemplate_IndividualAuthImpl(string targetFrameworkOverride)
|
||||
{
|
||||
RunDotNetNew("razor", targetFrameworkOverride, auth: "Individual");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
using OpenQA.Selenium;
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using OpenQA.Selenium;
|
||||
using Templates.Test.Helpers;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
|
@ -11,17 +15,25 @@ namespace Templates.Test
|
|||
{
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null, "angular")]
|
||||
[InlineData(null, "react")]
|
||||
[InlineData(null, "reactredux")]
|
||||
[InlineData(null, "aurelia")]
|
||||
[InlineData(null, "knockout")]
|
||||
[InlineData(null, "vue")]
|
||||
[ConditionalTheory]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
// Just use 'angular' as representative for .NET 4.6.1 coverage, as
|
||||
// the client-side code isn't affected by the .NET runtime choice
|
||||
[InlineData("net461", "angular")]
|
||||
public void SpaTemplate_Works(string targetFrameworkOverride, string template)
|
||||
[InlineData("angular")]
|
||||
public void SpaTemplate_Works_NetFramework(string template)
|
||||
=> SpaTemplateImpl("net461", template);
|
||||
|
||||
[Theory]
|
||||
[InlineData("angular")]
|
||||
[InlineData("react")]
|
||||
[InlineData("reactredux")]
|
||||
[InlineData("aurelia")]
|
||||
[InlineData("knockout")]
|
||||
[InlineData("vue")]
|
||||
public void SpaTemplate_Works_NetCore(string template)
|
||||
=> SpaTemplateImpl(null, template);
|
||||
|
||||
private void SpaTemplateImpl(string targetFrameworkOverride, string template)
|
||||
{
|
||||
RunDotNetNew(template, targetFrameworkOverride);
|
||||
RunNpmInstall();
|
||||
|
|
|
|||
|
|
@ -2,22 +2,21 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
|
||||
<!-- Workaround for https://github.com/aspnet/BuildTools/issues/392 -->
|
||||
<DisablePackageReferenceVersionRestrictions>true</DisablePackageReferenceVersionRestrictions>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Security.Permissions" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||
<PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" />
|
||||
<PackageReference Include="Selenium.Firefox.WebDriver" Version="0.18.0" NoWarn="KRB4002" />
|
||||
<PackageReference Include="Selenium.Support" Version="3.4.0" NoWarn="NU1701" />
|
||||
<PackageReference Include="Selenium.WebDriver" Version="3.4.0" NoWarn="NU1701" />
|
||||
<PackageReference Include="Selenium.WebDriver.MicrosoftDriver" Version="15.15063.0" NoWarn="KRB4002" />
|
||||
<PackageReference Include="xunit" />
|
||||
<PackageReference Include="xunit.analyzers" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" />
|
||||
<PackageReference Include="Internal.AspNetCore.Sdk" Version="$(InternalAspNetCoreSdkPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(MicrosoftAspNetCoreTestingPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" />
|
||||
<PackageReference Include="Selenium.Firefox.WebDriver" Version="$(SeleniumFirefoxWebDriverPackageVersion)" />
|
||||
<PackageReference Include="Selenium.Support" Version="$(SeleniumSupportPackageVersion)" NoWarn="NU1701" />
|
||||
<PackageReference Include="Selenium.WebDriver.MicrosoftDriver" Version="$(SeleniumWebDriverMicrosoftDriverPackageVersion)" />
|
||||
<PackageReference Include="Selenium.WebDriver" Version="$(SeleniumWebDriverPackageVersion)" NoWarn="NU1701" />
|
||||
<PackageReference Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsPackageVersion)" />
|
||||
<PackageReference Include="xunit" Version="$(XunitPackageVersion)" />
|
||||
<PackageReference Include="xunit.analyzers" Version="$(XunitAnalyzersPackageVersion)" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
using Xunit;
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Templates.Test
|
||||
|
|
@ -9,10 +13,16 @@ namespace Templates.Test
|
|||
{
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("net461")]
|
||||
public void WebApiTemplate_Works(string targetFrameworkOverride)
|
||||
[ConditionalFact]
|
||||
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
|
||||
public void WebApiTemplate_Works_NetFramework()
|
||||
=> WebApiTemplateImpl("net461");
|
||||
|
||||
[Fact]
|
||||
public void WebApiTemplate_Works_NetCore()
|
||||
=> WebApiTemplateImpl(null);
|
||||
|
||||
private void WebApiTemplateImpl(string targetFrameworkOverride)
|
||||
{
|
||||
RunDotNetNew("webapi", targetFrameworkOverride);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<Project Sdk="Microsoft.Net.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<OutputType>Library</OutputType>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Build.Framework" />
|
||||
<PackageReference Include="Microsoft.Build.Utilities.Core" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
|
||||
namespace DependencyUpdater
|
||||
{
|
||||
public class SubstituteProjectFileVariables : Task
|
||||
{
|
||||
private static string[] ProjectFileExtensions = new[]
|
||||
{
|
||||
".csproj",
|
||||
".fsproj"
|
||||
};
|
||||
|
||||
[Required] public string NupkgFile { get; set; }
|
||||
[Required] public string OutDir { get; set; }
|
||||
[Required] public ITaskItem[] Substitutions { get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
// We can't modify the .nupkg in place because the build system still
|
||||
// has a lock on the file. We can read it, but not write it. So copy
|
||||
// to the output location and then modify the copy.
|
||||
var outFile = Path.Combine(OutDir, Path.GetFileName(NupkgFile));
|
||||
File.Copy(NupkgFile, outFile, true);
|
||||
|
||||
var numProjectFiles = 0;
|
||||
using (var zipFile = ZipFile.Open(outFile, ZipArchiveMode.Update))
|
||||
{
|
||||
foreach (var projectFile in zipFile.Entries.Where(IsProjectFile))
|
||||
{
|
||||
numProjectFiles++;
|
||||
PerformVariableSubstitutions(projectFile);
|
||||
}
|
||||
}
|
||||
|
||||
if (numProjectFiles == 0)
|
||||
{
|
||||
Log.LogMessage(
|
||||
MessageImportance.High,
|
||||
$"No project files found in {Path.GetFileName(outFile)}, so no variables substituted.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.LogMessage(
|
||||
MessageImportance.High,
|
||||
$"Substituted variables in {numProjectFiles} project file(s) in {Path.GetFileName(outFile)}");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool IsProjectFile(ZipArchiveEntry entry)
|
||||
{
|
||||
return ProjectFileExtensions.Any(
|
||||
extension => Path.GetExtension(entry.Name).Equals(extension, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
private void PerformVariableSubstitutions(ZipArchiveEntry entry)
|
||||
{
|
||||
using (var fileStream = entry.Open())
|
||||
{
|
||||
string contents;
|
||||
using (var reader = new StreamReader(fileStream))
|
||||
using (var writer = new StreamWriter(fileStream))
|
||||
{
|
||||
contents = reader.ReadToEnd();
|
||||
fileStream.Seek(0, SeekOrigin.Begin);
|
||||
fileStream.SetLength(0);
|
||||
writer.Write(SubstituteVariables(contents));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string SubstituteVariables(string text)
|
||||
{
|
||||
foreach (var item in Substitutions)
|
||||
{
|
||||
text = text.Replace($"$({item.ItemSpec})", item.GetMetadata("Value"));
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
using Octokit;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PullRequestSubmitter.Helpers
|
||||
{
|
||||
static class GitHubUtil
|
||||
{
|
||||
public static async Task<IDictionary<string, NewBlob>> GetEditsToCommit(
|
||||
GitHubClient client, Repository upstreamRepo, string baseSha,
|
||||
IEnumerable<PropertyUpdate> propertyUpdates)
|
||||
{
|
||||
// Find the file to update
|
||||
var existingTree = await client.Git.Tree.GetRecursive(upstreamRepo.Id, baseSha);
|
||||
|
||||
// Update the files' contents
|
||||
var result = new Dictionary<string, NewBlob>();
|
||||
var filesToUpdate = propertyUpdates.GroupBy(p => p.Filename);
|
||||
foreach (var fileToUpdate in filesToUpdate)
|
||||
{
|
||||
var fileContents = await GetFileContentsAsString(
|
||||
client, upstreamRepo, existingTree.Tree, fileToUpdate.Key);
|
||||
|
||||
foreach (var propToUpdate in fileToUpdate)
|
||||
{
|
||||
var propName = propToUpdate.PropertyName;
|
||||
var patternToReplace = new Regex($"<{propName}>[^<]+</{propName}>");
|
||||
if (!patternToReplace.IsMatch(fileContents))
|
||||
{
|
||||
throw new Exception($"The file {fileToUpdate.Key} does not contain a match for regex " + patternToReplace.ToString());
|
||||
}
|
||||
|
||||
fileContents = patternToReplace.Replace(
|
||||
fileContents,
|
||||
$"<{propName}>{propToUpdate.NewValue}</{propName}>");
|
||||
}
|
||||
|
||||
var newBlob = new NewBlob { Content = fileContents, Encoding = EncodingType.Utf8 };
|
||||
result.Add(fileToUpdate.Key, newBlob);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async Task<string> GetLatestCommitSha(
|
||||
GitHubClient client, Repository repo, string branchName)
|
||||
{
|
||||
var commitRef = await client.Git.Reference.Get(
|
||||
repo.Id,
|
||||
$"heads/{branchName}");
|
||||
return commitRef.Object.Sha;
|
||||
}
|
||||
|
||||
public static async Task<string> CommitModifiedFiles(
|
||||
GitHubClient client, Repository toRepo, string toBranchName, string parentCommitSha,
|
||||
IDictionary<string, NewBlob> modifiedFiles, string commitMessage)
|
||||
{
|
||||
// Build and commit a new tree representing the updated state
|
||||
var newTree = new NewTree { BaseTree = parentCommitSha };
|
||||
foreach (var kvp in modifiedFiles)
|
||||
{
|
||||
newTree.Tree.Remove(new NewTreeItem { Path = kvp.Key });
|
||||
newTree.Tree.Add(new NewTreeItem()
|
||||
{
|
||||
Type = TreeType.Blob,
|
||||
Mode = "100644",
|
||||
Sha = (await client.Git.Blob.Create(toRepo.Id, kvp.Value)).Sha,
|
||||
Path = kvp.Key
|
||||
});
|
||||
}
|
||||
var createdTree = await client.Git.Tree.Create(toRepo.Id, newTree);
|
||||
var commit = await client.Git.Commit.Create(
|
||||
toRepo.Id,
|
||||
new NewCommit(commitMessage, createdTree.Sha, parentCommitSha));
|
||||
|
||||
// Update the target branch to point to the new commit
|
||||
await client.Git.Reference.Update(
|
||||
toRepo.Id,
|
||||
$"heads/{toBranchName}",
|
||||
new ReferenceUpdate(commit.Sha, force: true));
|
||||
|
||||
return commit.Sha;
|
||||
}
|
||||
|
||||
public static async Task<Issue> FindExistingPullRequestToUpdate(
|
||||
GitHubClient client, User currentUser, Repository upstreamRepo,
|
||||
Repository forkRepo, string forkBranch)
|
||||
{
|
||||
// Search for candidate PRs (same author, still open, etc.)
|
||||
var fromBaseRef = $"{forkRepo.Owner.Login}:{forkBranch}";
|
||||
var searchInRepos = new RepositoryCollection();
|
||||
searchInRepos.Add(upstreamRepo.Owner.Login, upstreamRepo.Name);
|
||||
var searchRequest = new SearchIssuesRequest
|
||||
{
|
||||
Repos = searchInRepos,
|
||||
Type = IssueTypeQualifier.PullRequest,
|
||||
Author = currentUser.Login,
|
||||
State = ItemState.Open
|
||||
};
|
||||
var searchResults = await client.Search.SearchIssues(searchRequest);
|
||||
|
||||
// Of the candidates, find the highest-numbered one that is requesting a
|
||||
// pull from the same fork and branch. GitHub only allows there to be one
|
||||
// of these at any given time, but we're more likely to find it faster
|
||||
// by searching from newest to oldest.
|
||||
var candidates = searchResults.Items.OrderByDescending(item => item.Number);
|
||||
foreach (var prInfo in candidates)
|
||||
{
|
||||
var pr = await client.PullRequest.Get(upstreamRepo.Id, prInfo.Number);
|
||||
if (pr.Head?.Repository?.Id == forkRepo.Id && pr.Head?.Ref == forkBranch)
|
||||
{
|
||||
return prInfo;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static async Task<PullRequest> CreateNewPullRequest(
|
||||
GitHubClient client, Repository upstreamRepo, string upstreamBranch,
|
||||
Repository forkRepo, string forkBranch, string prBodyText)
|
||||
{
|
||||
var fromBaseRef = $"{forkRepo.Owner.Login}:{forkBranch}";
|
||||
var newPr = new NewPullRequest(
|
||||
prBodyText,
|
||||
fromBaseRef,
|
||||
upstreamBranch);
|
||||
return await client.PullRequest.Create(upstreamRepo.Id, newPr);
|
||||
}
|
||||
|
||||
public static async Task UpdateExistingPullRequestTitle(
|
||||
GitHubClient client, Repository upstreamRepo, int prNumber, string newTitle)
|
||||
{
|
||||
var updateInfo = new PullRequestUpdate { Title = newTitle };
|
||||
await client.PullRequest.Update(upstreamRepo.Id, prNumber, updateInfo);
|
||||
}
|
||||
|
||||
private static async Task<string> GetFileContentsAsString(
|
||||
GitHubClient client, Repository repo, IReadOnlyList<TreeItem> tree, string path)
|
||||
{
|
||||
var existingFile = tree.FirstOrDefault(item => item.Path == path);
|
||||
var blob = await client.Git.Blob.Get(repo.Id, existingFile.Sha);
|
||||
|
||||
switch (blob.Encoding.Value)
|
||||
{
|
||||
case EncodingType.Utf8:
|
||||
return blob.Content;
|
||||
case EncodingType.Base64:
|
||||
return Encoding.UTF8.GetString(Convert.FromBase64String(blob.Content));
|
||||
default:
|
||||
throw new InvalidDataException($"Unsupported encoding: {blob.Encoding.StringValue}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
namespace PullRequestSubmitter.Helpers
|
||||
{
|
||||
class PropertyUpdate
|
||||
{
|
||||
public string Filename { get; set; }
|
||||
public string PropertyName { get; set; }
|
||||
public string NewValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Build.Framework" />
|
||||
<PackageReference Include="Microsoft.Build.Utilities.Core" />
|
||||
<PackageReference Include="Octokit" Version="0.26.0" NoWarn="KRB4002" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
using Microsoft.Build.Framework;
|
||||
using Octokit;
|
||||
using PullRequestSubmitter.Helpers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PullRequestSubmitter
|
||||
{
|
||||
public class PullRequestTask : Microsoft.Build.Utilities.Task
|
||||
{
|
||||
[Required] public string ApiToken { get; set; }
|
||||
[Required] public string UpstreamRepoOwner { get; set; }
|
||||
[Required] public string UpstreamRepoName { get; set; }
|
||||
[Required] public string UpstreamRepoBranch { get; set; }
|
||||
[Required] public string ForkRepoName { get; set; }
|
||||
[Required] public string ForkRepoBranch { get; set; }
|
||||
[Required] public string Message { get; set; }
|
||||
[Required] public string FileToUpdate { get; set; }
|
||||
[Required] public ITaskItem[] PropertyUpdates { get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
return ExecuteAsync().Result;
|
||||
}
|
||||
|
||||
private IEnumerable<PropertyUpdate> GetPropertyUpdates()
|
||||
{
|
||||
return PropertyUpdates.Select(item => new PropertyUpdate
|
||||
{
|
||||
Filename = FileToUpdate,
|
||||
PropertyName = item.ItemSpec,
|
||||
NewValue = item.GetMetadata("NewValue")
|
||||
});
|
||||
}
|
||||
|
||||
private async Task<bool> ExecuteAsync()
|
||||
{
|
||||
var client = new GitHubClient(new ProductHeaderValue("PullRequestSubmitter"))
|
||||
{
|
||||
Credentials = new Credentials(ApiToken),
|
||||
};
|
||||
|
||||
// Find the upstream repo and determine what edits we want to make
|
||||
LogHigh($"Finding upstream repo: {UpstreamRepoOwner}/{UpstreamRepoName}...");
|
||||
var upstreamRepo = await client.Repository.Get(UpstreamRepoOwner, UpstreamRepoName);
|
||||
var upstreamCommitSha = await GitHubUtil.GetLatestCommitSha(client, upstreamRepo, UpstreamRepoBranch);
|
||||
LogHigh($"Found upstream commit to update: {upstreamCommitSha} ({UpstreamRepoBranch})");
|
||||
var editsToCommit = await GitHubUtil.GetEditsToCommit(
|
||||
client, upstreamRepo, upstreamCommitSha, GetPropertyUpdates());
|
||||
if (editsToCommit.Any())
|
||||
{
|
||||
var filesList = string.Join('\n',
|
||||
editsToCommit.Select(e => " - " + e.Key));
|
||||
LogHigh($"Will apply edits to file(s):\n{filesList}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.LogError("Found no edits to apply. Aborting.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Commit the edits into the fork repo, updating its head to point to a new tree
|
||||
// formed by updating the tree from the upstream SHA
|
||||
var currentUser = await client.User.Current();
|
||||
LogHigh($"Finding fork repo: {currentUser.Login}/{ForkRepoName}...");
|
||||
var forkRepo = await client.Repository.Get(currentUser.Login, ForkRepoName);
|
||||
var newCommitSha = await GitHubUtil.CommitModifiedFiles(
|
||||
client,
|
||||
forkRepo,
|
||||
ForkRepoBranch,
|
||||
upstreamCommitSha,
|
||||
editsToCommit,
|
||||
Message);
|
||||
LogHigh($"Committed edits. {currentUser.Login}/{ForkRepoName} branch {ForkRepoBranch} is now at {newCommitSha}");
|
||||
|
||||
// If applicable, submit a new PR
|
||||
LogHigh($"Checking if there is already an open PR we can update...");
|
||||
var prToUpdate = await GitHubUtil.FindExistingPullRequestToUpdate(
|
||||
client, currentUser, upstreamRepo, forkRepo, ForkRepoBranch);
|
||||
if (prToUpdate == null)
|
||||
{
|
||||
LogHigh($"No existing open PR found. Creating new PR...");
|
||||
var newPr = await GitHubUtil.CreateNewPullRequest(
|
||||
client, upstreamRepo, UpstreamRepoBranch, forkRepo, ForkRepoBranch, Message);
|
||||
LogHigh($"Created pull request #{newPr.Number} at {newPr.HtmlUrl}");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHigh($"Found existing PR #{prToUpdate.Number}. Updating details...");
|
||||
await GitHubUtil.UpdateExistingPullRequestTitle(
|
||||
client, upstreamRepo, prToUpdate.Number, Message);
|
||||
LogHigh($"Finished updating PR #{prToUpdate.Number} at {prToUpdate.HtmlUrl}");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void LogHigh(string message)
|
||||
{
|
||||
Log.LogMessage(MessageImportance.High, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>2.1.0</VersionPrefix>
|
||||
<VersionSuffix>preview1</VersionSuffix>
|
||||
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersion>
|
||||
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
|
||||
<BuildNumber Condition="'$(BuildNumber)' == ''">t000</BuildNumber>
|
||||
<VersionSuffix Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
|
||||
<VersionSuffix Condition="'$(VersionSuffix)' != '' And '$(VersionMetadata)' != ''">$(VersionSuffix)+$(VersionMetadata)</VersionSuffix>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<!-- This file may be overwritten by automation. -->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<KoreBuildChannel>dev</KoreBuildChannel>
|
||||
<VersionPrefix>2.1.0</VersionPrefix>
|
||||
<VersionSuffix>preview1</VersionSuffix>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue