Last active
August 29, 2015 14:15
-
-
Save johnnonolan/bc4e2ac9881ff053ec74 to your computer and use it in GitHub Desktop.
not resolving
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I reference the dll where inanotherlib.cs lives | |
using DeleteME.lib; | |
using Nancy; | |
namespace BLah.DeleteMe | |
{ | |
public class HelloModule : NancyModule | |
{ | |
public HelloModule(IBus bus) | |
: base("/Boo") | |
{ | |
Get["/"] = _ => "Boo"; | |
Get["/Hoo"] = _ => | |
{ | |
bus.Stuff(); | |
return "Hoo"; | |
}; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace DeleteME.lib | |
{ | |
public class Bus : IBus | |
{ | |
public void Stuff() | |
{ | |
Console.WriteLine("Doing Stuff"); | |
} | |
} | |
public interface IBus | |
{ | |
void Stuff(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I reference the dll where inalib.cs lives. | |
static void Main() | |
{ | |
try | |
{ | |
var mesosConfig = GetImportantMesosVariables(); | |
var uri =new Uri(String.Format("http://{0}:{1}",mesosConfig.TASK_HOST,mesosConfig.PORT0)); | |
Console.WriteLine(uri.OriginalString); | |
using (var host = new NancyHost(uri)) | |
{ | |
host.Start(); //I explode into a ball of flames. | |
//wait here forever (Stolen from RMS) | |
ResetEvent.WaitOne(); | |
} | |
} | |
catch (Exception exception) | |
{ | |
Console.WriteLine(exception.Message); | |
Console.WriteLine(exception.InnerException); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1234 | |
http://localhost:1234 | |
Something went wrong when trying to satisfy one of the dependencies during compo | |
sition, make sure that you've registered all new dependencies in the container a | |
nd inspect the innerexception for more details. | |
Nancy.TinyIoc.TinyIoCResolutionException: Unable to resolve type: Nancy.NancyEng | |
ine ---> Nancy.TinyIoc.TinyIoCResolutionException: Unable to resolve type: Nancy | |
.Routing.DefaultRequestDispatcher ---> Nancy.TinyIoc.TinyIoCResolutionException: | |
Unable to resolve type: Nancy.Routing.DefaultRouteResolver ---> Nancy.TinyIoc.T | |
inyIoCResolutionException: Unable to resolve type: Nancy.Routing.RouteCache ---> | |
Nancy.TinyIoc.TinyIoCResolutionException: Unable to resolve type: LoyaltyServic | |
e.API.HTTP.RedemptionModule ---> Nancy.TinyIoc.TinyIoCResolutionException: Unabl | |
e to resolve type: LoyaltyService.Infrastructure.IBus | |
at Nancy.TinyIoc.TinyIoCContainer.ResolveInternal(TypeRegistration registrati | |
on, NamedParameterOverloads parameters, ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
--- End of inner exception stack trace --- | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.SingletonFactory.GetObject(Type requestedTy | |
pe, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptio | |
ns options) | |
at Nancy.TinyIoc.TinyIoCContainer.ResolveInternal(TypeRegistration registrati | |
on, NamedParameterOverloads parameters, ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.<ResolveAllInternal>b__43(TypeRegistration | |
registration) | |
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() | |
at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext() | |
at Nancy.Routing.RouteCache.BuildCache(IEnumerable`1 modules) | |
at Nancy.Routing.RouteCache..ctor(INancyModuleCatalog moduleCatalog, INancyCo | |
ntextFactory contextFactory, IRouteSegmentExtractor routeSegmentExtractor, IRout | |
eDescriptionProvider routeDescriptionProvider, ICultureService cultureService, I | |
Enumerable`1 routeMetadataProviders) | |
at lambda_method(Closure , Object[] ) | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
--- End of inner exception stack trace --- | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.SingletonFactory.GetObject(Type requestedTy | |
pe, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptio | |
ns options) | |
at Nancy.TinyIoc.TinyIoCContainer.ResolveInternal(TypeRegistration registrati | |
on, NamedParameterOverloads parameters, ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
--- End of inner exception stack trace --- | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.SingletonFactory.GetObject(Type requestedTy | |
pe, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptio | |
ns options) | |
at Nancy.TinyIoc.TinyIoCContainer.ResolveInternal(TypeRegistration registrati | |
on, NamedParameterOverloads parameters, ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
--- End of inner exception stack trace --- | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.SingletonFactory.GetObject(Type requestedTy | |
pe, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptio | |
ns options) | |
at Nancy.TinyIoc.TinyIoCContainer.ResolveInternal(TypeRegistration registrati | |
on, NamedParameterOverloads parameters, ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
--- End of inner exception stack trace --- | |
at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type impl | |
ementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, | |
ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.SingletonFactory.GetObject(Type requestedTy | |
pe, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptio | |
ns options) | |
at Nancy.TinyIoc.TinyIoCContainer.ResolveInternal(TypeRegistration registrati | |
on, NamedParameterOverloads parameters, ResolveOptions options) | |
at Nancy.TinyIoc.TinyIoCContainer.Resolve(Type resolveType) | |
at Nancy.TinyIoc.TinyIoCContainer.Resolve[ResolveType]() | |
at Nancy.DefaultNancyBootstrapper.GetEngineInternal() | |
at Nancy.Bootstrapper.NancyBootstrapperBase`1.SafeGetNancyEngineInstance() | |
Press any key to continue . . . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment