dotnet-watch expects full paths to files to watch in all added items. For files in the current project, this
happens to work. However this does not work very well for files in referenced projects. Using the FullPath metadata
does not work during global evaluation, but we're able to do this in a target.
This change adds extensibility to the dotnet-watch tool that allows calling a target as part of "watch" evaluation.
Fixes https://github.com/dotnet/aspnetcore/issues/22219
* Do not include the shared framework in the packages
DevServer and dotnet-watch include binaries from the ASP.NET Core shared framework
as part of the package. This change compiles these projects against the most recently built
version of the shared framework which ensures build and publish work as normals. Individual
projects from the runtime can be referenced to pick up new runtime features when necessary
* More hacks!
* Ensure shared runtime is built before running tests
* Delete dotnet-watch.nuspec
* Guard against client disconnect exceptions that appear when performing ReadFormAsync
Reading the request body may throw an exception. This change adds some extra guards
for this and presents this as a 4xx response rather than a 5xx response.
* Add some tests
* Fixup test
* Reject @import rules in scoped CSS files
* CR feedback: Use SourceText
* CR feedback: Another test case
* Use same file reading mechanism as "generate" command
* Fix MaxRequestBodySize
* Apply suggestions from code review
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* Update test
* Keep IIS limit default and update API comment
* Update tests
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* Make PropertySetter a concrete type
* Use the pattern from PropertyHelpers to set property values
* Tweaks to Blazor WebAssembly tests to allow running tests locally
* Update src/Components/Components/src/Reflection/IPropertySetter.cs
Porting #23932 to WebAssemblySDK.
* Default new runtime feature switches
These new feature switches have been added to the runtime to make applications smaller. Setting reasonable defaults to Blazor wasm projects.
Fixes https://github.com/dotnet/aspnetcore/issues/25099
If there is an ask mode template to fill out, let me know and I can do it.
* Update to @azure/msal-browser@2.0.0
* Retain promise during initialization
* Set knownAuthority hostname from authority URL
* Add KnownAuthorities config option and fix silent sign-in
* Set knownAuthorities default to empty list
These changes are to improve the default reconnection behavior of the client
- [x] Match the reconnection time with server side
- [x] Add indicator to know at which reconnection attempt we currently are
- [x] [Additional] Add a loader symbol
- [x] Add client side test
Addresses #18745
* Implement ParseMessages for java messagePack client
* Fix some spacing & syntax
* Implement write
* Tab -> Spaces
* MessagePacker -> MessageBufferPacker
* Tabs -> Spaces
* Tabs -> Spaces
* InvocationMessage may not include streamIDs
* Only 1 ctor per message type
* Fixup HubConnection.java
* Change return type of parseMessages to List
* Fix HubConnection
* Check for primitive value before returning
* Implement length header prefix
* Minor fixes
* Use ByteBuffer to read length header
* Add case for Char
* Close unpacker
* Typo
* Override onMessage w/ ByteString
* Change OKHttpWebSocketWrapper
* Account for nil InvocationId
* Change interface & MessagePack impl
* Update JsonHubProtocol
* Use ByteBuffer
* Fixup HubConnection
* Fixup more stuff
* Convert more stuff to ByteBuffer
* Account for ReadOnly
* Spacing
* No need to reset ByteBuffer when setting position
* Add Protocol to HubConnection ctor
* Set default, make stuff public
* Fixup tests
* More test cleanup
* Spacing
* only grab remaining buffer bytes in json
* Last test fixes
* Get rid of some unused imports
* First round of msgpack tests
* Flip condition
* Respond to feedback
* Spacing
* More tests
* Add test for primitives
* Add more tests, start using msgpack-jackson
* Fix build.gradle
* Remove debug prints
* Start using Type instead of Class
* Add overloads for Type, make messagePack readValue() more efficient
* Apply feedback, add some tests
* Add some tests, fix some tests
* Fix tests for real
* Add a whole buncha tests
* Add TestUtils change that I didn't commit yesterday
* Respond to some feedback
* Add a couple Json tests
* Apply more feedback
* Move readonly fix to msgpack
* Minor optimization
* Fixup some javadocs
* Respond to feedback
* Remove TypeReference, make Protocols private again
* Feedback
This was resolved as part of moving to the WebAssembly SDK.
A test that would have helped us catch this sooner. This change addresses the test gap.
Resolves https://github.com/dotnet/aspnetcore/issues/24568
* Add support for the trust option on Linux on the command-line tool and print a message when it's used pointing to docs.
* Bump the certificate version to 2 to ensure that the certificate gets updated for 5.0 on Mac OS.
* Ensure we always select the certificate with the highest available version to ensure that when we change the certificate in the future older runtimes pick up the new certificate.
* Support exporting the certificate without key on PEM format.
* Fix Http/3 and mark multiplexed factory as experimental
* mark apis as internal and delete quic samples
* Remove extra public api
* Mark kestrel server as obsolete
* Fixing obsoletion and improved message
* Revert "Fixing obsoletion and improved message"
This reverts commit acdae8713d467264b4b3762b56fb4b882fa9127d.
* Revert "Mark kestrel server as obsolete"
This reverts commit fbd861f53afe93951b1f9cd004859551e085952d.
* Internalize SocketCOnnectionFactory
* nit
* fixup
Create new instances of List<T> with an appropriate capacity for the items that will be added.
Use Array.Empty<T>() where appropriate, rather than create an empty list and then return it.
* Updates to IdentityServer 4.0.4
* Updates templates with the new migrations.
* Fixes a small configuration bug that required the configuration for the key to be specified.
* Updates the error url in IdentityServer config to match our template defaults.
* Add support for model binding DateTime as UTC
Fixes https://github.com/dotnet/aspnetcore/issues/11584
* Make test work in other TZs
* Changes per PR comments
* Cleanup unused exception code path, fix doc comments
* Clean up usage of variables
* Adjust logging to be consistent
* Apply suggestions from code review
[master] Update dependencies from dotnet/efcore dotnet/runtime
- Updates:
- System.ComponentModel.Annotations: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Diagnostics.DiagnosticSource: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Diagnostics.EventLog: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Logging: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Logging.Abstractions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Logging.Configuration: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Logging.Console: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Logging.Debug: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Logging.EventLog: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Logging.EventSource: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Logging.TraceSource: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Options: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Options.ConfigurationExtensions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Options.DataAnnotations: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Primitives: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Internal.Transport: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Http: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Hosting: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Caching.Abstractions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Caching.Memory: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.Abstractions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.Binder: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.CommandLine: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.EnvironmentVariables: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.FileExtensions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.Ini: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.Json: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.UserSecrets: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Configuration.Xml: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.DependencyInjection: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.DependencyInjection.Abstractions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.DependencyModel: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.FileProviders.Abstractions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.FileProviders.Composite: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.FileProviders.Physical: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.FileSystemGlobbing: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.HostFactoryResolver.Sources: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Extensions.Hosting.Abstractions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.NETCore.App.Runtime.win-x64: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.NETCore.Platforms: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Win32.Registry: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.Win32.SystemEvents: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.NETCore.App.Internal: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Microsoft.NETCore.App.Ref: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Drawing.Common: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Text.Encodings.Web: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Text.Json: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Threading.Channels: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Windows.Extensions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.ServiceProcess.ServiceController: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Security.Principal.Windows: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.IO.Pipelines: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Net.Http.Json: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Net.Http.WinHttpHandler: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Net.WebSockets.WebSocketProtocol: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Reflection.Metadata: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Resources.Extensions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Runtime.CompilerServices.Unsafe: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Security.AccessControl: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Security.Cryptography.Cng: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Security.Cryptography.Pkcs: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Security.Cryptography.Xml: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- System.Security.Permissions: from 5.0.0-rc.1.20411.5 to 5.0.0-rc.1.20415.1
- Updates:
- Microsoft.EntityFrameworkCore.Tools: from 5.0.0-rc.1.20412.5 to 5.0.0-rc.1.20414.11
- Microsoft.EntityFrameworkCore.SqlServer: from 5.0.0-rc.1.20412.5 to 5.0.0-rc.1.20414.11
- dotnet-ef: from 5.0.0-rc.1.20412.5 to 5.0.0-rc.1.20414.11
- Microsoft.EntityFrameworkCore: from 5.0.0-rc.1.20412.5 to 5.0.0-rc.1.20414.11
- Microsoft.EntityFrameworkCore.Relational: from 5.0.0-rc.1.20412.5 to 5.0.0-rc.1.20414.11
- Microsoft.EntityFrameworkCore.Sqlite: from 5.0.0-rc.1.20412.5 to 5.0.0-rc.1.20414.11
- Microsoft.EntityFrameworkCore.InMemory: from 5.0.0-rc.1.20412.5 to 5.0.0-rc.1.20414.11
- Skip failing gRPC tests
- Skip more tests to avoid #24902
- try just removing "http" theory data
- Skip all `HttpClientHttp2InteropTests` tests on macOS
- no theory data due to #24902 and dotnet/corefx#30492 aka dotnet/runtime#26534 (now tracked somewhere else)
- Add bogus entry to avoid empty theory data
* Add nullable annotations to SignalR.Common, SignalR.Core and Http.Connections
Contributes to https://github.com/dotnet/aspnetcore/issues/5680
* Changes per PR comments. Also add nullability to hub protocols
* Allow ".dll" extensions in BlazorWebAssemblyLazyLoad MSBuild task.
* Only allow assemblies that are specified with an extension.
Co-authored-by: Adrian Wright <adrian@compiledcoding.co.uk>
* Add tests for navigate on form submit
* Add fix for re-render after event dispatch
* Remove deferred event handling in .NET
* Only dispatch events with registered handlers once
* Use BlazorWebAssemblySDK
* Update projects to use the BlazorSDK
* Remove tasks and targets from RazorSDK
* Remove workarounds from BlazorSDK
* Fixup
* Fixup
- target project is a test project; need to undo `$(SkipTestBuild)` impact in these jobs
nit: remove a comment from DeveloperCertificates project that's irrelevant now
* Remove Internal.AspNetCore.Analyzers
This resolves build flakiness caused by referencing the analyzer:
```
2020-08-07T21:22:39.1149296Z ##[error].dotnet\sdk\5.0.100-rc.1.20379.10\Microsoft.Common.CurrentVersion.targets(4188,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build)
Could not copy "F:\workspace\_work\1\s\artifacts\obj\Internal.AspNetCore.Analyzers\Release\netstandard1.3\Internal.AspNetCore.Analyzers.dll"
to "F:\workspace\_work\1\s\artifacts\bin\Internal.AspNetCore.Analyzers\Release\netstandard1.3\Internal.AspNetCore.Analyzers.dll". Beginning retry 1 in 1000ms.
The process cannot access the file 'F:\workspace\_work\1\s\artifacts\bin\Internal.AspNetCore.Analyzers\Release\netstandard1.3\Internal.AspNetCore.Analyzers.dll' because it is being used by another process.
```
The analyzer checks if pubternal types are being exposed in public APIs. We no longer author pubternal types, so this is no longer a concern.
* Remove DisablePubternalApiCheck
* Quarantine LinkedApplicationWorks
* Quarantine flaky tests
* Quarantine CanBindTextbox_Decimal_InvalidInput
* React to NetworkException type
* One more test
* Remove LinkerWorkaround.xml
The workaround file is no longer needed, now that the underlying bugs are fixed in the dotnet/runtime libraries.
Fix#23262
* Also remove LinkerWorkaround from Components/WebAssembly
* Add guard check for cleared closest DOM element
* Update src/Components/Web.JS/src/Rendering/BrowserRenderer.ts
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
* Quarantine falky test ServerEventTest.EventDuringBatchRendering_CanTriggerDOMEvents
Blazor's E2E testing uses a much shorter timeout after a test failure. This test run had several test failures, but most of these appear to be the result of
an incredibly short timeot. This PR quarantines the one test that appears to be a genuine failure and also increases the timeout duration for after test failure.
* Quarantine ServerExecutionTests.ServerGlobalizationTest.CanSetCultureAndParseCultureSensitiveNumbersAndDates
* Add workaround for deprecated overload in authentication scenarios
* Respond to feedback from peer review
* Use explicit version in Version.props
* Temporarily disable NU1065 warning
* Always use latest package version
* Add a middleware for browser refresh.
* Introduce a middleware that can connect to the dotnet-watch change server
* dotnet-watch: Inject the middleware in 3.1 or apps using start hooks \ hosting startup
https://github.com/dotnet/aspnetcore/issues/23412
* Update src/Tools/dotnet-watch/BrowserRefresh/src/StartupHook.cs
* Changes per PR comments
* Add a test for reading the script
* Changes per PR comments
* Updates docs
* Fixup test
* Add project ref
* Put back InternalCalls
* Removing .NET profiling calls
* Remove JS side profiling
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
* Turn on nullability annotations for public types in M.A.Hosting
* Turn on nullability annotations for Microsoft.AspNetCore and
Microsoft.AspNetCore.Server.Abstractions
Contributes to https://github.com/dotnet/aspnetcore/issues/5680
- #20818, fix e.g. references to Microsoft.Web.Xdt.Extensions in our packages
- make `@(Reference)` items much more broadly applicable
- emit an error when `@(ProjectReference)` is used instead of `@(Reference)`
- then get rid of the errors (!!)
- rename a couple of projects to match their assembly names
- then regenerate the `@(ProjectReferenceProvider)` items
- switch intersection approach from Exclude / Exclude to Copy / Update / Copy
Projects of particular interest:
- src/DefaultBuilder/src/Microsoft.AspNetCore.csproj
- honouring metadata left e.g. Microsoft.AspNetCore.Components.WebAssembly.DevServer package unchanged
- removed redundant metadata after that confirmation
- src/Razor/tools/Microsoft.AspNetCore.Razor.Internal.Transport/
- content of this package unchanged but metadata avoids extra work
- add a comment about the extra work
- src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/
- success! removes Microsoft.Web.Xdt.Extensions dependency from the package
- src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj
- add a `Condition` to avoid an ordering issue I hit here
- src/Tools/Extensions.ApiDescription.Server/src/
- avoid errors the new build ordering and timing caused
Separately, up the timeout in the `<DownloadFile />` task
- hit repeated timeouts downloading dotnet-runtime-5.0.0-rc.1.20370.4-win-x64.zip
nits:
- remove dupe `@(Reference)` item in Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj
- remove useless `%(ProjectReference.IsImplicitlyDefined)` metadata as well as its misspellings
- remove extra spaces from ProjectReferences.props
- clean up a few comments in ResolveReferences.targets
* !fixup! Correct other references to renamed projects
Using the full gc sometimes leads to an infinite recursion resulting
in a browser freeze. This was noted as part of running Blazor's benchmarks.
This is being addressed in rc1, in the meanwhile this reverts the behavior to 3.2 defaults.
Browser freezes when using a Blazor WASM application.
Yes. Full GC on is new to WASM on .NET Core
Low. Off by default is the behavior we had in 3.2.
* Implement CopyToAsync in the FileBufferingReadStream
- overrride Span and Memory overloads and implement array overloads in terms of those overloads.
- Implemented CopyToAsync (but not CopyTo)
- Added tests
Fixes#24032
- Annotated UseMiddleware and UseStartup to preserve constructors and public methods.
- Annotated UseHub and MapHub preserve constructors and public methods.
- Added a test to verify UseStartup and UseMiddleware works
- The linker.xml preserves constructors all of the types that are registered in DI. This should be removed once we get the linker friendly DI changes.
The output of the declaration file for Razor components are unaffected by all inputs other than the input .razor file.
Consequently we can avoid regenerating these files if the output is newer than the input. This is the same heuristic we apply to Blazor WebAsssembly's
compression artifacts.
This PR combines these two improvements for a ~90ms (10%) improvement in the inner loop.
```
17 ms GenerateBlazorWebAssemblyBootJson 1 calls
22 ms Copy 8 calls
39 ms ProcessFrameworkReferences 1 calls
40 ms RazorTagHelper 1 calls
51 ms ResolveAssemblyReference 1 calls
70 ms GetFileHash 1 calls
80 ms RazorGenerate 2 calls
111 ms Csc 2 calls
Time Elapsed 00:00:00.95
```
```
17 ms GenerateBlazorWebAssemblyBootJson 1 calls
21 ms Copy 8 calls
37 ms ProcessFrameworkReferences 1 calls
51 ms ResolveAssemblyReference 1 calls
70 ms Csc 1 calls
72 ms GetFileHash 1 calls
79 ms RazorGenerate 2 calls
Time Elapsed 00:00:00.86
```
In after: Csc calls reduced to one, RazorTagHelper call removed.
* Turn on nullability for Routing
We previously only had annotations enabled which resulted in incorrect nullability. This change enables
nullability.
Fixes https://github.com/dotnet/aspnetcore/issues/24042
* Updated PublicAPI.Unshipped
* Improve record type detection
Support both forms of Clone methods to detect record types
Co-authored-by: Pranav K <prkrishn@hotmail.com>
* Use Microsoft.CodeAnalysis.PublicApiAnalyzers
- #4259 1/2
- followup 2/3 for 5266918ed2
- includes baselines for 16 MVC projects
- will automated further additions in another PR
- suppress warnings that may cause back-compat problems if fixed
nit: sort `@(LatestPackageReference)` a bit better
* Add support for binding record types
* PR feedback
* PR changes
* Changes per PR comments
* Changes per PR comments
* Update src/Mvc/Mvc.Core/src/Resources.resx
* Apply suggestions from code review
* Add some more tests
* Undo blazor.server.js changes
* Fixup test
* Wires up CSS isolation on the build.
* Transforms the css files during build.
* Bundles all scopes css into a single file and exposes it on _framework/scoped.styles.cs
* Packs pre-processed files as static web assets.
* Wires up CSS isolation on the build.
* Transforms the css files during build.
* Bundles all scopes css into a single file and exposes it on _framework/scoped.styles.cs
* Packs pre-processed files as static web assets.
* Apply suggestions from code review
Cleaned up error messages. Thanks @jamesnk, I totally overlooked the content.
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
Co-authored-by: James Newton-King <james@newtonking.com>
* Started on head manager
* Working prototype.
* Started on improved meta tag support.
* Improved meta support and better thread safety.
* Improved synchronization.
* Added support for meta "property" attribute.
* Updated exception message.
* Added link element support.
* Started on functional tests.
* Added more functional tests.
* Added E2E tests.
* Simplified implementation.
* Prerendering support.
* Small documentation updates.
* Made TagElement and TitleElement readonly.
* Removed M.A.Components.Server dependency.
* Minor fixes and updates.
* Update PrerenderedHeadComponent.razor
* Removed AddWebExtensions.
* Applied CR feedback
* Add element/component name for duplicate key
* Add in keyword for frame param
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
* Add support for instantiating the startup class
- Adds an overload of UseStartup that takes a factory so users can control the instance creation. The factory is given the WebHostBuilderContext to expose access to configuration and IWebHostEnvironment.
- Make sure only one startup delegate runs, the last one registered.
* Update src/Hosting/Hosting/src/GenericHost/GenericWebHostBuilder.cs
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* PR feedback and bug fixes
- Use actual throw expressions...
- Added null checks
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* Simplify ref/ assembly generation
- followup 1/2 for 5266918ed2
- correct the Razor.Tools project
- `%(Reference.Version)` metadata does not bleed through into `@(PackageReference)` items
- much more work to do so than to add this special case
- remove `$(Razor_NewtonsoftJsonPackageVersion)`
- remove RTMVersions project and use RepoTasks instead
- make it an error if RepoTasks is not restored before anything else builds
- add items and properties for System.Security.AccessControl
nits:
- remove invalid (ignored) metadata in Directory.Build.props and AzureAppServices.SiteExtension project
- improve / extend a couple of comments
- move `@(Reference)` items together in Microsoft.AspNetCore.Razor.Tools
* Render 'OnNavigateError' fragment on unhandled exception in OnNavigateAsync
* Address first round of feedback from peer review
* Refactor OnNavigateAsync handling and fix tests
* Make OnNavigateAsync cancellation cooperative with user tasks
* Fix aggressive re-rendering and cancellation handling
* Fix up tests based on peer review
* Remove all ref/ projects
* Remove GenAPI infrastructure
* Remove notion of a reference assembly project
- remove `$(IsReferenceAssemblyProject)`, `$(ReferenceReferenceAssemblies)` and `$(ReferenceImplementationAssemblies)`
- remove unnecessary `$(NoWarn)` settings
nits:
- remove a few misleading comments
- wrap some long lines
* Move .0 package version workaround into Versions.props
- touch up SharedFramework.External.props
* Expose `%(LatestPackageReference.RTMVersion)` metadata
- automate use of properties in the `@(LatestPackageReference)` item group to make this maintainable
- add a couple of special cases at the bottom of eng/Dependencies.props
- add one more `$(...PackageVersion)` property to avoid yet-another special case
* Enable Roslyn reference assemblies
- exclude ref/ assembly from packages other than targeting pack
- update Microsoft.AspNetCore.App.Ref.csproj
- `%(IsReferenceAssembly)` and `%(ReferenceGrouping)` metadata no longer relevant
- only ref/ assemblies are in `@(ReferencePathWithRefAssemblies)` item group
nits:
- remove now-unnecessary workaround
- issues with TFM transition are behind us
- clean up Microsoft.AspNetCore.App.Runtime.csproj slightly
- use `GeneratePathProperty="true"`
- reorder item / property settings for meta-expansion
- correct spelling errors and phrasing in comments
* Update documentation to reflect recent changes
- remove CrossRepoBreakingChanges.md; was tied to old TeamCity infrastructure
- also much less relevant given repo merges
- adjust details and examples in ReferenceResolution.md
- reflect repo merges, Dependencies.props changes, and current Maestro++ channels
- add a few more details e.g. specific files where Version.Details.xml versions are used
* !fixup! Remove another irrelevant doc file
* !fixup! Address PR review suggestions
- convert a couple of warnings to errors
- use consistent casing for Microsoft.NETCore.App.Runtime.* packages
- reduce `%(LatestPackageReference.Version)` metadata special cases
- add and improve comments e.g.
- improve comments about `$(*V0PackageVersion)` properties
- improve placement of comments about item removal in ResolveReferences.targets
- confirmed `$(*V0PackageVersion)` property list is complete
nits:
- fix solution example in ReferenceResolution.md
- remove item group definition for `@(LatestPackageReference)`
- remove `%(LatestPackageReference.VersionName)` metadata after use; large item group
- similarly, remove `%(LatestPackageReference.RTMVersion)` when not needed; just complicates `Condition`s
When I squash, I must remember this fixes
- #14801
- dotnet/aspnetcore-internal#2693
* Actually use `%(LatestPackageReference.RTMVersion)` metadata
- gather RTM package references in a new project
- a (very) separate project to work around package conflict resolution
- empty `Test` target works around Arcade's testing approach
- new target in ResolveReferences.targets updates relevant assembly paths to use the RTM packages
- done as soon as possible after `ResolvePackageAssets` determines the paths
- done for all compilation inputs, not just ref/ assemblies
AuthorizeRouteView combines AuthorizeView and RouteView on one abstraction for convenience, but it was missing a Resource parameter to capture and flow the resource to pass on to the AuthorizationService. This PR adds a new Resource parameter and makes sure that the value is passed to the authorization service so that it is available for the authorization handlers in a policy.
* Modified EditForm to return _fixedEditContext via the EditContext parameter. Also added some tests to cover the new functionality
* Swapped to boolean to track provided EditContext
* Patched ref assembly
* Simplified setting _hasSetEditContextExplicitly
* Renamed _fixedEditContext to _editContext
* Updated null check in OnParametersSet
* Simplified check for EditContext updates based on Model changes
Add a `DisplayName` parameter to `InputBase`, which is used in validation messages instead of `FieldIdentifier.FieldName`.
- This works for `InputDate`, `InputNumber` and `InputSelect`.
- Extracted some shared code, just like what @StephanZahariev did in his PR.
Addresses #11414
This is the 3.1 version of https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/pullrequest/9014.
The concerns in 3.1 are slightly different than prior versions due to a significant redesign in how the response body was handled.
In 2.1 very few components implemented IHttpSendFileFeature, and most of those that did would eagerly terminate if the request aborted (e.g. HttpSys server). We mainly had to be concerned about the fallback code that did a copy loop when IHttpSendFileFeature wasn't available.
In 3.x the response body Stream, PipeWriter, and SendFileAsync were consolidated onto the new IHttpResponseBodyFeature. Now all servers and component shims support all three ways to send data and we can't make any assumptions about how eagerly they terminate. E.g. many components implemented SendFileAsync using a fallback copy loop, and these components don't have access to RequestAborted to eagerly terminate. This means that in 3.1 we need to pass the RequestAborted token when calling IHttpSendFileFeature.SendFileAsync, as well as any copy loops that have access to the token.
I've primarily fixed the HttpResponse.SendFileAsync extension methods and made sure the other affected components call through here.
[Infrastructure side note]
This commit needs to be rebased on internal/release/3.1 before merging. That branch can't be built locally so I developed this fix based on release/3.1 instead.
Adds an empty InvokeAsync() overload for both EventCallback and EventCallbackOfT.
Updated tests to simply use this new overload instead of InvokeAsync(null).
Addresses #23603.
* [Blazor] Support IAsyncDisposable in components
* Handles async disposal of components within the Blazor pipeline.
* Renders remain synchronous and don't wait for disposal to complete.
* Synchronous disposal executions remain inlined.
* Async disposal executions can trigger renders in different batches.
* Async disposals are handled individually and not grouped based on the batch they were generated on.
* Default new runtime feature switches
These new feature switches have been added to the runtime to make applications smaller. Setting reasonable defaults to Blazor wasm projects.
Fix#23716
* PR feedback
* Default new runtime feature switches
These new feature switches have been added to the runtime to make applications smaller. Setting reasonable defaults to Blazor wasm projects.
Fix#23716
* PR feedback
* Spruce up async handling in OnNavigateAsync
* Apply suggestions from code review
Co-authored-by: Günther Foidl <gue@korporal.at>
* Ensure previous task awaited before starting next one
* Apply suggestions from code review
Co-authored-by: Pranav K <prkrishn@hotmail.com>
* Validate no exceptions throw on multiple invocations
* Address feedback from peer review
Co-authored-by: Günther Foidl <gue@korporal.at>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
* Add sharedfx and targeting pack tests (#23045)
* Add test for assembly versions
* Add test for framework list
* Add some hardcoded lists for sharedfx and targeting pack content
* Fix failing tests
* Fix targeting pack tests
* Feedback
* Move to latest NuGet.exe
- 5.3.0 -> 5.6.0
- should improve performance and may improve reliability
* Also switch from NuGet.Build.Tasks to NuGet.Packaging
- move to 5.6.0 version here too
- reduce transitive dependencies; we don't need them all
* Migrated protected browser storage.
* Added E2E tests.
* Added safeguard against using ProtectedBrowserStorage in wasm.
* Added TryGetValue.
* Added Microsoft.AspNetCore.Components.Web.Extensions
* Minor cleanup
* Moved ProtectedBrowserStorage out of Web.JS.
* Delete Microsoft.AspNetCore.Components.Web.Extensions.netcoreapp.cs
* Updated ProjectReferences.props
* Improvements and cleanup.
* Update Microsoft.AspNetCore.Components.Web.Extensions.csproj
* Added Web.Extensions to the VS solution.
* Add framework support for lazy-loading assemblies on route change
* Configure lazy-loaded assemblies in WebAssemblyLazyLoadDefinition
* Move tests to WebAssembly-only scenarios
* Refactor RouteTableFactory and add WebAssemblyDynamicResourceLoader
* Address feedback from peer review
* Rename 'dynamicAssembly' to 'lazyAssembly' and address peer review
* Add sample with loading state
* Update Router API and assembly loading tests
* Support and test cancellation and pre-rendering
* Apply suggestions from code review
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
* Spurce up API and add tests for pre-rendering scenario
* Use CT instead of CTS in NavigationContext
* Address feedback from peer review
* Remove extra test file and update Router
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
All rules are currently disabled, except for one that I enabled for
src/Http via a new ".editorconfig" file I added there.
Other changes:
* Allow editorconfigs in MVC and Razor to flow to the root
* Consolidate a few editorconfig settings
* Tweak Ruleset config in Azure/AzureAD where it clashed.
Addresses the beginning of #9620, but it's a fair chunk of work to
enable most rules through the whole repo. That can be done directory by
directory and rule by rule by dropping .editorconfig files though.
* Tweaks to make dotnet-watch run faster
* Previously dotnet-watch calculated the watch file list on every run by invoking MSBuild. This
changes the tool to only calculate it if an MSBuild file (.targets, .props, .csproj etc) file changed
* For dotnet watch run and dotnet watch test command, use --no-restore if changed file is not an MSBuild file.
* Add opt-out switch
* Update src/Tools/dotnet-watch/README.md
* Fixup typo
* Update src/Tools/dotnet-watch/README.md
* The underlying Json issue is fixed.
* The X509 issue is not an issue when TrimMode is set to link (which is it now by default).
Contributes to #23262
* Use preferred overloads of string.Split
* Revert TrimEntries for netstandard2.0
Revert usage of StringSplit.TrimEntries for projects that target netstandard2.0.
Co-authored-by: Levi Broderick <levib@microsoft.com>