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 has been archived by the owner on Dec 14, 2018. It is now read-only.
in ViewFeaturesProvider fails when adding dynamic assemblies via IMvcBuilder.AddApplicationPart (System.Reflection.Emit.AssemblyBuilder.Location throws NotSupportedException). Here is a stack trace:
System.NotSupportedException: The invoked member is not supported in a dynamic assembly.
at System.Reflection.Emit.InternalAssemblyBuilder.get_Location()
at Microsoft.AspNetCore.Mvc.Razor.Compilation.ViewsFeatureProvider.GetViewInfoContainerType(AssemblyPart assemblyPart)
at Microsoft.AspNetCore.Mvc.Razor.Compilation.ViewsFeatureProvider.PopulateFeature(IEnumerable`1 parts, ViewsFeature feature)
at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature)
at Microsoft.AspNetCore.Mvc.Razor.Internal.DefaultCompilerCacheProvider..ctor(ApplicationPartManager applicationPartManager, IRazorViewEngineFileProviderAccessor fileProviderAccessor)
Would there be any major implications when checking if assemblyPart.Assembly.IsDynamic before trying to retrieve its location? Am I missing something when working with dynamic assemblies in projects with controllers returning views?
The text was updated successfully, but these errors were encountered:
Would there be any major implications when checking if assemblyPart.Assembly.IsDynamic before trying to retrieve its location?
That sounds fine. I recall trying out loading a Roslyn generated assembly and it didn't throw when Location was accessed. Would you like to send a pull request for this?
in
ViewFeaturesProvider
fails when adding dynamic assemblies viaIMvcBuilder.AddApplicationPart
(System.Reflection.Emit.AssemblyBuilder.Location
throwsNotSupportedException
). Here is a stack trace:Would there be any major implications when checking if
assemblyPart.Assembly.IsDynamic
before trying to retrieve its location? Am I missing something when working with dynamic assemblies in projects with controllers returning views?The text was updated successfully, but these errors were encountered: