-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Keep @(Reference)
metadata when creating @(ProjectReference)
items
#21567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e9e81db
to
b875f2a
Compare
b875f2a
to
95dc49a
Compare
@(Reference)
-> @(ProjectReference)
conversion into a target@(Reference)
metadata when creating @(ProjectReference)
items
95dc49a
to
f5507b5
Compare
Also building in https://dev.azure.com/dnceng/internal/_build/results?buildId=753395 to create the Microsoft.AspNetCore.AzureAppServices.SiteExtension package. |
- #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 questions about current `@(PackageReference)` items: - why does Internal.AspNetCore.Analyzers project use Microsoft.CodeAnalysis.CSharp.Workspaces v2.8.0? - should we move from Yarn.MSBuild 1.15.2 to 1.22.4 i.e. `yarn` 1.13.0 to 1.22.4? - should `AddContent` target in Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj instead get 5.0 packages? - should we move `MsQuicPackage.*` version from QuicSampleClient and QuicSampleApp projects to eng/Versions.props?
f5507b5
to
bc3bad0
Compare
Another internal build at https://dev.azure.com/dnceng/internal/_build/results?buildId=754565 |
I have double-checked the packages for updated projects and found no differences other than the expected assembly file versions and the #20818 fix. This PR is ready for review. |
questions about current
|
Sure. |
I'm not really familiar with that package. @JunTaoLuo would know best |
I'm not really sure what that part is for, but it does look like we should probably update the version.
No objections here. |
<!-- Use only Reference items when project is a reference provider. Simplifies project moves and shortens files. --> | ||
<_AllProjectReference Update="@(ProjectReference->'%(Filename)')" DirectUse="1" /> | ||
|
||
<_AllProjectReference Update="@(Reference)" Use="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a guarantee we'll never need to update this list of metadata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are few guarantees in life😈 But, the current list goes pretty far beyond what we're likely to use in *.csproj
and *.fsproj
projects and should hold us in good stead until and unless new metadata is invented. I included everything I saw used in existing @(Reference)
and @(ProjectReference)
items in this repo as well as what seemed plausible from the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like goodness
I'll file an issue about the changes we could or should make based on the answers to my questions above once we hear from @JunTaoLuo. |
FYI, after our offline discussion, we're going to try updating the TFM of Internal.AspNetCore.Analyzers to target netstandard2.0 TFM so it can consume the same version of the roslyn packages as the rest of the repo. Also good to double check if we plan on removing this package outright at some point. |
@pranavkm following up on @JunTaoLuo's comment just above
I'm double-checking😺 I couldn't find a seemingly-relevant issue about removing the analyzer but also can't find anywhere we're suppressing it other than for analyzers and tools. Do we need this anymore❔ And, if we need it, why is it packaged i.e. is the package just a holdover from when the project was in dotnet/extensions❔ |
That seems like the most likely scenario.
I think I commented on this in another issue. There's only one analyzer in the package about not exposing pubternal types. We don't have any of those any more so it seems entirely unnecessary. |
#24608 covers the follow-up points above |
@(Reference)
items much more broadly applicable@(ProjectReference)
is used instead of@(Reference)
@(ProjectReferenceProvider)
itemsProjects of particular interest:
Condition
to avoid an ordering issue I hit hereSeparately, up the timeout in the
<DownloadFile />
tasknits:
@(Reference)
item in Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj%(ProjectReference.IsImplicitlyDefined)
metadata as well as its misspellings