Repository navigation
Add RequiresAssemblyFiles attribute - #56196
Conversation
This PR annotates every API doc'd as having different behavior in single-file publishing with RequiresAssemblyFiles. Some APIs might be special-cased by the analyzer to produce special messages, but RAF is useful for visual inspection of the APIs. Module.Name and .FullyQualifiedName were also unannotated.
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
@buyaa-n This PR is assigned to you for follow-up before the RC1 snap. |
|
@buyaa-n anything else? |
buyaa-n
left a comment
There was a problem hiding this comment.
Left two minor comments, overall LGTM
|
@buyaa-n If you wouldn't mind taking another look, I found some more missing annotations, and an inconsistency in casing that I've tried to fix up. @VSadov @vitek-karas for change in casing in runtime. In theory this could be a breaking change for people upgrading from .NET 5 to .NET 6 but I think the inconsistent casing meant it was impossible for them to rely on specific behavior in this situation anyway. I'd rather settle on one casing for .NET 6. |
I believe that the runtime reflection APIs have been consistently returning uppercase |
This reverts commit 283bd36.
Co-authored-by: Buyaa Namnan <buyankhishig.namnan@microsoft.com>
The current casing is `<unknown>` but the casing used in the runtime is `<Unknown>`.
|
OK, I think this is finally up-to-date. I ended up finding a questionable behavior in single-file for |
|
@buyaa-n Anything else? I think the one tricky bit I've filed an issue for, so we can come back to it later. I took Jan's advice and changed the casing of |
buyaa-n
left a comment
There was a problem hiding this comment.
One NIT comment, overall LGTM
This PR annotates every API doc'd as having different
behavior in single-file publishing with RequiresAssemblyFiles.
Some APIs might be special-cased by the analyzer to produce
special messages, but RAF is useful for visual inspection
of the APIs. Module.Name and .FullyQualifiedName were also
unannotated.
Docs: https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file
Assembly.Location | Returns an empty string.
Module.FullyQualifiedName | Returns a string with the value of
<Unknown>or throws an exception.Module.Name | Returns a string with the value of
<Unknown>.Assembly.GetFile | Throws IOException.
Assembly.GetFiles | Throws IOException.
Assembly.CodeBase | Throws PlatformNotSupportedException.
Assembly.EscapedCodeBase | Throws PlatformNotSupportedException.
AssemblyName.CodeBase | Returns null.
AssemblyName.EscapedCodeBase | Returns null.