Skip to content
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

Enable InternalsVisibleTo for CommunityToolkit.Maui.Core #3798

Merged
merged 1 commit into from
Dec 20, 2021
Merged

Enable InternalsVisibleTo for CommunityToolkit.Maui.Core #3798

merged 1 commit into from
Dec 20, 2021

Conversation

brminnick
Copy link
Contributor

Description of Change

The .NET MAUI Community Toolkit recently added a new CSPROJ, CommunityToolkit.Maui.Core.

This PR builds on the previous pull request enabling InternalsVisibleTo for the .NET MAUI Toolkit, adding [assembly: InternalsVisibleTo("CommunityToolkit.Maui.Core")].

Additions made

Adds InternalsVisibleTo for the .NET MAUI Community Toolkit libraries

[assembly: InternalsVisibleTo("CommunityToolkit.Maui")]
[assembly: InternalsVisibleTo("CommunityToolkit.Maui.Core")]
[assembly: InternalsVisibleTo("CommunityToolkit.Maui.UnitTests")]
[assembly: InternalsVisibleTo("CommunityToolkit.Maui.Markup")]
[assembly: InternalsVisibleTo("CommunityToolkit.Maui.Markup.UnitTests")]

@maxkoshevoi
Copy link
Contributor

You can also do it via csproj / props files (starting VS 2022):

<ItemGroup>
    <InternalsVisibleTo Include="CommunityToolkit.Maui.Core" />
</ItemGroup>

@VladislavAntonyuk
Copy link
Contributor

You can also do it via csproj / props files (starting VS 2022):

<ItemGroup>
    <InternalsVisibleTo Include="CommunityToolkit.Maui.Core" />
</ItemGroup>

I think we should follow the rule where all other attributes defined

@maxkoshevoi
Copy link
Contributor

maxkoshevoi commented Dec 20, 2021

You can also do it via csproj / props files (starting VS 2022):

<ItemGroup>
    <InternalsVisibleTo Include="CommunityToolkit.Maui.Core" />
</ItemGroup>

I think we should follow the rule where all other attributes defined

You can move all attributes to props / csproj files. All such attributes were moved from AssemblyInfo.cs to project files with .Net Core, and now InternalsVisibleTo can also be moved there.
For example, you no longer specify version, or author in AssemblyInfo, right?

PS: Also you can add cool stuff like <InternalsVisibleTo Include="$(AssemblyName).UnitTests"/> to Directory.Build.props

@PureWeen PureWeen enabled auto-merge (squash) December 20, 2021 15:27
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen PureWeen merged commit 19e2a76 into dotnet:main Dec 20, 2021
@samhouts samhouts added the area-architecture Issues with code structure, SDK structure, implementation details label Jul 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-architecture Issues with code structure, SDK structure, implementation details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants