-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Simplify ref/ assembly generation #24136
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
src/Razor/Microsoft.AspNetCore.Razor.Tools/src/Microsoft.AspNetCore.Razor.Tools.csproj
Outdated
Show resolved
Hide resolved
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.
Razor TOols changes look fine
src/Razor/Microsoft.AspNetCore.Razor.Tools/src/Microsoft.AspNetCore.Razor.Tools.csproj
Outdated
Show resolved
Hide resolved
|
||
If testing this configuration prior to servicing, update the versions of dependencies too. E.g. change | ||
`$(SystemSecurityPrincipalWindowsV0PackageVersion)` if you change `$(SystemSecurityAccessControlV0PackageVersion)` | ||
because System.Security.AccessControl will otherwise be loadable. This should not be necessary in servicing. |
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.
@ericstj when I updated only $(SystemSecurityAccessControlV0PackageVersion)
in testing, the newer (non-RTM) copy of System.Security.AccessControl.dll ended up in our targeting pack. I believe the newer assembly was also used in most compilations. It was difficult to tell exactly why but my guess is the newer System.Security.Principal.Windows.dll was somehow considered incompatible and conflict resolution chose the newer version of both. (The System.Security.Principal.Windows package is a direct dependency of a few of our packages.)
Will we hit something similar if dotnet/runtime ships System.Security.AccessControl 5.0.1 but leaves System.Security.Principal.Windows at 5.0.0❔ Put another way, will dotnet/runtime build but not ship a newer System.Security.Principal.Windows.dll and use that when compiling System.Security.AccessControl.dll❔ If yes, we'll need to be really careful here (perhaps adding further workarounds) and I shouldn't include the "not be necessary" words.
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’s nothing fancy here. It just chooses the newer version. You’ll only see things go app local if you use a newer package than what’s in the shared framework you target.
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.
We don't generally use our own part of the shared Fx when building and the example assemblies are in Microsoft.AspNetcore.App.Ref, not Microsoft.NETCore.App.Ref. So, does "nothing fancy" help us with the corner case I describe❔
I'd like to know we can rev one without the other reliably before we get to 5.0.1. (And, these packages / assemblies have a few other inter-dependencies.)
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.
Unless someone objects, I'm going to assume the worst case here would be silently compiling against 5.0.x (newer) versions of these packages when servicing. Will file an issue about testing that %(RTMVersion)
metadata is respected. That test will likely be a bit painful since we won't be building our targeting pack when servicing and checks will require looking at all references in our implementation assemblies for the relevant assemblies then checking their [AssemblyInformationalVersion()]
attributes against the expected package version.
Side question: I see |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@@ -205,21 +205,23 @@ | |||
</Target> | |||
|
|||
<!-- | |||
Muck with @(ResolvedCompileFileDefinitions) items between generation and use in order to compile against RTM lib/ | |||
Change @(ResolvedCompileFileDefinitions) items between generation and use in order to compile against RTM lib/ |
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.
Good change 😆
- followup 1/2 for 5266918 - 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 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
nits: - remove redundant `%(Reference.Version)` metadata for Microsoft.Css.Parser too - move `@(Reference)` items together in Microsoft.AspNetCore.Razor.Tools
6cef541
to
a8f41b2
Compare
%(Reference.Version)
metadata does not bleed through into@(PackageReference)
itemsnits: