Skip to content

Make IntegrationTesting not depend on M.A.Hosting.Abstractions #14112

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

Merged
merged 2 commits into from
Sep 18, 2019

Conversation

jkotalik
Copy link
Contributor

Fixes #14085

The Microsoft.AspNetCore.Server.IntegrationTesting package depends on Microsoft.AspNetCore.Hosting.Abstractions. If someone were referencing the integration testing package outside of AspNetCore, it would be broken as there is a missing dependency. This is exactly what the benchmarks repo was doing to pull in ANCM. It takes a dependency on this package to pull in ANCM into the right location, sxs with the app: https://github.com/aspnet/Benchmarks/blob/master/src/Benchmarks/Benchmarks.csproj#L70. So if we can remove the dependency on M.A.Hosting.Abstractions, we can now use this package outside of the repo.

This package only used M.A.Hosting.Abstractions for a single, one-line extension method. I decided to remove it and create a helper class instead.

Few things:

@sebastienros I'll need some help verifying this change on Benchmarks.

Also, this change should be backported to 3.x

@sebastienros
Copy link
Member

Not that easy to test, as the issue occurs during build, and ideally you would put this patched assembly in the output folder once the app is published. We'll have to wait for a build to be available on a feed and use this specific aspnet version to test.

@jkotalik
Copy link
Contributor Author

We'll have to wait for a build to be available on a feed and use this specific aspnet version to test.

I came up with the same conclusion, unfortunately. One thing I tried to do was remove the package reference in benchmarks.csproj and use --output-file on the ANCM folder, but that failed, reporting an empty failure.

@sebastienros
Copy link
Member

One thing however, would be to create a refrence to a local .dll file, and use --build-file [path_to_local_file] such that your local file would be pushed on the same folder as the csproj on the server, before the build, so your project can reference it. Or add it to your branch yourself and reference it locally.

@Tratcher
Copy link
Member

I'm surprised that was the only reference.

@jkotalik
Copy link
Contributor Author

I verified that there are no dependencies in AspNetCore for the integration testing package, meaning the error we were seeing should be gone. I wasn't able to verify that benchmarks works by referencing this package as the package isn't published yet. So I'd prefer to actually publish this package via merging with master first and then verifying benchmarks. Afterwards, I can make a PR to 3.0/3.1 to fix it there as well. Everything else has been solved (see aspnet/Benchmarks#1415).

@jkotalik jkotalik merged commit 1540b7d into master Sep 18, 2019
@ghost ghost deleted the jkotalik/fixIISBenchmarks branch September 18, 2019 20:33
@amcasey amcasey added the area-hosting Includes Hosting label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-hosting Includes Hosting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IIS Benchmarks don't run
5 participants