Compilation fails when using hyphens in name with InstanceExtensions.Named. The generated class name is invalid due the hyphens being included in the class name.
InvalidOperationException: Compilation failures!
CS1514: { expected
CS1513: } expected
CS1022: Type or namespace definition, or end-of-file expected
CS0116: A namespace cannot directly contain members such as fields or methods
CS1022: Type or namespace definition, or end-of-file expected
CS0116: A namespace cannot directly contain members such as fields or methods
CS1022: Type or namespace definition, or end-of-file expected
CS0116: A namespace cannot directly contain members such as fields or methods
CS1022: Type or namespace definition, or end-of-file expected
CS0116: A namespace cannot directly contain members such as fields or methods
CS1022: Type or namespace definition, or end-of-file expected
CS0116: A namespace cannot directly contain members such as fields or methods
CS1022: Type or namespace definition, or end-of-file expected
CS0116: A namespace cannot directly contain members such as fields or methods
CS1022: Type or namespace definition, or end-of-file expected
CS0116: A namespace cannot directly contain members such as fields or methods
CS1022: Type or namespace definition, or end-of-file expected
CS1022: Type or namespace definition, or end-of-file expected
CS0116: A namespace cannot directly contain members such as fields or methods
CS0116: A namespace cannot directly contain members such as fields or methods
CS1520: Method must have a return type
CS0116: A namespace cannot directly contain members such as fields or methods
CS0115: '<invalid-global-code>.Build(Scope)': no suitable method found to override
CS0103: The name '_standardReportGenerator' does not exist in the current context
CS0103: The name '_standardReportGenerator' does not exist in the current context
Compilation fails when using hyphens in name with InstanceExtensions.Named. The generated class name is invalid due the hyphens being included in the class name.
e.g.
For<IFactory>().Add<FoobarFactory>().Named("foo-bar");
generates the following errors: