Cannot build the project referencing Nancy.Hosting.Self.dll

ciyidoganciyidogan Posts: 2
edited June 1, 2016 7:20AM in SmartAssembly
Hello,

I get an error when I build my class library project referencing Nancy.Hosting.Self.dll :
Build Failed
The build process failed during the preparation of the resulting assembly.
SmartAssembly has encountered an invalid symbol in TestLibrary.dll:

[TestLibrary]
TestLibrary.SelfHost/<>c__DisplayClass8/<<.ctor>b__0>d__a

The most likely cause is that SmartAssembly has used a different version of a dependency
from the version used by TestLibrary.
For simplicity, I create the SA project with the default options, no merging/embedding, no pruning,
no obfuscation, no dynamic proxy etc.

One thing I've noticed, it's related with implementing the constructor of NancyModule in the
class that is inherited from NancyModule. I get no error if I remark the constructor below :
namespace TestLibrary
{
    public class SelfHost : NancyModule
    {
        public SelfHost()
            : base("/test")
        {
		   ...
		}
	}
	...
}

The second thing I've noticed, if I merge Nancy.Hosting.Self (by the way, I don't need to merge it,
I'm only curious) and select it for obfuscation,
a warning sign with a flag appears next to it. It says "This assemby has one or more
InternalsVisibleToAttribute custom attributes. You need to exclude from the obfuscation the
internal members called from external assemblies", as I hover the mouse. Just to try, I hit
on the "Exclusions" link next to the sign, select Nancy.Hosting.Self on the treeview and hit
"Exclude from obfuscation", and get a run-time error and SA crashes with
"Send Error Report" option (I've hit the button and sent the error).

What may be wrong with referencing Nancy module ?

Thank you
Sign In or Register to comment.