Skip to content
This repository was archived by the owner on Nov 9, 2018. It is now read-only.

TestHost doesn't pass through --port argument, resulting in crash #117

@rynowak

Description

@rynowak

Originally reported at aspnet/Hosting#287 (comment)

The issue is that TestHost uses ApplicationHost to bootstrap xunit. This causes the ApplicationHost initialization code to run again, but since ApplicationHost has already processed the --port argument it's already configured the DTH compiler. When run again without the --port argument, the IRuntimeOptions object that's created doesn't have a port set, resulting in the failure described in the original issue.

A quick fix to this issue is to pass the --port manually when recursing into ApplicationHost. It's been on roadmap to remove the ApplicationHost dependency for some time now, so we should bump up the priority of that as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions