You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
NullException in Microsoft.AspNetCore.Mvc.Razor.Compilation.ViewsFeatureProvider.GetViewInfoContainerType #5675
When you load assembly from stream, Assembly.IsDynamic = false and Assembly.Location is empty (not null) so Path.GetDirectoryName(assemblyPart.Assembly.Location) return null...
So :
in file Mvc/src/Microsoft.AspNetCore.Mvc.Razor/Compilation/ViewsFeatureProvider.cs line 61 if (!assemblyPart.Assembly.IsDynamic && assemblyPart.Assembly.Location != null)
must be : if (!assemblyPart.Assembly.IsDynamic && !string.IsNullOrEmpty(assemblyPart.Assembly.Location))
Would you like to send a PR for this? Here's the PR for the earlier change that added the IsDynamic check: 24d5dfb in case you'd like to use a reference.
Activity
pranavkm commentedon Jan 11, 2017
Would you like to send a PR for this? Here's the PR for the earlier change that added the
IsDynamiccheck: 24d5dfb in case you'd like to use a reference.Eilon commentedon Jan 11, 2017
@pranavkm feel free to fix or wait for a PR. And add a test, if possible!
Check for empty location in ViewsFeatureProvider
Check for empty location in ViewsFeatureProvider
Check for empty location in ViewsFeatureProvider
Check for empty location in ViewsFeatureProvider