Quantcast
Channel: RazorGenerator Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 525

Commented Issue: CreateInstance DependencyResolver in PrecompiledMvcEngine [64]

$
0
0
Line 141 causing a null exception when our CastleWindsor IDependencyResolver returns null for GetService() resolution of _ViewStart, and _AreaLayout et al.

Adding a null-coalescing operator to the DependencyResolver.Current.GetService(type) call can avoid the issue:

return DependencyResolver.Current.GetService(type) ?? Activator.CreateInstance(type);
Comments: I agree that [changeset](https://razorgenerator.codeplex.com/SourceControl/changeset/b0a2e6258e987bc8c8b27759df48fa52817cf37d) has resolved this item with the implementation of the new RazorGenerator.Mvc/DefaultViewPageActivator.cs I have not tested this out for our implementation, but my code review aligns with my recommendation. Thanks.

Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>