Skip to content

Tests: Code changes require manual rebuild before testing #391

@warappa

Description

@warappa

Issue

Currently, if one modifies code in the ILRepack project, he must do a rebuild of first the ILRepackTool and then the senario projects. Otherwise, a stale version is tested by the scenario tests and therefore producing confusing/wrong test results.

Expectation

Running any test should automatically compile everything necessary beforehand.

Bugfixing Issues

ILRepackTool is .NET 8 and some integration test scenario projects are .NET Framework which makes ProjectReferences difficult.

Possible Solution: Repair ILRepack.targets

It seems this was originally the way to enforce that, but doesn't work anymore.
Don't add a project-reference to ILRepack anymore as this doesn't trigger the build process because ILRepackTool is actually used to repack the scenario projects. On the other hand, adding a reference to ILRepackTool would introduce other issues (multi-targeting, dotnet-tool packaging issues).

Adding simple MSBuild targets to ILRepack.targets and ILRepack.IntegrationTests.csproj to ensure ILRepackTool and the scenario projects are built beforehand seems to be a way around the mentioned issues.

A PR for this will follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions