-
Notifications
You must be signed in to change notification settings - Fork 316
Test | Expose internal types to ManualTests #3239
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,10 @@ | |
| <PropertyGroup> | ||
| <TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFramework)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <InternalsVisibleTo Include="ManualTests" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I love it, but do we need to restrict via strong names and public keys? As-is, I think this would let anyone pair their assembly named "ManualTests" with our MDS package, and easily access internals. Maybe that isn't a concern though, since they can bypass the whole visibility system via reflection anyway. Thoughts? |
||
| <InternalsVisibleTo Include="FunctionalTests" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" /> | ||
| <EmbeddedFiles Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" /> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| using System.Runtime.CompilerServices; | ||
|
|
||
| [assembly: InternalsVisibleTo("ManualTests")] | ||
| [assembly: InternalsVisibleTo("FunctionalTests")] |
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.
This syntax is only available in SDK style projects that use .NET 5+. Our only option for netfx was direct assembly tags.