If you need to recompile, you can do it. I was looking for Moles source code but I could not find it anywhere. Then I tried to parse Microsoft.Moles.Xunit.dll , and I realized that the attribute is just a few lines.
Download Source Package MoledAttribute:
using System; using System.Reflection; using XUnit; namespace Microsoft.Moles.Framework.Xunit { public sealed class MoledAttribute : BeforeAfterTestAttribute {
You should create a new class library and add a link to xunit.dll of any version you want. It should work even with 1.8.0.1545, since I did not notice any changes in XUnit.BeforeAfterTestAttribute , which is the only parameter.
source share