Commit Graph

7 Commits

Author SHA1 Message Date
Pranav K f04992fab5
Add nullable to DataProtection (#22591)
* Add nullable to DataProtection

Contributes to https://github.com/dotnet/aspnetcore/issues/5680
2020-06-13 20:39:41 -07:00
Doug Bunting c2ee4ae820
Re-enable source build job
- change ref/ projects to build only the default TFM during source builds
  - avoid errors restoring packages like Microsoft.BCL.AsyncInterfaces
  - may also speed up source builds slightly
2020-02-19 22:46:22 -08:00
John Luo 9522e1dd2e Multi-target all shared framework projects with netcoreapp3.1 (#17998)
- regen ref
2020-01-15 12:08:17 -08:00
Doug Bunting cf6b5028c3
Improve generation and use of ref/ projects (#17311)
* Remove useless src/PackageArchive files
- not used outside 2.x branches

* Improve use of ref/ assemblies
- compile against ref/ assemblies but do not change package metadata
  - update the metadata of implementation projects to include the ref/ assembly path
  - update `@(ReferenceAssembly)` metadata for Extensions packages, not `@(PackageReference)`
  - can be disabled using `$(CompileUsingReferenceAssemblies)` e.g. when generating ref/ projects
- include ref/ projects in source build by default
  - remove `$(ExcludeFromSourceBuild)` overrides from ref/ project files
- use latest package references and use project references even when _not_ building the targeting packs
- restore previous `@(Reference)` -> `@(PackageReference)` logic
  - add build-only Microsoft.Internal.Extensions.Refs package reference in most cases
- remove IndirectReferences.props and `@(_ExtensionInternalRefAssemblies)`; no longer needed

* Improve ref/ project generation
- use ../src/**/AssemblyInfo.cs files instead of including attributes in *.Manual.cs files
  - for same reason, copy `@(InternalsVisibleto)` items from src/ to ref/ projects
- use eng/targets/CSharp.ReferenceAssembly.props instead of ref/Directory.Build.props files
- use TFM-specific *.Manual.cs files in ref/ project files instead of ref/Directory.Build.props files

optimizations and usability improvements:
- add `$(BuildMainlyReferenceProviders)` property to focus on reference providers when generating ref/ projects
- disable `$(UseReferenceAssemblyInImplementation)` to avoid using ref/ projects while generating them

nits:
- clean up whitespace and remove blank lines in ref/ project files

* Perform smaller cleanup
- remove `$(IsTargetingPackPatching)`; use only `$(IsTargetingPackBuilding)`
- remove `$(DisableServicingFeatures)`; enable the servicing features we need
  - suppress baseline references even in servicing builds
- restore `$(AdditionalGenApiCmdOptions)`; useful when updating *.Manual.cs files

nits:
- simplify conditions using `$(HasReferenceAssembly)`
- correct spelling in comments
- shorten long lines

* Use a response file for GenAPI commands
- work around dotnet/arcade#4021 and help with additional ref assemblies
- mimic 111462e0c2 and integrate w/ other changes here

* Undo some manual ref/ project changes
- now done automatically or centrally
- remove manual `[TypeForwardedTo]` and `[InternalsVisibleTo]` attributes
  - fully qualify a type now that `using` is gone
- remove dupe `@(Compile)` items for *.Manual.cs files; included in the ref/ project files
- remove redundant `$(AllowUnsafeBlocks)` and `$(NoWarn)` settings

nits:
- rename a *.Manual.cs file that's not TFM-specific
- remove `private` members

* Correct use of `@(ProjectReference)` items for reference providers
- use `@(Reference)` instead

* Remove recently-added `@(Compile)` and `@(Reference)` items
- were added due to missing `[InternalsVisibleTo]` attributes in ref/ assemblies or as early workarounds
  - plus, now transitive references **Just Work™️**
- expose `ClosedGenericMatcher` in the usual (*.Manual.cs) way
- also undo Microsoft.Extensions.ApiDescription.Server workaround

* Remove `private` members from ref/ *.Manual.cs files
- not useful and bloat the ref/ assemblies

* Cleanup warnings
- avoid "CSC warning CS2008: No source files specified." building site extensions
- correct warnings (as errors) about `RenderToStringResult` being obsolete
  - add Microsoft.AspNetCore.SpaServices.Tests to Middleware solution

* Remove `@(RuntimeHostConfigurationOption)` workarounds
- deps files are unaffected by new ref/ assembly handling and test projects aren't special-cased
- also execute a test previously skipped due to deps file problems

* Regenerate ref/ projects
- pick up the latest generation changes

(unclear why Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs changed but works)

* Fill in missing `internal` types 1 of n
- rename Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs; need `RenderTreeFrame` type everywhere
- add types needed in unit and perf tests to *.Manual.cs files

* Clean up recent commits
- remove recently-added `private` members
- restore `_dummyPrimitive` fields in Microsoft.AspNetCore.Server.HttpSys.Manual.cs

* Add *.Manual.cs files for more projects

* !fixup! fields in *.Manual.cs `struct`s
- GenAPI sometimes generates `_dummy` and `_dummyPrimitive` fields _instead of_ visible members
- what GenAPI generates sometimes have the right length but actual fields don't hurt
  - that is, using the real fields corrects both the visible API and `struct`s' sizes

nits:
- consolidate `namespace`s in Microsoft.AspNetCore.Mvc.Core.Manual.cs

* Remove special case for generating ref/ projects on non-Windows
- referenced issue was closed with no action but workaround still not required
- no tabs in generated content

* Only create ref/ projects for assemblies in the shared framework
- restrict when `$(HasReferenceAssembly)` is `true` by default
- add warnings when `$(IsAspNetCoreApp)` or `$(HasReferenceAssembly)` have unexpected values

* Remove "extra" ref/ projects
- associated implementation projects no longer have `$(HasReferenceAssembly)` set to `true`

* Add a few GenAPI exclusions
- see dotnet/arcade#4488
- generation for these members leads to NREs

* Add more `internal` types and members
- Identity/Core
- Identity/Extensions.Core
- Mvc/Mvc.ViewFeatures

* Add direct dependencies to work around CS1705 errors
- add direct references to some test and sample projects to make intent clear i.e. address CS1705 root cause
  - these projects must use implementation assemblies for those direct references
  - requirement also applies to anything depending on them e.g. functional tests
  - for simplicity, use `$(CompileUsingReferenceAssemblies)` instead of targeted `@(Reference)` metadata
- leads to ~40 projects that do not themselves add ref/ metadata
  - this is _not_ transitive i.e. it applies only to projects that override `$(CompileUsingReferenceAssemblies)`

* nits: Remove a few more `private` members in *.Manual.cs files

* !fixup! correct namespaces of a few types in *.Manual.cs files

* Try another way to fix Microsoft.AspNetCore.Blazor.Build.Tests

* Try another way to fix missing targets in Web.JS.npmproj
2019-12-11 07:36:59 -08:00
dotnet-maestro[bot] 2c6456d463 [release/3.0] Update dependencies from 4 repositories (#14425)
* Update dependencies from https://github.com/dotnet/arcade build 20190924.3
* Update dependencies from https://github.com/aspnet/Blazor build 20191003.2
* Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20191007.2
* Update dependencies from https://github.com/aspnet/EntityFrameworkCore build 20191010.4
* Remove potentially unnecessary feeds
* Install the runtime during source build
* Pin m.nc.app.ref
* Add aspnetcore-dev feed back to nuget.config
* Pin internal refs package
* Move efcore internal refs dependency
* Compile against ref assemblies
* Add manually generated internal ref assembly:
  * DataProtection
  * Kestrel
  * Hosting
  * Http
  * Mvc
  * Middleware
  * SignalR
  * Identity
  * Components
* Fix crossgen for ref compilation
* Fix tools for ref compilation
* Explicitly specify ExcludeFromSourceBuild
* Build targeting pack for 3.0.1
* Improve condition for building targeting pack in 3.0.1
* Fixing siteex build for ref compilation
* Resolve reference assemblies from Extensions
* Don't build refPack during source build
* Add big list of project references, for tests to use
  * Exclude sources files from indirect references
  * The types in these packages will be compiled into the binaries of the projects that directly depended o it
  * Add manual indirect references to project references
  * Add samples/test assets
  * Don't add indirect refs for ProjectRefs with ReferenceOutputAssembly=false
* Fix JSInterop for ref compilation
* Do not substitute ext ref assemblies in ref pack
* Disable the TestFramework assembly attribute from Logging.Testing
There's custom logic in ProjectTemplates.Tests to use a different TestFramework instead
* Fix Functional tests
  * Issues caused by incorrect deps files working around this via test infrastructure instead
  * Mvc
  * Analyzers
  * StaticFiles
  * SignalR
  * HttpOverrides
2019-10-28 18:06:32 -07:00
Hao Kung f35564ba06
Move DataProtection and Extensions.Identity to netstandard2.0/2.1 (#11008) 2019-06-21 14:40:42 -07:00
Pavel Krymets 9355c7c1a5
Add reference assemblies support (#7764) 2019-02-21 14:33:35 -08:00