-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Cleanup GenFacades logic and don't bind against non-shipping contract assemblies #78703
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
Cleanup GenFacades logic and don't bind against non-shipping contract assemblies #78703
Conversation
System.DirectoryServices.AccountManagement now builds against src/System.DirectoryServices instead of ref/System.DirectoryServices (because the package doesn't contain the ref assembly). Because of that, the compiler now gets confused because of the System.DirectoryServices.Interop namespace and the global Interop class. This happens even though the DirectoryServices.Interop namespace doesn't include any public types. That results in the following erros: src\libraries\System.DirectoryServices.AccountManagement\src\System\DirectoryServices\AccountManagement\AD\SidList.cs(50,26): error CS0246: The type or namespace name 'SID_AND_ATTRIBUTES' could not be found (are you missing a using directive or an assembly reference?) src\libraries\System.DirectoryServices.AccountManagement\src\System\DirectoryServices\AccountManagement\interopt.cs(439,20): error CS0246: The type or namespace name 'UNICODE_INTPTR_STRING' could not be found (are you missing a using directive or an assembly reference?) This commit fixes that by removing the System.DirectoryServices.Interop namespace and moving the types into the parent namespace.
Now that Schema compiles against the source assembly of System.CodeDom, it receives nullability errors. I'm suppressing them manually for now but am filing an issue to correctly fix those. Related: dotnet#78036
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsFixes #63467 Update the GenFacades package and configure it so that shims can pass a different reference assembly in than what they return via the Restructure the resolveContract.targets file to make it more shareable with the rest of the repository (potential follow-up change). Define section to better indicate what features the file exposes. Merge the resolveContract.props into it as that file's purpose was limited. Introduce the System.DirectoryServices.AccountManagement now builds against Because of that, the compiler now gets confused because of the That results in the following errors: This commit fixes that by removing the System.DirectoryServices.Interop Now that Schema compiles against the source assembly of System.CodeDom, Related: #78036
|
akoeplinger
left a comment
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.
One question, looks good otherwise.
Fixes #63467
Update the GenFacades package and configure it so that shims can pass a different reference assembly in than what they return via the
ReferenceAssemblyattribute in theAnnotateTargetPathWithTargetPlatformMonikerWithReferenceAssemblytarget.Restructure the resolveContract.targets file to make it more shareable with the rest of the repository (potential follow-up change). Define section to better indicate what features the file exposes. Merge the resolveContract.props into it as that file's purpose was limited.
Introduce the
AnnotateTargetPathWithContractswitch to make it configure-able when a source project should return the reference project's assembly instead of the source assembly, when other projects compile against it. Set it so that reference assemblies are only returned forNetCoreAppCurrenttfms or when the project isn't packable.System.DirectoryServices.AccountManagement now builds against
src/System.DirectoryServices instead of ref/System.DirectoryServices
(because the package doesn't contain the ref assembly).
Because of that, the compiler now gets confused because of the
System.DirectoryServices.Interop namespace and the global Interop class.
This happens even though the DirectoryServices.Interop namespace doesn't include any
public types.
That results in the following errors:
This commit fixes that by removing the System.DirectoryServices.Interop
namespace and moving the types into the parent namespace.
Now that Schema compiles against the source assembly of System.CodeDom,
it receives nullability errors. I'm suppressing them manually for now
but am filing an issue to correctly fix those.
Related: #78036
Opened #78704 to track cleaning-up the introduced nullability suppressions.