when attempting to enable client debugging on blazor-wasm an attempt to
provide a helpful message casues an ¨Unknown OS platform¨ exception
relates to #16366#12970
* Use the analyzer from the SDK when available
This prevents a build warning when building a project that contains a reference to
Microsoft.AspNetCore.Components and a netcoreapp3.0 or newer targeting Web project.
The Web SDK implicitly adds the Components.Analyzer for netcoreapp3.0 or newer targeting projects.
If the project additionally referenced this package (directly or transitively), the package would
set up a property that prevented the implicit analyzer reference. This prevented the analyzer from
being referenced twice.
There were two issues with the current approach:
a) The props file wasn't propogated via buildTransitive. Consequently transitive project references
would reference two copies of the analyzer. When these were different versions, it resulted in a compiler
warning.
b) Forward looking, this prevents newer versions of the analyzer shipped from the SDK from ever being used.
This is particularly problematic since apps are likely to reference component libraries that were previously
compiled against 3.x.
This change attempts to mitigate both of these issues:
a) We add a buildTransitive so our build targets flow
b) We knock out the analyzer added by the package if the SDK's already added it.
Fixes https://github.com/dotnet/aspnetcore/issues/18563
* Update Microsoft.AspNetCore.Components.Analyzers.targets
* Update Microsoft.AspNetCore.Components.Analyzers.targets
* Add a description
* Update Microsoft.AspNetCore.Components.Analyzers.targets
* Add service worker
* Add manifest
* Bring back BaselineTest.cs
* Add baselines for blazorwasm templates
* Add publishing test for PWA template
* Baseline fixes
* Fix baseline test logic to allow for multi-project outputs
* Remove non-blazorwasm baselines, since this branch now only covers blazorwasm
* Add test for PWA publish output
* Beginning generation of assets manifest
* Generate assets manifest including blazor outputs
* Tweaks
* Write assets manifest in JSON form
* Publish service worker
* Better API
* More resilience
* Better API again
* Make ComputeBlazorAssetsManifestItems public as people will need to customize the list
* Exclude service worker files from assets manifest
* Use web standard format for hash
* Update project template
* In assets manifest, only include items being published
* Renames
* Compute default assets manifest version by combining hashes
* Emit sw manifest in .js form
* Update service worker in project
* Actually isolate browser instances when requested during E2E tests
* E2E test for published PWA operating offline
* Fix SWAM path in template
* Clarify targets
* Mark AspNetCore projects that aren't packaged explicitly
- avoid NU5104 warnings due to confusing versioning
- `$(IsShippingPackage)` was semantically incorrect in any case
* Remove redundant `$(IsShippingPackage)` settings in `$(IsAspNetCoreApp)` projects
- default is `true` for all implementation projects
* Use `$(IsPackable)` when deciding how `$(IsAspNetCoreApp)` projects are handled
- remove all use of `$(IsShippingPackage)` for shared framework composition
- update documentation to match these changes
nits:
- remove odd default for `$(IsPackable)` in Directory.Build.targets
- no longer relevant since all `$(IsAspNetCoreApp)` projects are `$(IsShippingPackage)` too
- include more information in docs/ProjectProperties.md
* Add direct System.Text.Json references
- avoid MSB3277 warnings
* Build against the 3.1.0 AspNetCore
The version of the runtime that projects compile against
is stamped in to the runtimeconfig.json. In an earlier change, the AspNetCoreRef version
was bumped up to 3.1.2 which causes running dotnet dev-serve to fail
if you do not have the runtime installed.
In addition, the template json allows roll-forwards to major version (5.0 versions) if that's the only version
available. We do this with the razor compiler:
https://github.com/dotnet/aspnetcore-tooling/blob/master/src/Razor/src/Microsoft.AspNetCore.Razor.Tools/runtimeconfig.template.json
The version of the runtime that projects compile against
is stamped in to the runtimeconfig.json. In an earlier change, the AspNetCoreRef version
was bumped up to 3.1.2 which causes running dotnet dev-serve to fail
if you do not have the runtime installed.
In addition, the template json allows roll-forwards to major version (5.0 versions) if that's the only version
available. We do this with the razor compiler:
https://github.com/dotnet/aspnetcore-tooling/blob/master/src/Razor/src/Microsoft.AspNetCore.Razor.Tools/runtimeconfig.template.json
* Use stable versioning in blazor-wasm
* This branch never builds the targeting pack
* Update eng/Versions.props
* Undo changes to patchconfig.props
Co-authored-by: Pranav K <prkrishn@hotmail.com>