toddams/RazorLight

RazorLightEngineBuilder throws unexpected exception when .AddDefaultNamespaces is used

Closed this issue · 0 comments

Describe the bug
RazorLightEngineBuilder throws an exception when .AddDefaultNamespaces is used, even options is never set by .UseOptions:

RazorLight.RazorLightException : namespaces has conflicting settings, configure using either fluent configuration or setting an Options object.

To Reproduce
Steps to reproduce the behavior:

new RazorLightEngineBuilder()
	.UseEmbeddedResourcesProject(typeof(Root))
	.AddDefaultNamespaces("123")
	.Build();

Expected behavior
No exception should be thrown.