0

I am running into a build error when trying to pack my solution using ILRepack.Lib.MSBuild.Task>. My solution consists of 'Project1' and my unit test project 'TestProject1'. Project1 uses a 'NugetPackage1' and TestProject1 then also uses this package, through a reference to Project1. The error itself says:

The type 'Class1' exists in both 'NugetPackage1'... and 'Project1'...

I assume this happens because ILRepack builds and packs the Project1 together with the NugetPackage1 (as it is supposed to), but when it comes to building the TestProject, suddenly there are multiple assemblies with the same classes and an error gets thrown.

I have tried to internalize the packages that ILRepack packs together, but then another error gets thrown, because the test project does not see the classes it is supposed to test anymore.

Has anyone encountered this and knows what to do? Thanks!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.