Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

ILMerge and Unit Tests #100

@kaluznyt

Description

@kaluznyt

Hello,

I'm having a problem which I'm not able to solve yet, I have an app that has 2 Projects:
General
Helper

Both are setup with ILMerge, basically the idea is that everything should be merged into General.dll - and that works fine.

Just as a side note - this is use case for Dynamics CRM Plugins.

Now, there is a need to add a Test project.

The test project tests classes in both Helper and General. However, when referencing both, there is an error on build:

error CS0433: The type 'SomeType' exists in both 'General' and 'Helper'

Originally this SomeType class is in Helper.

And the error is understandable, since the General is merged dll so it has the Helper types bundled.
The issue is I'm not able to use those types in Test project by just referencing General, so I need to add Helper as a reference as well.

How to approach this ?

I got an idea that I could create multiple test projects one for each of the tested projects, and that most probably should work, because there is no issue when there is only 1 dependency in test project.

Tried to tweak some settings in the ILMerge.props but without success.

Thanks for any hints !

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