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

Remove InternalsVisibleTo from Aspire.Hosting to Aspire.Hosting.Testing #2930

Closed
eerhardt opened this issue Mar 15, 2024 · 3 comments · Fixed by #3193
Closed

Remove InternalsVisibleTo from Aspire.Hosting to Aspire.Hosting.Testing #2930

eerhardt opened this issue Mar 15, 2024 · 3 comments · Fixed by #3193
Assignees
Labels
area-app-testing Issues pertaining to the APIs in Aspire.Hosting.Testing

Comments

@eerhardt
Copy link
Member

Today we have InternalsVisibleTo from Aspire.Hosting to Aspire.Hosting.Testing

<InternalsVisibleTo Include="Aspire.Hosting.Testing" />

We need to remove this because we aren't guaranteed that these 2 nuget packages version in lock step, or that users will always have the exact same matching versions (they could upgrade their Aspire.Hosting without updating the Aspire.Hosting.Testing). When this happens, and we refactor some internal APIs, users will get weird errors above types/methods not existing.

cc @davidfowl @ReubenBond @mitchdenny

@eerhardt eerhardt added the area-app-testing Issues pertaining to the APIs in Aspire.Hosting.Testing label Mar 15, 2024
@eerhardt eerhardt added this to the preview 5 (Apr) milestone Mar 15, 2024
@mitchdenny
Copy link
Member

I would have thought that they would go together.

@davidfowl
Copy link
Member

Still we should not couple their internals like this. We should expose the appropriate APIs.

@eerhardt
Copy link
Member Author

I would have thought that they would go together.

Since they ship as separate NuGet packages, you can't guarantee this. Imagine you pull in some reference like Aspire.Hosting.Azure or Aspire.Hosting.MongoDB and it lifts your version of Aspire.Hosting to a new version. Now your tests start breaking because you have a different version of Aspire.Hosting and Aspire.Hosting.Testing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-testing Issues pertaining to the APIs in Aspire.Hosting.Testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants