Commit Graph

619 Commits

Author SHA1 Message Date
Pranav K b93bc433db
Make AuthorizeFilter work in endpoint routing (#9099)
* Make AuthorizeFilter work in endpoint routing

Fixes https://github.com/aspnet/AspNetCore/issues/8387
2019-04-08 06:03:34 -07:00
James Newton-King 69f4b6d227
Add StartupAnalzyer (#9100) 2019-04-06 18:25:19 +13:00
Pranav K fb037bda01
Set CSharpLangVersion during runtime compilation (#9135)
* Set CSharpLangVersion during runtime compilation

* Pass CSharpLangVersion inferred by the CSharpCompiler to RazorEngine
* Set GenerateRazorHostingAssemblyInfo in Razor.RuntimeCompilation
targets
* Unskip failing test

Fixes https://github.com/aspnet/AspNetCore/issues/8996
2019-04-05 21:24:50 -07:00
Doug Bunting 1b50085835
Chain coherent dependencies up through Extensions to EF Core packages (#8877)
* Chain coherent dependencies up through Extensions to EF Core packages
- should reduce incoherent PRs we get from `darc`
- react to AspNetCore-Tooling breaking changes
  - use C# Preview version in Blazor integration tests
    - update `EnsureOptions_ConfiguresDefaultParseOptions` test to match new C# version default
  - react to new newline encoding behavior; thanx @ajaybhargavb!
  - update product code and tests to use new GetItem API; thanx @NTaylorMullen!
    - RazorProjectFileSystem breaking change
    - update ref assemblies
- react to EF Core breaking changes
  - react to EF Core method rename
  - react to aspnet/EntityFrameworkCore@ccfc5edbc7
  - react to aspnet/EntityFrameworkCore@6cb41531df breaking change
    - disable new analyzer in `ScratchDatabaseFixture`
- skip `MvcTemplate_NoAuthImplAsync(...)` test for F#
  - #8996
- exclude some runtime assemblies from crossgen; thanx @BrennanConroy!
- add direct references to Mvc in AzureAD samples
  - unclear why the reference is no longer pulled in transitively

* Run `darc` to grab the latest
- CoreFx packages with version 4.6.0-preview4.19204.1 to ensure coherency
- core-setup packages with version 3.0.0-preview4-27604-05 to ensure coherency
- Extensions packages with verisn 3.0.0-preview4.19204.2 to ensure coherency
- EntityFrameworkCore packages with version 3.0.0-preview4.19204.7 from build 20190404.7
- AspNetCore-Tooling packages with version 3.0.0-preview4.19204.2 from build 20190404.2
2019-04-05 10:54:04 -07:00
Ryan Nowak 258d34e382
Use coventional routes for link generation (#9037)
Use coventional routes for link generation

This change enables using conventional routes for link generation when
using MVC conventional routes. This change makes MVC link generation
behaviour highly compatible with 2.1.

The way that this works is that we create endpoints for **MATCHING**
using the denormalized conventional route, but we tell those endpoints
to suppress link generation.

For link generation we generate a non-matching endpoints per-route with
the same order value.

I added the concept of *required value any* to link generation. This is
needed because for an endpoint to participate in link generation using
RouteValuesAddress it needs to have some required values. These details
are a little fiddly, but I think it's worth doing this feature
completely.
2019-04-05 08:31:10 -07:00
Martin Costello 0f0a388eab Extend WebApplicationFactory<T> (#7414)
* Support host-agnostic services access

* Support host agnostic access to the IServiceCollection associated with
      WebApplicationFactory<T>.
2019-04-05 00:21:48 +02:00
Javier Calvarro Nelson b9e600a45c
Renames for blazor server-side, inclusion in shared framework, and other renaming fixes (#9001)
* Move contents of Microsoft.AspNetCore.Components.Services namespace to Microsoft.AspNetCore.Components
* Rename Components to Blazor
* Make Blazor server-side part of the shared framework.
2019-04-04 21:36:36 +02:00
Doug Bunting edb91d0f4d
Include `%(DocumentName)` when invoking the default document generator tool (#8982)
- #8319

* Skip dotnet-watch `RenameCompiledFile()` test
    - #8987

* Quote path and name arguments of `dotnet-getdocument` command
2019-04-02 22:22:19 -07:00
Pranav K 1b868323e8
Add a System.Text.Json based TempDataSerializer (#8874)
* Add a System.Text.Json based TempDataSerializer

* Update DefaultTempDataSerializer
* Add common tests for DefaultTempDataSerializer & BsonTempDataSerializer
* Remove uses of NewtonsoftJson in tests solely required for temp-data support

Fixes https://github.com/aspnet/AspNetCore/issues/7255
2019-04-02 10:34:50 -07:00
Javier Calvarro Nelson 8499a27c7f
[Components] Relayer + Robust reconnect (#8911)
* [MVC][Components] Prerendering + Robust reconnect
* Relayers prerendering support on a separate package on top of MVC and
  components.
* Implements robust reconects with acknowledgements from the client.
* Improves interactive prerendering with the ability to reconnect to
  prerendered components.
* Removes the need to register components statically when prerendering
  them.
* Removes the need of using an element selector when prerendering an
  interactive component.
* Updates the templates to use the new fallback routing pattern and
  reenables the components test.
* Adds eslint to the Typescript project to help maintain a consistent
  style.
* Adds logging to support better debugging based on the pattern used by
  signalr.
* Fixes exception handling on the server to always report exceptions correctly to the client.
2019-04-02 19:17:03 +02:00
Doug Bunting 91dcbd44c1
Remove build-time service reference download feature (#8981)
- #7500
- skip dotnet-watch `RenameCompiledFile()` test
    - #8987
2019-04-02 09:24:27 -07:00
Pranav K ff313901de
Mark Mvc analyzers as non-shipping (#8968)
Since these analyzers are now available via the WebSDK, we no longer
need to ship these.

Follow up to https://github.com/aspnet/AspNetCore/issues/4373
2019-04-01 15:52:15 -07:00
Justin Kotalik df3a702190 Update the SDK (#8670) 2019-04-01 15:18:18 -07:00
Ryan Nowak 284e968101 Add AddControllers and AddRazorPages
These are *new style* for configuring MVC in services. We're adding these to make
things feel a bit more tailored to those particular scenarios.

----

The main reason for this is that we've had repeated community asks for an
*API-optimized* way of configuring MVC. I don't think that using AddMvcCore
is a suitable building block, because it has too many options that you want.

I've think I've identified the reasonable set of features that should be part
of the default experience for APIs. All of these things are already pay-for-play
and are activated by the presence of attributes. The only additional cost is
loading of assemblies and a few additional inspections of the attributes
(cached).

----

Additionally the AddControllers experience is composible. You can add views
to it, or add pages and get the whole thing.

AddRazorPages is basically an alias for what AddMvc does today. We don't
currently have a way to add pages without controllers (the opposite is true).
Based on feedback we could specialize this more.

----

Branding and perception are important, and we've users ask for more flexibility
in what gets added. The plan is to update the templates to use this experience
in preview4, and see what kind of feedback we get.
2019-03-29 18:51:10 -07:00
Ryan Nowak 658b37d2bd
Make UseEndpoints a thing (#8765)
* Make endpoint middleware explicit

This change makes the endpoint middleware explicit again, and updates
all of the templates.

The other change here is make UseEndpoints be the place where you
register endpoints. This is vital because it puts your code visually at
the point of the pipeline where it executes.

Lastly, I removed support for UseMvc with endpoint routing. This is
causing issues for some security features, and we're moving in the
direction of trying to make the middleware heavy implementation required
in 3.0. There are some issues we won't be able to fix in MVC if we can't
unambiguously know if UseMvc was used or the middleware.
2019-03-28 15:41:11 -07:00
Pranav K cb6fb32529
Make building Components & Mvc solutions work out of the box (#8830)
* Make building Components & Mvc solutions work out of the box

Fixes https://github.com/aspnet/AspNetCore/issues/8413
2019-03-27 09:27:11 -07:00
Pranav K 5f6caf3650 Set properties required for runtime compilation in RuntimeCompilation package
Fixes https://github.com/aspnet/AspNetCore/issues/7966
2019-03-26 09:59:23 -07:00
Ryan Brandenburg 70cd5f5f9f
Mark tests flaky instead of skipped (#8727)
Mark tests flaky instead of skipped
2019-03-26 09:51:37 -07:00
Pranav K 9a35bbea03
Experience for Razor SDK (#8731)
* Experience for Razor SDK

* Remove Components.Build
* Update MVC projects and templates to use AddRazorSupportForMvc
* Update components templates to use .razor extension

Fixes https://github.com/aspnet/AspNetCore/issues/6392

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190321.3

- Microsoft.NET.Sdk.Razor - 3.0.0-preview4.19171.3
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview4.19171.3
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview4.19171.3
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview4.19171.3

* Update dependencies from https://github.com/dotnet/core-setup build 20190322.01

- Microsoft.NETCore.App - 3.0.0-preview4-27522-01

Dependency coherency updates

- Microsoft.Bcl.Json.Sources - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- Microsoft.CSharp - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- Microsoft.Win32.Registry - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.ComponentModel.Annotations - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Data.SqlClient - 4.7.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Diagnostics.EventLog - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.IO.Pipelines - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Net.Http.WinHttpHandler - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Reflection.Metadata - 1.7.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Runtime.CompilerServices.Unsafe - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Security.Cryptography.Cng - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Security.Cryptography.Pkcs - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Security.Cryptography.Xml - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Security.Permissions - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Security.Principal.Windows - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.ServiceProcess.ServiceController - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Text.Encodings.Web - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- System.Threading.Channels - 4.6.0-preview4.19164.7 (parent: Microsoft.NETCore.App)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview4-27522-01 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.Platforms - 3.0.0-preview4.19164.7 (parent: Microsoft.NETCore.App)

* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190321.4

- Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview4.19171.4
- Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview4.19171.4
- dotnet-ef - 3.0.0-preview4.19171.4
- Microsoft.EntityFrameworkCore - 3.0.0-preview4.19171.4
- Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview4.19171.4
- Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview4.19171.4
- Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview4.19171.4

* Update dependencies from https://github.com/aspnet/Extensions build 20190321.4

- Mono.WebAssembly.Interop - 3.0.0-preview4.19171.4
- Microsoft.JSInterop - 3.0.0-preview4.19171.4
- Microsoft.Internal.Extensions.Refs - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview4.19171.4
- Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview4.19171.4
- Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.DependencyInjection - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.Xml - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.Json - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.Ini - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview4.19171.4
- Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration - 3.0.0-preview4.19171.4
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Caching.Memory - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview4.19171.4
- Microsoft.AspNetCore.Testing - 3.0.0-preview4.19171.4
- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview4.19171.4
- Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview4.19171.4
- Internal.AspNetCore.Analyzers - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Configuration.Binder - 3.0.0-preview4.19171.4
- Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview4.19171.4
- Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview4.19171.4
- Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview4.19171.4
- Microsoft.Extensions.WebEncoders - 3.0.0-preview4.19171.4
- Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview4.19171.4
- Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Primitives - 3.0.0-preview4.19171.4
- Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Options - 3.0.0-preview4.19171.4
- Microsoft.Extensions.ObjectPool - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging.Testing - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging.EventSource - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging.Debug - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging.Console - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging.Configuration - 3.0.0-preview4.19171.4
- Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview4.19171.4
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview4.19171.4
- Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Hosting - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Http - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Localization - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview4.19171.4
- Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview4.19171.4

* Grab latest from other aspnet repos
- brings everything into coherence
- aspnet/Extensions packages with version 3.0.0-preview4.19172.1 from build 20190322.1
- aspnet/AspNetCore-Tooling packages with version 3.0.0-preview4.19172.2 from build 20190322.2
- aspnet/EntityFrameworkCore packages with version 3.0.0-preview4.19172.3 from build 20190322.3
2019-03-22 17:33:20 -07:00
Sebastien Ros 6d93a74a2c One more value 2019-03-22 16:49:09 -07:00
Sebastien Ros 1fb26a6467 Fixing NETCore.App version in benchmarks 2019-03-22 16:49:09 -07:00
Pranav K f5ff181222
System.Text.Json based formatters (#8362)
* System.Text.Json based formatters

Fixes: https://github.com/aspnet/AspNetCore/issues/7256
2019-03-21 13:45:21 -07:00
Chirag Rupani aa89639d62 Removed Content Type header for response when no content is being returned (#8557)
Addresses #8230
2019-03-20 13:15:42 -07:00
Ryan Nowak b743ba2f66 Throw unhandled exceptions during prerendering
Fixes: #8609

Currently exceptions thrown during prerendering are simply logged. This
change uses the existing *unhandled exception* mechanism of the
renderer/circuit to throw these. The result is that the developer
exception page just works for prerendering.
2019-03-20 13:02:24 -07:00
mnltejaswini 2a08c6e54d Pass the formatter context to the CreateJsonSerializer. It gives ability to override and create serializer specific to the context (#8358)
* Pass the formatter context to the CreateJsonSerializer so that it gives ability to override and create serializer specific to the context
2019-03-20 12:01:41 -07:00
Doug Bunting 1d1d664ea1
Merge branch 'release/2.2' into master
- no-ops except for
  - Update PatchConfig.props (2835f85b6c)
  - Add some additional logging to ErrorPageMiddlewareWebSite (#8049) (aka 1ca6202e7e)
  - Put MVC's functional tests in a separate test group (#8118) (aka db3795b368)
- ignore the build queue (4f2a0edc97) change because we're not hitting Linux resource issues in `master` branch
- ignore baseline test changes (5661c41909 and d2a4435ac8) because they're not applicable in `master`
2019-03-18 12:36:01 -07:00
Ryan Nowak f303a55a8e Add skeleton to use components + prerendering
This adds the skeleton needed for components + prerendring development
in the MVC sandbox. We don't currently have a sample app for quick and
dirty testing.
2019-03-18 10:18:04 -07:00
James Newton-King 47fab927a1
Add friendly error message to UrlHelper for when there is no IRouter (#8145) 2019-03-15 10:14:07 -07:00
Pranav K 7557cb916b Merge remote-tracking branch 'origin/release/2.1' into prkrishn/merge/2.1 2019-03-14 10:04:38 -07:00
Ryan Nowak 0dc14a61ce Simplify Map methods 2019-03-13 20:12:53 -07:00
Ryan Nowak 4b4614635f Change template -> pattern for MVC 2019-03-13 20:12:53 -07:00
Ryan Nowak e78a6521b9 Make naming of IEndpointRouteBuilderConsistent across usages. 2019-03-13 20:12:53 -07:00
Pranav K 0d10c49823
Make IApiBehaviorMetadata public (#8410)
Fixes https://github.com/aspnet/AspNetCore/issues/8403

The analyzer expects the type to be present. However since it's listed
as internal, it is not present when compiling against the ref assembly \ targeting pack.

It was left as internal so we could evolve it later, but we haven't found a need for it as yet.
2019-03-11 14:25:45 -07:00
sprelog bc009fc0f1 fixing possible NRE, when viewContext is null 2019-03-08 15:02:02 -08:00
Chris Ross ce04a1a723
Allow sync IO for NewtonsoftJsonOutputFormatter #8302 (#8303) 2019-03-07 19:11:35 -08:00
Pranav K 41e6fc8ab0 Use ApplicationPartFactory when adding application parts
Fixes https://github.com/aspnet/AspNetCore/issues/8288
2019-03-07 13:38:31 -08:00
Pranav K 8aa02180fb
Skip tests until we can diagnose failures (#8298) 2019-03-07 13:13:23 -08:00
Ryan Nowak a1ec03e1e6 Add fallback routing for controllers and pages 2019-03-06 09:48:07 -08:00
Ryan Nowak bb28db6fb2 Generalize Action Selection logic
Allows us to use the "select action via route values" logic for
endpoints.
2019-03-06 09:48:07 -08:00
Jeremy Lawrence a1f544b62f Correct doc comment for ApiConventionTypeMatchBehavior (#7861) 2019-03-05 14:43:59 -08:00
shnja 4c3996f824 Use Request.Scheme instead of Protocol (#7911) 2019-03-05 14:39:37 -08:00
Pranav K b41959ac32 Add additional logging to TempDataInCookiesTest to diagnose test failure
Diagnosis for https://github.com/aspnet/AspNetCore-Internal/issues/1803
2019-03-05 12:33:49 -08:00
Pranav K 44c66c8314 Revert "Skipping flaky test"
This reverts commit 680c069554fd2a184b8a3030711aed35d4293c4b.
2019-03-05 12:33:49 -08:00
Ryan Brandenburg 414d8a514f
Add missing doc comments (#8035) 2019-03-05 10:01:20 -08:00
Pranav K 39e52578d3
Make page load async when using endpoint routing (#7938)
* Make page load async

Fixes #8016
2019-03-04 14:45:59 -08:00
Pranav K db3795b368
Put MVC's functional tests in a separate test group (#8118)
Possible fix to https://github.com/aspnet/AspNetCore/issues/7313
One of the characteristics of these failures were that the
test took long to run. The build log has warnings for
several long running tests. This might be a result of CPU
contention since mondo-ification that make MVC's functional tests
run with nearly every other test project in the solution
2019-03-01 17:52:50 -08:00
Pranav K 85c051d8da
Skipping flaky test (#8101) 2019-03-01 13:37:19 -08:00
Pranav K 1ca6202e7e
Add some additional logging to ErrorPageMiddlewareWebSite (#8049)
* Add some additional logging to ErrorPageMiddlewareWebSite

DeveloperExceptionMiddleware will log an error if rendering the exception page
throws. The test failure in https://github.com/aspnet/AspNetCore-Internal/issues/1730
suggests that we encountered an error like so but do not have anything further to go by.

This change adds logging to the test so we could identify possible issues
2019-03-01 10:49:54 -08:00
Ryan Nowak cb21edc500
Fix #7258 - remove components.server dependencies on blazor-specific plumbing (#7934)
* Removes a bunch of trivial usage of Blazor

... in names and comments where we don't specifically mean Blazor.

* Remove obsolete Startup from Components app

* Move UseBlazor into Blazor.Server

Moves UseBlazor and the related features in Blazor.Server - along with
some other general cleanup of misc shared files.

Now Components.Server has a much slimmer set of dependencies (MVC is
gone) and doesn't contain the "double startup" pattern that we
introduced (sorry).

We'll revisit UseBlazor and the dependencies there once the new
MapFallbackToFile support is available from static files.

* minor PR feedback

* Update reference assemblies

* fix broken test
2019-02-28 10:36:07 -08:00
Pranav K f79f2e3b12
Add some reference docs for MVC (#7981) 2019-02-28 09:56:55 -08:00
N. Taylor Mullen f5b6039add Add docs for Microsoft.AspNetCore.Mvc.TagHelpers.
- Also obsoleted two unused members on `ImageTagHelper`.
- Removed `NoWarn` for docs on `Microsoft.AspNetCore.Mvc.TagHelpers`.

Addresses aspnet/Docs/#10593
2019-02-27 15:42:38 -08:00
James Newton-King a6b00f0d0d
Add xml docs to RazorPagesEndpointRouteBuilderExtensions (#7992) 2019-02-28 08:22:44 +13:00
Sébastien Ros fd83f4dbb9
Using <FrameworkReference> in benchmark apps (#7957) 2019-02-27 10:27:01 -08:00
Hao Kung a2c8a34556
Reenable some helix tests (#7763)
* Fix identity UI script tests on helix
* Add OnHelix static helper method
2019-02-25 23:39:46 -08:00
Doug Bunting d515bd977f
Merge branch 'master' into merge/release/3.0-preview3-to-master 2019-02-25 15:56:46 -08:00
Chris Ross ff79e9bda5
Replace EnvironmentName with Environments #7733 (#7899) 2019-02-25 08:13:48 -08:00
Nate McMaster 5c525915cd
Update generated source code 2019-02-24 09:45:27 -08:00
Nate McMaster e02e047dcb
Merge branch 'master' into merge/release/3.0-preview3-to-master 2019-02-24 09:31:17 -08:00
Nate McMaster 1b27c9905c
Update dependencies and react to changes (#7844)
* Add workaround for dotnet/sdk#2976
* Add new restore sources
* Update BAR manifest to point to  https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json
* Obsolete WithCulture
* Add retries to dockerbuild.sh
* Ensure each test run gets a unique in-memory database
2019-02-22 19:09:08 -08:00
Pavel Krymets f1b188611a
Fix generated code (#7883) 2019-02-22 18:15:13 -08:00
Nate McMaster 7fe3b7640d
Merge branch 'release/3.0-preview3' 2019-02-22 15:07:50 -08:00
Ryan Nowak 3d448f7197 Fix #5055 use of page parameter (#7441)
This change introduces some new heuristics to make it easier to use
'page' or other resevered parameter names as parameters in URL
generation.

--

The main change here is to allow the link generation tree to *ignore* a
value passed in to URL generation when it conflicts with an endpoint's
required values.

The main concern of this feature area is "how do we tell whether you are
linking to an action or a page?". Routing attempts to do the right thing
will requiring very little from the user in terms of expressing intent.

In this case, we try to tell the difference between an attempt to generate
a link to an action due to the presence of the 'action' parameter and
absence of the 'page' parameter. This obviously doesn't work when you
want to use 'page' as a non-reserved parameter in an action. The same
case occurs for pages, but users are already used to the idea that
'action' is a reserved word in MVC.

We can loosen this restriction when the value that's supplied for 'page'
is known not to be any existing value of the 'page' route value.

This approach seems somewhat reasonable but has many of the problems inherent
to this area. When it fails (the value you want to use for 'page' causes
a conflict) - it's going to be esoteric and hard to understand.
2019-02-22 11:44:43 -08:00
Javier Calvarro Nelson 2d9cba86fd [Components] Prerrendering startup experience (#7770)
[Components] Prerrendering startup experience
* Introduces an IComponentPrerrenderer to handle Prerrendering
  * MVC registers a basic static prerrrenderer.
  * Components registers a more feature complete prerrender that will
    handle reconnection to the original circuit after prerrendering in
    the future to allow for prerrendered interactive components.
* Removes UseRazorComponents
  * Removes the SPA fallback in favor of a catch all route in
    Index.cshtml
  * Moves the framework files to be served by the default StaticFiles
    middleware in the pipeline by way of plugging specific providers
    through options.
  * Lifts UseSignalR(r => r.MapHub<ComponentHub>()) into startup and
    replaces it with a shorthand for MapHub using endpoint routing.
  * Adds extension methods to map components to selectors for a given
    hub.
* Updates the razor component templates to include prerendering and use a razor page as the entry 
   point.
2019-02-21 16:26:44 -08:00
Pavel Krymets 9355c7c1a5
Add reference assemblies support (#7764) 2019-02-21 14:33:35 -08:00
Pranav K 51e2bea403
Throw if CORS policy is configured to allow credentials and any origin (#7751)
* Throw if CORS policy is configured to allow credentials and any origin

Fixes https://github.com/aspnet/AspNetCore/issues/3106
2019-02-21 09:06:00 -08:00
Pranav K 82c323f599
Merge pull request #7771 from dotnet-maestro-bot/merge/release/2.1-to-release/2.2
[automated] Merge branch 'release/2.1' => 'release/2.2'
2019-02-20 16:28:35 -08:00
Pranav K b2a84b7b5f
Regenerate baselines for precompilation test (#7766)
* Regenerate baselines for precompilation test

Fixes https://github.com/aspnet/AspNetCore-Internal/issues/1822
2019-02-20 15:21:45 -08:00
Nate McMaster 9a2db43848
Follow-up to VS2019 conversion (#7753)
* Set VS version in file to 16.0.0.0
* Fix for restore failure on Microsoft.AspNetCore.App.Runtime.csproj
2019-02-20 11:02:38 -08:00
Nate McMaster 85ae18c723
Make Visual Studio 2019 a prerequisite to building this repo (#7005)
Changes:

* Make Visual Studio 2019 a prerequisite for building this repo
* Update .sln files
* Update Windows SDK to 17134
* Update developer docs
* Disable ANCM tests
* Update to .NET Core SDK 3.0 Preview 2
* Use Microsoft.NET.Sdk.Razor as a package consistently accross the repo
* React to changes in metadata from Microsoft.NETCore.App
* React to changes in .NET Core SDK
* Attempt to workaround CodeCheck.ps1 failure which doesn't repro locally or on different agents. Possibly due to differences in the version of the PowerShell task?
* Remove dead YML file
* Rename usages of win7-{x64,x86} to win-{x64,x86}
* Update KoreBuild to 3.0.0-build-20190219.1
2019-02-20 09:53:53 -08:00
Chris Ross 4e44025a52
Replace IHostingEnvironment with IWebHostEnvironment (#7725) 2019-02-19 21:11:52 -08:00
Matthias Laroche 7af971838e Set Content-Length to 0, when returning an empty body
When returning 416 RangeNotSatisfiable in FileResultExecutorBase, set the Content-Length based on the length of the body instead of the length of the original file.
Bugfix for  :
https://github.com/aspnet/AspNetCore/issues/4943
2019-02-19 17:54:11 -08:00
Matthias Laroche 134f28f71d Update FileResult tests to detect a bug for the status 416 RangeNotSatisfiable
Update FileResult tests to detect a bug for the status 416 RangeNotSatisfiable :
https://github.com/aspnet/AspNetCore/issues/4943
When the body is empty, the Content-Length header should be 0 to match the body length.
2019-02-19 17:54:11 -08:00
Doug Bunting 8d6d300bfc
Improve service reference filenames and class names (#7447)
- #4927
- fully-sanitize class names and filenames
  - use aspnet/AspNetCore-Tooling's `CSharpIdentifier` class
- default metadata in sequence [URI or project&document name ->] `%(DocumentPath)` -> `%(OutputPath)` -> `%(ClassName)`
  - if user sets metadata explicitly, the override affects defaults later in the sequence
- separate some nested validations and defaulting steps
  - provide default `%(DocumentName}` even if `%(DocumentPath}` is set explicitly
  - validate URI is absolute even if `%(DocumentPath}` is set explicitly

other:
- don't write out an empty Open API / Swagger file

nits:
- do not use default `%(DocumentName}` in default `%(DocumentPath)` for `<ServiceProjectReference>` items
- do not use empty URI path or query string in default `%(DocumentPath)` for `<ServiceUriReference>` items
2019-02-19 16:05:54 -08:00
Doug Bunting 14b7184c09
Improve documentation of `BinderType` and `BindingSource` properties (#7218)
- add regression test for #4939
- add `[BindProperty]` doc comments
- add `<remarks>` to `BinderType` properties that recommend setting `BindingSource` in some cases

smaller issues:
- catch invalid `BinderType` values up front
- complete `BindingSource.ModelBinding` implementation: `IValueProvider` filtering was faulty

nits:
- accept VS suggestions e.g. remove unused variables
- "model binder" -> `<see cref="IModelBinder" /> implementation` in some doc comments
2019-02-19 15:22:04 -08:00
Doug Bunting 3e0c75187c
Place limits on model binding collection size and recursion depth (#7214)
- #7052
- add MvcOptions.MaxModelBindingCollectionSize` and `MvcOptions.MaxModelBindingRecursionDepth`

nits:
- update syntax of a few `Resources.Designer.cs` files (I ran `/t:resx` on Mvc.sln)
- take VS suggestions in a few test classes
2019-02-19 15:17:56 -08:00
James Newton-King c2d1ab925e
Remove obsolete APIs from routing (#7371) 2019-02-16 18:37:51 +13:00
Chris Ross 93a24b03bb
Disable AllowSynchronousIO by default in all servers #4774 (#5120)
* Disable AllowSynchronousIO by default in all servers
2019-02-15 16:05:49 -08:00
Doug Bunting b711d6cf67
Merge branch 'release/2.1' into release/2.2 2019-02-14 21:18:02 -08:00
Ajay Bhargav Baaskaran b3d3f5e7fb Updated missed slns 2019-02-14 17:35:48 -08:00
Ryan Brandenburg bd4af873b0 Fix urls 2019-02-14 17:13:06 -08:00
Ryan Brandenburg 137d2d2357 Fix whitespace 2019-02-14 17:13:06 -08:00
Ryan Brandenburg 6786f97526 Update simpleapp test 2019-02-14 17:13:06 -08:00
Ryan Brandenburg 271e222b51 Update to bootstrap 3.4.1 2019-02-14 17:13:06 -08:00
Ajay Bhargav Baaskaran 7a26d27e8b Merge branch 'release/2.2' 2019-02-14 16:08:51 -08:00
Ryan Nowak f2a1a4542e
Introduce dynamic endpoints and fix #7011 (#7445)
* Add IDynamicEndpointMetadata for dynamic endpoints

* Use a dynamic endpoint policy for pages
2019-02-13 18:52:07 -08:00
Pranav K 9053bc6e29 Re-enable skipped runtime compilation tests 2019-02-13 16:45:36 -08:00
Ajay Bhargav Baaskaran a2f27426a5 Add missed tests 2019-02-13 16:25:31 -08:00
Ajay Bhargav Baaskaran 0c2ee920a1 Merge branch 'release/2.1' into release/2.2 2019-02-13 14:52:38 -08:00
Nate McMaster 338de4710a
Automatically set 'PrivateAssets=All' for .Sources references (#7539)
When a `<Reference>` is named `*.Sources`, set PrivateAssets=All (exclude from generated nuspec) and IncludeAssets=ContentFiles (only consume content files, not .dll's)
2019-02-13 14:31:15 -08:00
Ajay Bhargav Baaskaran 4cceccd568
Make Mvc repo folder layout consistent (#7518) 2019-02-13 10:53:39 -08:00
Nate McMaster 2ac4619635
Replace custom targets for generating assembly attributes and source control info by using SDK features (#7504) 2019-02-13 10:22:03 -08:00
Nate McMaster 3fd8a97af2
Add targets to generate the list of shared framework assemblies from project property (#7510)
Changes:
* Add support for a property, `IsAspNetCoreApp`, in the .csproj file of assemblies which are part of the shared framework. 
* Remove unused dependencies
* Remove reference which have become part of 'netcoreapp3.0'
2019-02-12 23:00:19 -08:00
Doug Bunting 5bbf7109a5
Fail `ComplexTypeModelBinder` after `CanCreateModel(...)` in some cases (#6793)
- #4802 and #6616
- also reduces the impact incorrect metadata as in #4939
- postpone some property binding in `ComplexTypeModelBinder`
2019-02-12 22:15:43 -08:00
Pranav K 173b2f91fb
Trim Async suffix on action names (#7420)
Fixes https://github.com/aspnet/AspNetCore/issues/4849
2019-02-12 13:30:38 -08:00
Ryan Nowak acd1cf3251
Update MVC/Routing Startup Experience (#7425)
* Relayer MvcEndpointDataSource

Separates the statefulness of the data source from the business logic of
how endpoints are created.

I'm separating these concerns because one of the next steps will split
the MvcEndpointDataSource into two data sources.

* Simplify MvcEndpointInfo

Removing things that are unused and leftovers from the 2.2 design of
this feature.

* Remove per-route conventions

Removes the ability to target endpoint conventions
per-conventional-route. This was a neat idea but we have no plans to
ship it for now.

Simplified MvcEndpointInfo and renamed it to reflect its new purpose.

* Remove filtering from MvcEndpointDataSource

This was neat-o but we're not going to ship it like this. We're going to
implement filtering in another place. Putting this in the data source is
pretty clumsy and doesn't work with features like application parts that
need to be baked in addservices

* Simplify ActionEndpointFactory

* Split up data sources

* Use UseRouting in functional tests

I've rejiggered our functional tests to de-emphasize UseMvc(...) and
only use it when we're specifically testing the old scenarios.
UseMvc(...) won't appear in templates in 3.0 so it's legacy.

* Update templates

* Add minor PR feedback

* one more
2019-02-11 19:18:05 -08:00
Ryan Nowak 5a291d0bc0 Fix #4212 area ambient value page->controller
This change enhances our ambient value logic to also deal with required
values. In 2.2 we introduced a 'required values' semantic to allow route
values to appear "to the left" of a route pattern for the purpose of
ambient values copying. This is a complicated way of saying "when you
like to a different endpoint then discard the ambient values".

What we didn't consider is that some ambient values are special (like
area). So basically, we'll allow an ambient value to be used if it's
part of the required values - even if we've already decided to discard
the ambient values.

This is a pretty surgical fix and only affected the desired scenario
based on tests.

-----

I also removed an optimization that I think is broken. I put an earlier
optimization in place that attempted to count ambient values as they
were "seen" to try and avoid some extra copying. This copying loop has a
cost even if it no-ops which is what I was trying to prevent.

Unfortunately since we added 'required values' - it's now possible for
an ambient value to be double-counted, which makes this optimization
incorrect.
2019-02-11 15:58:33 -08:00
Pranav K 88ae930fad
Remove obsolete APIs from MVC (#7444)
* Remove obsolete APIs from MVC
Fixes https://github.com/aspnet/AspNetCore/issues/7322
2019-02-11 15:27:38 -08:00
N. Taylor Mullen dfddc4e8ff [MVC] Remove obsolete APIs
- Removed ViewsFeatureProvider
- Removed PageArgumentBinder and its internal implementation DefaultPageArgumentBinder.
- Removed corresponding test classes/methods for all the above.
- Reacted to class/member changes in dependencies.

#7326
2019-02-11 14:56:30 -08:00
kishanAnem c1ce7b9a77 ValidationSummary doesn't display property errors if ModelState and ModelMetadata meets the specific conditions #4831
Hi @dougbu

I removed test which is naming conflicts.
and closing #7221 PR
2019-02-09 13:11:07 -08:00
Nate McMaster cc065f0055
Produce a package with just reference assemblies for AspNetCore.App (#7355) 2019-02-07 19:47:52 -08:00
Hao Kung c9499e14e4
Run helix tests on master (#6728) 2019-02-07 09:20:08 -08:00
Javier Calvarro Nelson f456e3d153
[Components] [Fixes #6953, #7226]
* Moves the Synchronization context from the remote renderer to the base renderer.
* Removes all the locking from the base renderer.
2019-02-07 07:03:52 -08:00
Doug Bunting cf9e459da7 Add link to ASP.NET API Versioning project 2019-02-06 14:31:35 -08:00
dotnet-maestro[bot] 80846317b5 Update dependencies from 5 repositories (#7132)
* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190129.2

This change updates the following dependencies
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview-19079-02
- Microsoft.NET.Sdk.Razor - 3.0.0-preview-19079-02
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview-19079-02
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview-19079-02

* Update dependencies from https://github.com/dotnet/corefx build 20190129.11

This change updates the following dependencies
- System.ComponentModel.Annotations - 4.6.0-preview.19079.11
- Microsoft.CSharp - 4.6.0-preview.19079.11
- Microsoft.Win32.Registry - 4.6.0-preview.19079.11
- System.Runtime.CompilerServices.Unsafe - 4.6.0-preview.19079.11
- System.Security.Cryptography.Cng - 4.6.0-preview.19079.11
- System.Reflection.Metadata - 1.7.0-preview.19079.11
- System.Security.Cryptography.Pkcs - 4.6.0-preview.19079.11
- System.Security.Cryptography.Xml - 4.6.0-preview.19079.11
- System.Security.Permissions - 4.6.0-preview.19079.11
- System.Security.Principal.Windows - 4.6.0-preview.19079.11
- System.ServiceProcess.ServiceController - 4.6.0-preview.19079.11
- System.Text.Encodings.Web - 4.6.0-preview.19079.11
- System.Threading.Channels - 4.6.0-preview.19079.11
- System.Data.SqlClient - 4.7.0-preview.19079.11
- System.Diagnostics.DiagnosticSource - 4.6.0-preview.19079.11
- System.Diagnostics.EventLog - 4.6.0-preview.19079.11
- System.Net.Http.WinHttpHandler - 4.6.0-preview.19079.11
- System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview.19079.11
- System.Numerics.Vectors - 4.6.0-preview.19079.11
- System.IO.Pipelines - 4.6.0-preview.19079.11

* Update dependencies from https://github.com/dotnet/core-setup build 20190129.4

This change updates the following dependencies
- Microsoft.DotNet.PlatformAbstractions - 3.0.0-preview-27329-4
- Microsoft.Extensions.DependencyModel - 3.0.0-preview-27329-4
- Microsoft.NETCore.App - 3.0.0-preview-27329-4

* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190129.4

This change updates the following dependencies
- dotnet-ef - 3.0.0-preview.19079.4
- Microsoft.EntityFrameworkCore - 3.0.0-preview.19079.4
- Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview.19079.4
- Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview.19079.4
- Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview.19079.4
- Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview.19079.4
- Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview.19079.4

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190130.2

This change updates the following dependencies
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview-19080-02
- Microsoft.NET.Sdk.Razor - 3.0.0-preview-19080-02
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview-19080-02
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview-19080-02

* Update dependencies from https://github.com/dotnet/corefx build 20190130.5

This change updates the following dependencies
- System.ComponentModel.Annotations - 4.6.0-preview.19080.5
- Microsoft.CSharp - 4.6.0-preview.19080.5
- Microsoft.Win32.Registry - 4.6.0-preview.19080.5
- System.Runtime.CompilerServices.Unsafe - 4.6.0-preview.19080.5
- System.Security.Cryptography.Cng - 4.6.0-preview.19080.5
- System.Reflection.Metadata - 1.7.0-preview.19080.5
- System.Security.Cryptography.Pkcs - 4.6.0-preview.19080.5
- System.Security.Cryptography.Xml - 4.6.0-preview.19080.5
- System.Security.Permissions - 4.6.0-preview.19080.5
- System.Security.Principal.Windows - 4.6.0-preview.19080.5
- System.ServiceProcess.ServiceController - 4.6.0-preview.19080.5
- System.Text.Encodings.Web - 4.6.0-preview.19080.5
- System.Threading.Channels - 4.6.0-preview.19080.5
- System.Data.SqlClient - 4.7.0-preview.19080.5
- System.Diagnostics.DiagnosticSource - 4.6.0-preview.19080.5
- System.Diagnostics.EventLog - 4.6.0-preview.19080.5
- System.Net.Http.WinHttpHandler - 4.6.0-preview.19080.5
- System.Net.WebSockets.WebSocketProtocol - 4.6.0-preview.19080.5
- System.Numerics.Vectors - 4.6.0-preview.19080.5
- System.IO.Pipelines - 4.6.0-preview.19080.5

* Update dependencies from https://github.com/dotnet/core-setup build 20190130.4

This change updates the following dependencies
- Microsoft.DotNet.PlatformAbstractions - 3.0.0-preview-27330-4
- Microsoft.Extensions.DependencyModel - 3.0.0-preview-27330-4
- Microsoft.NETCore.App - 3.0.0-preview-27330-4

* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20190130.1

This change updates the following dependencies
- dotnet-ef - 3.0.0-preview.19080.1
- Microsoft.EntityFrameworkCore - 3.0.0-preview.19080.1
- Microsoft.EntityFrameworkCore.Tools - 3.0.0-preview.19080.1
- Microsoft.EntityFrameworkCore.InMemory - 3.0.0-preview.19080.1
- Microsoft.EntityFrameworkCore.Relational - 3.0.0-preview.19080.1
- Microsoft.EntityFrameworkCore.Sqlite - 3.0.0-preview.19080.1
- Microsoft.EntityFrameworkCore.SqlServer - 3.0.0-preview.19080.1

* Update dependencies from https://github.com/aspnet/Extensions build 20190129.8

This change updates the following dependencies
- Internal.AspNetCore.Analyzers - 3.0.0-preview.19079.8
- Microsoft.Extensions.WebEncoders - 3.0.0-preview.19079.8
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview.19079.8
- Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview.19079.8
- Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview.19079.8
- Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview.19079.8
- Microsoft.Extensions.DependencyInjection - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.Xml - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.Json - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.Ini - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview.19079.8
- Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration - 3.0.0-preview.19079.8
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview.19079.8
- Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview.19079.8
- Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview.19079.8
- Microsoft.Extensions.Caching.Memory - 3.0.0-preview.19079.8
- Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview.19079.8
- Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview.19079.8
- Microsoft.AspNetCore.Testing - 3.0.0-preview.19079.8
- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview.19079.8
- Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview.19079.8
- Microsoft.Extensions.Configuration.Binder - 3.0.0-preview.19079.8
- Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview.19079.8
- Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview.19079.8
- Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview.19079.8
- Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview.19079.8
- Microsoft.Extensions.Primitives - 3.0.0-preview.19079.8
- Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview.19079.8
- Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview.19079.8
- Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview.19079.8
- Microsoft.Extensions.Options - 3.0.0-preview.19079.8
- Microsoft.Extensions.ObjectPool - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging.Testing - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging.EventSource - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging.Debug - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging.Console - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging.Configuration - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview.19079.8
- Microsoft.Extensions.Logging - 3.0.0-preview.19079.8
- Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview.19079.8
- Microsoft.Extensions.Localization - 3.0.0-preview.19079.8
- Microsoft.Extensions.Http - 3.0.0-preview.19079.8
- Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview.19079.8
- Microsoft.Extensions.Hosting - 3.0.0-preview.19079.8
- Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview.19079.8
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview.19079.8
- Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview.19079.8
- Microsoft.JSInterop - 3.0.0-preview.19079.8

* Add json.net reference to UI package directly

* fix new package

* latest package

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190131.3

This change updates the following dependencies
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview-19081-03
- Microsoft.NET.Sdk.Razor - 3.0.0-preview-19081-03
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview-19081-03
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview-19081-03

* Update Versions.props

* Update Versions.props

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190201.4

This change updates the following dependencies
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview-19101-04
- Microsoft.NET.Sdk.Razor - 3.0.0-preview-19101-04
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview-19101-04
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview-19101-04

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190203.1

This change updates the following dependencies
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview-19103-01
- Microsoft.NET.Sdk.Razor - 3.0.0-preview-19103-01
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview-19103-01
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview-19103-01

* Update Versions.props

* Update BasicWebSite.Home.CSharp7View.html

* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190204.4

This change updates the following dependencies
- Microsoft.AspNetCore.Mvc.Razor.Extensions - 3.0.0-preview-19104-04
- Microsoft.NET.Sdk.Razor - 3.0.0-preview-19104-04
- Microsoft.CodeAnalysis.Razor - 3.0.0-preview-19104-04
- Microsoft.AspNetCore.Razor.Language - 3.0.0-preview-19104-04

* Update dependencies from https://github.com/dotnet/core-setup build 20190204.9

This change updates the following dependencies
- Microsoft.DotNet.PlatformAbstractions - 3.0.0-preview-27404-9
- Microsoft.Extensions.DependencyModel - 3.0.0-preview-27404-9
- Microsoft.NETCore.App - 3.0.0-preview-27404-9

* Update dependencies from https://github.com/aspnet/Extensions build 20190205.3

This change updates the following dependencies
- Internal.AspNetCore.Analyzers - 3.0.0-preview.19105.3
- Microsoft.JSInterop - 3.0.0-preview.19105.3
- Microsoft.Extensions.FileProviders.Abstractions - 3.0.0-preview.19105.3
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions - 3.0.0-preview.19105.3
- Microsoft.Extensions.Diagnostics.HealthChecks - 3.0.0-preview.19105.3
- Microsoft.Extensions.DiagnosticAdapter - 3.0.0-preview.19105.3
- Microsoft.Extensions.DependencyInjection.Abstractions - 3.0.0-preview.19105.3
- Microsoft.Extensions.DependencyInjection - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.Xml - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.UserSecrets - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.KeyPerFile - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.Json - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.Ini - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.FileExtensions - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.EnvironmentVariables - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.CommandLine - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.Binder - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.AzureKeyVault - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration.Abstractions - 3.0.0-preview.19105.3
- Microsoft.Extensions.Configuration - 3.0.0-preview.19105.3
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview.19105.3
- Microsoft.Extensions.Caching.StackExchangeRedis - 3.0.0-preview.19105.3
- Microsoft.Extensions.Caching.SqlServer - 3.0.0-preview.19105.3
- Microsoft.Extensions.Caching.Memory - 3.0.0-preview.19105.3
- Microsoft.Extensions.Caching.Abstractions - 3.0.0-preview.19105.3
- Microsoft.Extensions.ActivatorUtilities.Sources - 3.0.0-preview.19105.3
- Microsoft.AspNetCore.Testing - 3.0.0-preview.19105.3
- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview.19105.3
- Microsoft.AspNetCore.Analyzer.Testing - 3.0.0-preview.19105.3
- Microsoft.Extensions.FileProviders.Composite - 3.0.0-preview.19105.3
- Microsoft.Extensions.FileProviders.Embedded - 3.0.0-preview.19105.3
- Microsoft.Extensions.FileSystemGlobbing - 3.0.0-preview.19105.3
- Microsoft.Extensions.WebEncoders - 3.0.0-preview.19105.3
- Microsoft.Extensions.ValueStopwatch.Sources - 3.0.0-preview.19105.3
- Microsoft.Extensions.TypeNameHelper.Sources - 3.0.0-preview.19105.3
- Microsoft.Extensions.Primitives - 3.0.0-preview.19105.3
- Microsoft.Extensions.ParameterDefaultValue.Sources - 3.0.0-preview.19105.3
- Microsoft.Extensions.Options.DataAnnotations - 3.0.0-preview.19105.3
- Microsoft.Extensions.Options.ConfigurationExtensions - 3.0.0-preview.19105.3
- Microsoft.Extensions.Options - 3.0.0-preview.19105.3
- Microsoft.Extensions.ObjectPool - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging.TraceSource - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging.Testing - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging.EventSource - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging.Debug - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging.Console - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging.Configuration - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging.AzureAppServices - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging.Abstractions - 3.0.0-preview.19105.3
- Microsoft.Extensions.Logging - 3.0.0-preview.19105.3
- Microsoft.Extensions.Localization.Abstractions - 3.0.0-preview.19105.3
- Microsoft.Extensions.Localization - 3.0.0-preview.19105.3
- Microsoft.Extensions.Http - 3.0.0-preview.19105.3
- Microsoft.Extensions.Hosting.Abstractions - 3.0.0-preview.19105.3
- Microsoft.Extensions.Hosting - 3.0.0-preview.19105.3
- Microsoft.Extensions.HostFactoryResolver.Sources - 3.0.0-preview.19105.3
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview.19105.3
- Microsoft.Extensions.FileProviders.Physical - 3.0.0-preview.19105.3

* Update Versions.props

* Update Versions.props
2019-02-05 14:07:36 -08:00
Pranav K 094c531e5d
Fix test 2019-02-05 10:56:31 -08:00
Pranav K 314ec6d1a9
Add a TypeForward for JsonResult
Fixes https://github.com/aspnet/AspNetCore/issues/7220
2019-02-05 10:56:31 -08:00
Doug Bunting e2c67bab78 Remove benchmark apps from Mvc.sln
- follow up to 61bc18fee3
2019-02-04 09:22:33 -08:00
Sébastien Ros 61bc18fee3
Exclude benchmark apps from builds (#7171) 2019-02-01 17:57:47 -08:00
Alexej Timonin 8f6853e155 Fix ReplaceTokens bug in AttributeRouteModel (#6957) 2019-02-02 11:57:18 +13:00
James Newton-King 574be0d22c
Add readonly modifier to readonly structs (#7169) 2019-02-01 15:04:25 +13:00
Javier Calvarro Nelson 7ea4a5f778
[MVC] Normalize dependencies under the _dependencies folder in the solution (#7128) 2019-01-30 08:54:34 -08:00
Pranav K 0f072a9565
Reintroduce a package for Razor runtime compilation (#6653)
* Reintroduce a package for Razor runtime compilation

Fixes https://github.com/aspnet/AspNetCore/issues/4947
2019-01-29 09:34:43 -08:00
Pavel Krymets f06e1822f5
Enable strict mode in roslyn compiler (#6950) 2019-01-28 15:56:27 -08:00
Patrick Westerhoff 1bc056a7f6 Introduce IUrlHelper.PageLink (#6819) (#6819)
Add an extension method to generate an absolute URL for a page.
2019-01-28 15:42:10 -08:00
James Newton-King 4b8d9666f4 Add startvs.cmd for MVC and Security solutions (#6943)
* Add startvs.cmd for MVC

* Add startvs.cmd for Security
2019-01-28 15:37:14 -08:00
Chris Ross 7d4b6fccff
Clean up ManualResetEvent usage in tests (#6961) 2019-01-28 12:10:16 -08:00
Nate McMaster ac04019e42
Remove obsolete build infrastructure (#6995)
Changes:

* Remove obsolete targets which are unnecessary now that this repo no longer builds git submodules in a separate build process
* Remove the need for static analysis of 'ArtifactInfo' items
* Simplify how the code signing task is configured
* Remove unused repo tasks
* Remove duplicate lists of external dependencies and packages to be produced
* Remove obsolete build definition
* Remove obsolete build script parameters
* Add VisualStudioSetupOutputPath
2019-01-28 09:57:59 -08:00
Pranav K f2ee3201ae No-op Authorization middleware for Razor Pages
Workaround for https://github.com/aspnet/AspNetCore/issues/7011
2019-01-25 15:38:23 -08:00
Nate McMaster 922512a9fb
Convert the artifacts folder layout to match Arcade (#6850)
Changes:
* IsProductPackage => IsShippingPackage
* artifacts/$config/packages => artifacts/packages/$config
* packages/product => packages/Shipping
* packages/internal => packages/NonShipping
* Renamed MSBuild properties used for output folders
* Update build tools to use 2 spaces in global.json
2019-01-18 13:38:24 -08:00
Pranav K c04f66d25e Mark Mvc.NewtonsoftJson as a shipping package (#6842) 2019-01-18 11:03:47 -08:00
Pranav K 89a7f3cf77
Introduce IUrlHelper.ActionLink (#6775)
Fixes https://github.com/aspnet/AspNetCore/issues/4890
2019-01-18 09:22:04 -08:00
Javier Calvarro Nelson 15edd84d40 [MVC] Add MVC integration with Razor Components
* Adds RenderComponentAsync extension methods to IHtmlHelper that allow
  for prerrendering of Razor components within MVC views.
2019-01-17 11:25:03 -08:00
Nate McMaster 53682c0548
Merge branch 'release/2.2' 2019-01-17 11:01:12 -08:00
Pranav K cc892071b2 Fixup doc comments for ContentResult
Fixes https://github.com/aspnet/AspNetCore/issues/5159
2019-01-17 09:59:43 -08:00
Justin Kotalik e6d547a923 Merge branch 'jkotalik/22temp' into jkotalik/masterMerge 2019-01-16 14:39:10 -08:00
John Luo 1bd5845b4c
Merge pull request #6735 from aspnet/johluo/merge22
Johluo/merge22
2019-01-16 11:43:35 -08:00
John Luo 17b6ce8bd6 Merge branch 'release/2.2' 2019-01-15 18:49:54 -08:00
James Newton-King df7bfe5243
Unit test route name with RouteUrl and ambient values (#6719) 2019-01-16 13:57:13 +13:00
James Newton-King 92680b355f
Change consumes behavior to ignore requests with no content type (#6645) 2019-01-16 11:55:54 +13:00
James Newton-King 180f735ac8
Fix non-parameter route constraints not called with endpoint routing for 2.2 (#6587) 2019-01-16 11:16:35 +13:00
Chris Ross 6a44aca6a2
React to WebHostBuilderFactory changes (#6460) 2019-01-15 08:09:27 -08:00
James Newton-King 09b50850bc
Update AuthorizeFilter to no-op when AuthorizationMiddleware has run (#6346) 2019-01-15 20:29:23 +13:00
Pranav K d93f4527b3 Fix typo
Fixes https://github.com/aspnet/AspNetCore/issues/6535
2019-01-14 17:15:19 -08:00
John Luo c2aa2957f6 Merge fixes 2019-01-14 14:13:40 -08:00
John Luo 90a9fa7aac Merge branch 'release/2.1' into release/2.2 2019-01-14 12:57:34 -08:00
Nate McMaster 7f7723bdf2
Consume dependencies updates automatically via darc (#6676)
This refactors the list of dependency versions to support consuming updates automatically via darc and maestro.
2019-01-14 12:01:31 -08:00
Nate McMaster a9132ad26c
Switch agent queues used during Windows builds 2019-01-11 15:16:57 -08:00
Ryan Nowak 14e606997f Fix #5116 Remove support for 2.0 precompilation
Obsoletes RazorViewAttribute and RazorPageAttribute and removes all of
our usage of them. I've already made the changes to have the SDK stop
generating these.
2019-01-10 15:38:10 -08:00
Pranav K 55ec35bb80
Cleanup MvcJsonHelper (#6529)
* Cleanup MvcJsonHelper

* Remove dependency on JsonOutputFormatter
* Cache JsonSerializer for the default case
2019-01-10 12:34:27 -08:00
John Luo e5d943a7e3
Convert MvcPrecomp to Reference (#6472)
* Convert MvcPrecomp to use Reference and move to MVC
2019-01-09 18:48:01 -08:00
Nate McMaster 0f65d44482
Merge branch 'release/2.2' 2019-01-09 18:09:25 -08:00
Nate McMaster a3f9b74bb9
Merge branch 'release/2.1' into release/2.2 2019-01-09 14:52:53 -08:00
Pranav K cdc66c5f98 Move JSON.NET specific features to a separate assembly 2019-01-08 12:49:29 -08:00
David Fowler d116ab8550
Remove ObjectPoolProvider from default set of hosting services (#6437)
- Added it where it was being used
- Updated tests
2019-01-08 12:05:48 -08:00
Nate McMaster 5d16f97965
Remove netcoreapp2.0 test TFMs (#6461)
.NET Core 2.0 reached EOL last year. This removes multi-targeting our test projects and test assets to only use .NET Core 2.1 and .NET Framework 4.6.1.
2019-01-08 11:20:09 -08:00
Ajay Bhargav Baaskaran 50996e3da1
Add missed reference to Razor SDK in Mvc test website (#6367) 2019-01-04 11:22:25 -08:00
Nate McMaster 436076fd55
Fix broken tests and VS solutions caused by source code reorganization and other build infra cleanup
Changes:
* Fix broken tests and VS solutions caused by source code reorganization
* Add a check to validate generated code and solutions on PRs
* backport some source code reorg to src/Identity
* Fix startvs.cmd if you've already run build.ps1
* Add PR checks for tests on Linux/macOS
* Skip broken Nginx tests
* Add conditions to skip IIS tests on non-Windows platforms
2019-01-04 10:00:26 -08:00
Doug Bunting d689eede36 Revert "Work around `CryptographicException`s thrown in some full framework test runs"
- no longer support .NET Framework

This reverts commit 192e8073ee
2019-01-04 09:56:06 -08:00
Doug Bunting 69b5ab9c01 React to JwtBearer removal from Microsoft.AspNetCore.App
nits:
- remove NET461 special case
- remove reference to transitive Mvc.Core dependency
2019-01-04 09:56:06 -08:00
Doug Bunting 236ceb73c1 Remove Mvc.NoFun.sln 2019-01-03 16:13:34 -08:00
Nate McMaster bfec2c14be
Merge branch 'release/2.2' 2019-01-03 12:18:01 -08:00
Doug Bunting be7dfa30af
Use InputFormatterException for another case (#6316)
- #4917

nits:
- test `ExceptionPolicy` logic in an input formatter
- remove old Mono workarounds in `SerializaterErrorTests`
- fix typo in `SerializableErrorTests` (not using theory data)
2019-01-03 11:02:07 -08:00
Doug Bunting c2df506894 Correct path to IIS Integration project
- react to 37291ea114
2019-01-03 10:51:47 -08:00
N. Taylor Mullen afb92018f0 Produce log output for flakey test.
- For the flakey test replaced the default logger with Xunit's `ITestOutputHelper` in order to see what's going wrong when the flakey test will eventually fail.

aspnet/AspNetCore-Internal#1337
2019-01-02 20:48:38 -08:00
Pavel Krymets 0ae6cc8e88
Remove InplaceStringBuilder usages (#6163) 2019-01-02 15:50:19 -08:00
Nate McMaster 65ff6e951a
Merge branch release/2.1 into release/2.2 2019-01-02 14:34:45 -08:00
Pranav K 199e3f14a2 Look at ApiConventionType attributes defined on base types
Fixes https://github.com/aspnet/AspNetCore/issues/4951
2019-01-02 10:36:47 -08:00
Doug Bunting f182b1adac Add sufficient projects to Mvc.NoFun.sln for it to build in VS
nit: ignore .vscode/ directories
2019-01-02 10:24:10 -08:00
Pranav K d52672748a Do not throw when a status code with a codefix appears multiple times in the method body
Fixes https://github.com/aspnet/AspNetCore/issues/4480
2019-01-02 09:51:20 -08:00
Pranav K 02a8afea3d Include dependencies in Mvc.sln 2019-01-01 07:49:22 +05:30
Nate McMaster 08dd1cd0ea
Fix build.cmd/sh for src/Mvc (#6208) 2018-12-31 15:51:13 -08:00
Ajay Bhargav Baaskaran 5a19fde191 Skip failing test 2018-12-26 02:00:31 -08:00
Ajay Bhargav Baaskaran 3787fbf3a3 Merge branch 'release/2.2' 2018-12-21 18:29:32 -08:00
Ajay Bhargav Baaskaran af2461d524 Merge branch 'release/2.1' into release/2.2 2018-12-21 11:38:25 -08:00
Nate McMaster c3beb1f9b1
build.cmd/sh changes (#5958)
Update the build scripts to support building subfolders or subgroups of projects

* Add build scripts for ci
* Remove obsolete scripts
* Add flags like --test and --pack to control running just test or packaging
* Add flags like --managed and --native to control building sub-types of projects
* Remove KoreBuild bootstrapper flags
* Update to extensions 3.0.0-preview.18619.1 (needed to get a fix for aspnet/Extensions#815 to make this change work on MSBuild.exe)
2018-12-20 16:52:15 -08:00
Ajay Bhargav Baaskaran 7f17d095d8
Convert Mvc to use Reference (#6047)
* Convert Mvc to use Reference

* Use ProjectReference for test assets
2018-12-20 16:27:32 -08:00
Nate McMaster 686ce02cc8
Remove code for building an analyzers package that never shipped (#6053)
Microsoft.AspNetCore.Analyzers didn't ship in 2.1, and we don't have plans to every ship it in a 2.1.x release.
2018-12-20 10:53:42 -08:00
James Newton-King 705bf63f1c
React to routing and update MVC dependencies (#6046) 2018-12-21 07:20:15 +13:00
dotnet-maestro-bot 7b77332441 [automated] Merge branch 'release/2.2' => 'master' (#5892) 2018-12-18 22:43:32 -05:00
Ajay Bhargav Baaskaran b0b8986a19 Use shared source 2018-12-18 15:03:27 -08:00
Ajay Bhargav Baaskaran eeabafa68f Merge branch 'temp' into ajbaaska/merge-master 2018-12-18 14:44:25 -08:00
James Newton-King 03cb4a6e14
Add missing dependencies to the MVC dependencies.props (#5714) 2018-12-19 11:32:23 +13:00
Ajay Bhargav Baaskaran 2a696f6a1c Merge branch 'release/2.2' 2018-12-18 12:50:01 -08:00
Nate McMaster 335c9be7b4
Update the artifacts directory organization and simplify publishing targets (#5701)
This simplifies the way that we publish files to our network drop share.

Changes:
* Instead of explicitly listing every file that needs to publish, use directories to classify packages and artifacts into different categories.
* Add documentation for the expected layout of artifacts/
* Remove the need for static analysis to determine which packages go to which project
* Add the MSBuild property "IsProductPackage" to .csproj files which ship as a package to NuGet.org.
2018-12-18 11:40:13 -08:00
Ajay Bhargav Baaskaran 647fbbac7b Merge branch 'release/2.1' into ajbaaska/merge-22 2018-12-17 18:40:08 -08:00
Nate McMaster 0cd79cc4c1
Remove unused VS dependencies and old versions of .NET Core from dependencies (#5317)
As a result of removing Razor's VS projects and upgrading all projects to netcoreapp3.0, we no longer need dependency variable for .NET Core 1.x and 2.x and Visual Studio packages.

Changes:
* Remove 'StandardTestTfm'
* Remove variables for .NET Core 1.0, 1.1, 2.0, 2.1, and 2.2
* Remove VSIX variables
* Stop generating 'branding.props' - this hasn't been used in a while and is no longer needed
2018-12-17 16:28:33 -08:00
John Luo 62351067ff Merge remote-tracking branch 'origin/master' 2018-12-17 15:16:28 -08:00
John Luo b8db81898a Merge remote-tracking branch 'origin/master' 2018-12-17 15:16:21 -08:00
Doug Bunting f113a20dfd Remove remaining `CompatibilitySwitch<T>` properties
- #4866 3 of 3
- other than ignored parameters and properties, no vestige remains of alternate behaviours
- also remove `AllowAreas` use outside src/Mvc
- left the `IEnumerable<ICompatibilitySwitch>` implementations to avoid `breakingchanges.netcore.json` churn
  - made the implementations more consistent
- left one `ConfigureCompatibilityOptions<MvcOptions>` subclass: `MvcOptionsConfigureCompatibilityOptions`
- note `AllowShortCircuitingValidationWhenNoValidatorsArePresent` default now applies to `TryValidateModel(...)` etc.

nits:
- updated `CompatibilityVersion` doc comments
- "currently unused" -> "currently ignored" in doc comments from part 2
- took a few VS suggestions
- VS seems to have cleaned up some trailing whitespace in files I had opened but didn't manually change
2018-12-17 14:47:49 -08:00
John Luo 98636fed6d Merge branch 'release/2.2' 2018-12-17 14:24:30 -08:00
Ajay Bhargav Baaskaran b079041488
Convert Razor to use Reference (#4954) 2018-12-17 12:10:40 -08:00
James Newton-King 443b1449ff
Update Newtonsoft.Json to 12.0.1 and Newtonsoft.Json.Bson to 1.0.2 (#5122) 2018-12-18 08:55:37 +13:00
James Newton-King cc899e2be7
Move EndpointModel and IEndpointConventionBuilder to HTTP abstractions (#4274) 2018-12-17 18:38:49 +13:00
Doug Bunting 708dc5cb5a
Remove many `CompatibilitySwitch<T>` properties (#4628)
- #7156 2 of 3
- will leave the `IEnumerable<ICompatibilitySwitch>` implementations to avoid `breakingchanges.netcore.json` churn
- will leave one `ConfigureCompatibilityOptions<MvcOptions>` subclass: `MvcOptionsConfigureCompatibilityOptions`
- a few options remain as regular properties:
  - `ApiBehaviorOptions.SuppressMapClientErrors` (default `false`)
  - `MvcOptions.EnableEndpointRouting` (default `true`)
  - `MvcOptions.MaxValidationDepth` (default `32`)
  - `MvcJsonOptions.AllowInputFormatterExceptionMessages` (default `true`)

nits:
- move `IsEffectivePolicy(...)` check earlier in `AuthorizeFilter`
- correct a typo or two
2018-12-16 19:33:27 -08:00
Nate McMaster 02780bac26
Merge branch 'release/2.2' 2018-12-14 16:03:16 -08:00
John Luo f659f0acce Merge branch 'release/2.1' into release/2.2 2018-12-14 15:48:40 -08:00
Justin Kotalik 68f0aff144 security to project ref (#4618) 2018-12-14 14:49:23 -08:00
Ryan Nowak a7f6154520 Workaround #4804
This is a workaround for a workaround that currently have in d16p1.

The Razor SDK maps all netcoreapp3.0 projects to MVC-2.1 at design time,
however this only really works if you have the Razor.Design package.
Since we have internal builds available that support MVC-3.0 we can just
manually hardcode the correct targeting of the project.
2018-12-14 11:15:32 -08:00
Nate McMaster feb641ddda
Merge branch 'release/2.1' into release/2.2 2018-12-14 09:44:15 -08:00
Nate McMaster 13ae0057fb
Replace .Sources package references with local code (#4801)
Replaces package references the following packages with local code:

Microsoft.AspNetCore.Certificates.Generation.Sources
Microsoft.Extensions.CopyOnWriteDictionary.Sources 
Microsoft.Extensions.ClosedGenericMatcher.Sources
Microsoft.Extensions.ObjectMethodExecutor.Sources
Microsoft.Extensions.PropertyActivator.Sources
Microsoft.Extensions.PropertyHelper.Sources
Microsoft.Extensions.RazorViews.Sources
Microsoft.Extensions.SecurityHelper.Sources
Microsoft.Extensions.StackTrace.Sources
Microsoft.Extensions.WebEncoders.Sources
2018-12-14 08:36:36 -08:00
James Newton-King dd662ed2a7
Fix compiling Mvc.sln in 2.2 (#4955) 2018-12-14 22:21:44 +13:00
Nate McMaster f0990ec531
Fix build issues with IIS integration projects
Changes:
* Ensure IIS managed and pkg projects build after the native projects
* Update projects to build test
* Update CI checks to build on macOS and Linux
* Use package baselines to manage ANCM packages
2018-12-13 22:53:31 -08:00
Kahbazi 19276ce01c Remove nameof from log events 2018-12-12 07:19:32 +05:30
James Newton-King c6fa808a91
Change consumes behavior to ignore requests with no content type (#4459) 2018-12-11 17:55:20 +13:00
Nate McMaster 790ae47055
Merge branch 'release/2.2' 2018-12-10 17:41:14 -08:00
Nate McMaster 2c4d586809
Merge 'release/2.1' into release/2.2
Co-authored-by: Justin Kotalik <jukotali@microsoft.com>
2018-12-10 15:56:42 -08:00
Pranav K 926034ac4e
Re-enable extensibility points for ExpressionHelper.GetExpressionText, ExpressionMetadataProvider.FromStringExpression (#4494)
* Re-enable extensibility points for ExpressionHelper.GetExpressionText, ExpressionMetadataProvider.FromStringExpression

Fixes https://github.com/aspnet/Mvc/issues/8724
2018-12-08 13:54:05 +05:30
Pranav K 027bf336da
Add event names for logs (#6818) (#4495)
* Add event names for logs (#6818)
2018-12-08 13:00:16 +05:30
Justin Kotalik 5f843f223e
[2.1] Make Antiforgery, ResponseCaching, StaticFiles, and Cors use project ref (#4484) 2018-12-07 14:30:50 -08:00
Nate McMaster 85e2147ff0
Merge branch 'release/2.2' 2018-12-07 11:11:44 -08:00
Pranav K 8a0fa732b0 Make RequiredAttributeAdapter public
Fixes https://github.com/aspnet/Mvc/issues/8744
2018-12-07 17:49:10 +05:30
Nate McMaster 569a14ecb8
Merge branch 'release/2.1' into release/2.2 2018-12-06 17:09:03 -08:00
James Newton-King 50ea144c57
Update MVC dependencies (#4477) 2018-12-07 11:01:47 +13:00
Ryan Nowak e3773b6383 Remove Razor tooling projects
Removes the Razor compiler/tooling projects from this repo
2018-12-06 07:47:00 -08:00
James Newton-King a07be53033
Rename UseEndpointRouting to UseRouting (#4416) 2018-12-06 21:26:10 +13:00
Justin Kotalik 0588b13f5b Fix 2.1 build issues and remove obsolete build code (#4443)
- Stop producing the 'Universe' lineup package
- Removes all PackageLineup code
- Use full msbuild on Windows
- Fix invalid reference to internal.aspnetcore.sdk in 2.1.x
- Fix shared folder references for PackageArchive task.
2018-12-05 17:01:02 -08:00
Doug Bunting 929d7f3306 Obsolete old `CompatibilityVersion` values
- #7156 part 1 of ?
- add `CompatibilityVersion.Version_3_0` and make it the default
- remove tests of old versions
  - also remove `CompatibilityVersion.Version_2_x` uses outside src/Mvc
  - for functional tests of legacy routing, use `MvcOptions.EnableEndpointRouting` to control behaviour
  - rename `StartupWith2xCompat...` classes to `StartupWithoutEndpointRouting`
- clean up comments mentioning `[Obsolete]` `CompatibilityVersion` values
  - many of the affected options will be removed in subsequent PRs but this cleanup helps when searching entire repo
- correct `<value>` comments in `ApiBehaviorOptions`

nits:
- take VS suggestions in changed files
- remove src/SiteExtensions/global.json and let file in repo root "win"
- fix a few grammar errors VS or the spell checker noticed
- move `<value>` elements before `<remarks>` for consistency
  - was undoing unintentional changes and noticed the inconsistency in a couple of additional files
2018-12-05 16:46:46 -08:00
Sébastien Ros a51ff6e6ad
Updating benchmark apps for netcoreapp3.0 (#4433) 2018-12-05 12:42:14 -08:00
Doug Bunting 6a8d7dc12c
Fix Mvc test failures (#4415)
* Regenerate Mvc functional test baselines
  - whitespace likely changed due to a recent Razor change (but there've been so many!)

* Don't trim response content in `RazorPagesTest.Page_SimpleForms_RenderAntiforgery()`
  - was inconsistent with generated baseline and `Trim()` in similar tests is generally not needed or correct

* Skip test method causing remaining two src/Mvc failures
  - #4417 opened to restore these tests
2018-12-05 11:30:09 -08:00
Nate McMaster be3b66d1d1
Revert "Remove Razor tooling projects"
This reverts commit 3cfa6c0526.
2018-12-05 08:40:49 -08:00
Ryan Nowak 3cfa6c0526 Remove Razor tooling projects
Removes the Razor compiler/tooling projects from this repo
2018-12-04 19:58:37 -08:00
N. Taylor Mullen c0b74d916c Add build.cmd to Mvc 2018-12-04 15:35:30 -08:00
N. Taylor Mullen 0728754d08 Update Mvc slns to be builidlable. 2018-12-04 15:35:30 -08:00
James Newton-King 6fc7e532f1
Update MVC dependencies (#4395) 2018-12-05 12:04:47 +13:00
James Newton-King f157b78d93 MVC reaction to RoutePattern required values 2018-12-04 12:14:35 +13:00
Ryan Brandenburg 8a37389a9f Fix RepositoryUrl for some repos 2018-11-28 14:54:47 -08:00
Ryan Brandenburg a6b473dc2c Reorganize source code in preparation to move into aspnet/AspNetCore
Prior to reorganization, this source code was found in c9887e027a
2018-11-27 15:36:38 -08:00
Ryan Brandenburg b659c82df6 Reorganize source code in preparation to move into aspnet/AspNetCore
Prior to reorganization, this source code was found in a6199bbfba
2018-11-27 12:09:17 -08:00
Ryan Brandenburg f4578f127c Reorganize source code in preparation to move into aspnet/AspNetCore
Prior to reorganization, this source code was found in 5a4fd3e792
2018-11-27 10:43:55 -08:00