diff --git a/.appveyor.yml b/.appveyor.yml index 711303fa0f..018881c604 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,7 +2,7 @@ init: - git config --global core.autocrlf true branches: only: - - dev + - master - /^release\/.*$/ - /^(.*\/)?ci-.*$/ build_script: diff --git a/.travis.yml b/.travis.yml index e75fe73221..d56301c453 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ os: osx_image: xcode8.2 branches: only: - - dev + - master - /^release\/.*$/ - /^(.*\/)?ci-.*$/ before_install: diff --git a/.vsts-pipelines/builds/ci-internal.yml b/.vsts-pipelines/builds/ci-internal.yml index dc7b8a3cb9..c2c5336fd0 100644 --- a/.vsts-pipelines/builds/ci-internal.yml +++ b/.vsts-pipelines/builds/ci-internal.yml @@ -7,7 +7,7 @@ resources: - repository: buildtools type: git name: aspnet-BuildTools - ref: refs/heads/release/2.2 + ref: refs/heads/master phases: - template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/.vsts-pipelines/builds/ci-public.yml b/.vsts-pipelines/builds/ci-public.yml index f5087d9c30..507c89b025 100644 --- a/.vsts-pipelines/builds/ci-public.yml +++ b/.vsts-pipelines/builds/ci-public.yml @@ -9,7 +9,7 @@ resources: type: github endpoint: DotNet-Bot GitHub Connection name: aspnet/BuildTools - ref: refs/heads/release/2.2 + ref: refs/heads/master phases: - template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/README.md b/README.md index 775ed6bd0c..babc35f1d9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ASP.NET Core MVC **Note: For ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core), see https://github.com/aspnet/AspNetWebStack** -Travis: [![Travis](https://travis-ci.org/aspnet/Mvc.svg?branch=release/2.2)](https://travis-ci.org/aspnet/Mvc) +Travis: [![Travis](https://travis-ci.org/aspnet/Mvc.svg?branch=master)](https://travis-ci.org/aspnet/Mvc) ASP.NET Core MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and gives you full control over markup for enjoyable, agile development. ASP.NET Core MVC includes many features that enable fast, TDD-friendly development for creating sophisticated applications that use the latest web standards. diff --git a/benchmarkapps/BasicApi/benchmarks.json b/benchmarkapps/BasicApi/benchmarks.json index aff5eb280d..2ebc74dde2 100644 --- a/benchmarkapps/BasicApi/benchmarks.json +++ b/benchmarkapps/BasicApi/benchmarks.json @@ -7,7 +7,7 @@ "PresetHeaders": "Json", "ReadyStateText": "Application started.", "Source": { - "BranchOrCommit": "release/2.2", + "BranchOrCommit": "dev", "Project": "benchmarkapps/BasicApi/BasicApi.csproj", "Repository": "https://github.com/aspnet/mvc.git" } @@ -19,20 +19,20 @@ }, "BasicApi.GetUsingQueryString": { "ClientProperties": { - "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/release/2.2/benchmarkapps/BasicApi/getWithToken.lua" + "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/dev/benchmarkapps/BasicApi/getWithToken.lua" }, "Path": "/pet/findByStatus", "Query": "?status=available" }, "BasicApi.GetUsingRouteValue": { "ClientProperties": { - "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/release/2.2/benchmarkapps/BasicApi/getWithToken.lua" + "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/dev/benchmarkapps/BasicApi/getWithToken.lua" }, "Path": "/pet/-1" }, "BasicApi.GetUsingRouteValueWithoutAuthorization": { "ClientProperties": { - "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/release/2.2/benchmarkapps/BasicApi/getWithToken.lua" + "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/dev/benchmarkapps/BasicApi/getWithToken.lua" }, "Path": "/pet/anonymous/-1" }, @@ -41,7 +41,7 @@ }, "BasicApi.Post": { "ClientProperties": { - "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/release/2.2/benchmarkapps/BasicApi/postJsonWithToken.lua" + "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/dev/benchmarkapps/BasicApi/postJsonWithToken.lua" }, "Path": "/pet" }, diff --git a/benchmarkapps/BasicViews/benchmarks.json b/benchmarkapps/BasicViews/benchmarks.json index 6a50d9386d..82e0812a21 100644 --- a/benchmarkapps/BasicViews/benchmarks.json +++ b/benchmarkapps/BasicViews/benchmarks.json @@ -7,7 +7,7 @@ "PresetHeaders": "Html", "ReadyStateText": "Application started.", "Source": { - "BranchOrCommit": "release/2.2", + "BranchOrCommit": "dev", "Project": "benchmarkapps/BasicViews/BasicViews.csproj", "Repository": "https://github.com/aspnet/mvc.git" } @@ -20,19 +20,19 @@ }, "BasicViews.Post": { "ClientProperties": { - "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/release/2.2/benchmarkapps/BasicViews/postWithToken.lua" + "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/dev/benchmarkapps/BasicViews/postWithToken.lua" }, "Path": "/Home/Index" }, "BasicViews.PostIgnoringToken": { "ClientProperties": { - "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/release/2.2/benchmarkapps/BasicViews/postWithToken.lua" + "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/dev/benchmarkapps/BasicViews/postWithToken.lua" }, "Path": "/Home/IndexWithoutToken" }, "BasicViews.PostWithoutToken": { "ClientProperties": { - "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/release/2.2/benchmarkapps/BasicViews/post.lua" + "Scripts": "https://raw.githubusercontent.com/aspnet/Mvc/dev/benchmarkapps/BasicViews/post.lua" }, "Path": "/Home/IndexWithoutToken" } diff --git a/build/dependencies.props b/build/dependencies.props index 84f3631ef7..a2f537f41d 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -7,7 +7,7 @@ is not otherwise referenced. They avoid unnecessary changes to the Universe build graph or to product dependencies. Do not use these properties elsewhere. --> - + 0.9.9 0.10.13 2.1.1 @@ -16,97 +16,97 @@ 0.43.0 2.1.1.1 2.1.1 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-a-preview3-22cors-16556 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-a-alpha1-master-16559 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 2.0.0 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-a-preview3-address-scheme-17059 - 2.2.0-a-preview3-address-scheme-17059 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 5.2.6 15.6.82 2.8.0 2.8.0 - 2.2.0-preview3-35359 + 3.0.0-alpha1-10617 1.7.0 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.1.0 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-preview1-26907-05 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 2.0.9 2.1.3 - 2.2.0-preview3-26927-02 - 2.2.0-preview3-35359 - 2.2.0-preview3-35359 + 2.2.0-preview2-26905-02 + 3.0.0-alpha1-10617 + 3.0.0-alpha1-10617 15.6.1 - 4.7.49 + 4.10.0 2.0.3 1.0.1 11.0.2 - 4.5.0 - 4.5.0 + 4.6.0-preview1-26907-04 + 4.6.0-preview1-26907-04 4.3.2 - 4.5.1 + 4.6.0-preview1-26907-04 0.10.0 2.3.1 2.4.0 diff --git a/build/repo.props b/build/repo.props index 3bd17f1b84..d1a3039193 100644 --- a/build/repo.props +++ b/build/repo.props @@ -3,6 +3,7 @@ true + true @@ -14,7 +15,6 @@ Internal.AspNetCore.Universe.Lineup - 2.2.0-* https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json diff --git a/global.json b/global.json index b5a5299b58..ffa7db4c53 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "version": "2.2.100-preview2-009404" }, "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "2.2.0-preview2-20181003.2" + "Internal.AspNetCore.Sdk": "3.0.0-alpha1-20181011.11" } } diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 783131ae5e..27b605e3c6 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview2-20181003.2 -commithash:41935e62d7853060283c801f49992e2c73a95927 +version:3.0.0-alpha1-20181011.11 +commithash:f57aa8ddda0abdd74ada55853587bedb4f364065 diff --git a/korebuild.json b/korebuild.json index d217d06e3e..8a276a7f35 100644 --- a/korebuild.json +++ b/korebuild.json @@ -1,4 +1,4 @@ { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.2/tools/korebuild.schema.json", - "channel": "release/2.2" + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", + "channel": "master" } diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs index c468e5280c..6f377c3dd4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs @@ -162,9 +162,8 @@ namespace Microsoft.AspNetCore.Mvc.Routing // Perf: In most of the common cases, GenerateUrl is called with a null protocol, host and fragment. // In such cases, we might not need to build any URL as the url generated is mostly same as the virtual path available in pathData. - // For such common cases, this FastGenerateUrl method saves a string allocation per GenerateUrl call. - string url; - if (TryFastGenerateUrl(protocol, host, virtualPath, fragment, out url)) + // For such common cases, this FastGenerateUrl method saves a string allocation per GenerateUrl call. + if (TryFastGenerateUrl(protocol, host, virtualPath, fragment, out string url)) { return url; } diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTestsBase.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTestsBase.cs index 6ee37de064..67b43e3940 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTestsBase.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/RoutingTestsBase.cs @@ -1328,6 +1328,24 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests Assert.Equal(actionName, result.Action); } + [Fact] + public async Task RazorPage_WithLinks_GeneratesLinksCorrectly() + { + // Arrange & Act + var response = await Client.GetAsync("http://localhost/PageWithLinks"); + + // Assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + var document = await response.GetHtmlDocumentAsync(); + + var editLink = document.RequiredQuerySelector("#editlink"); + Assert.Equal("/Edit/10", editLink.GetAttribute("href")); + + var contactLink = document.RequiredQuerySelector("#contactlink"); + Assert.Equal("/Home/Contact", contactLink.GetAttribute("href")); + } + [Fact] public async Task CanRunMiddlewareAfterRouting() { diff --git a/test/WebSites/RoutingWebSite/Pages/Edit.cshtml b/test/WebSites/RoutingWebSite/Pages/Edit.cshtml new file mode 100644 index 0000000000..b7f2033dc9 --- /dev/null +++ b/test/WebSites/RoutingWebSite/Pages/Edit.cshtml @@ -0,0 +1,3 @@ +@page "{id}" + +Hello from Edit page diff --git a/test/WebSites/RoutingWebSite/Pages/PageWithLinks.cshtml b/test/WebSites/RoutingWebSite/Pages/PageWithLinks.cshtml new file mode 100644 index 0000000000..660d9443f4 --- /dev/null +++ b/test/WebSites/RoutingWebSite/Pages/PageWithLinks.cshtml @@ -0,0 +1,8 @@ +@page +@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" +@{ +} + +Edit +
+Contact diff --git a/version.props b/version.props index 0f03397e5d..575dd6248e 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@  - 2.2.0 - rtm + 3.0.0 + alpha1 t000 a- @@ -9,5 +9,13 @@ $(VersionPrefix)-$(VersionSuffix)-final $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) $(VersionSuffix)-$(BuildNumber) + + 0.3.0 + alpha1 + + $(ExperimentalVersionPrefix) + $(ExperimentalVersionPrefix)-$(ExperimentalVersionSuffix)-final + $(FeatureBranchVersionPrefix)$(ExperimentalVersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) + $(ExperimentalVersionSuffix)-$(BuildNumber)