Open TheFo2sh opened 4 years ago
any updates regarding this issue ?
Hi, I have the same problem, in your sample you have missing ClassLibrary3 source. You have fix the problem?
The bigger question now is whether any UWP related questions get any attention ever? Microsoft needs to clarify it's position on UWP. It's starting to look like UWP is dead within the company and so it's now ok to let questions like this languish. Doesn't look good.
I also cannot compile my project and am considering using ShortcutGenericAnalysis - however this issue makes me question if it is safe to use. How can I test my app to go sure there won't be any runtime errors? Are there any other drawbacks using it?
System.Reflection.MissingRuntimeArtifactException: 'This object cannot be invoked because it was metadata-enabled for browsing only: 'System.Func<Optional.Option
,Optional.Option ,AutoMapper.ResolutionContext,Optional.Option >.Invoke(Optional.Option ,Optional.Option ,AutoMapper.ResolutionContext)' For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616867'
The ShortcutGenericAnalysis option shortcuts analysis of generics that might result in the compiler missing some dynamic patterns.
The exception message has this URL in it: http://go.microsoft.com/fwlink/?LinkID=616867. Does the URL not help?
Based on the URL, I think you need to add following fragment to your RD.XML to help where the analysis failed:
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<Type Name="System.Func{Optional.Option{TestAutomapper.OA},Optional.Option{TestAutomapper.OB},AutoMapper.ResolutionContext,Optional.Option{TestAutomapper.OB}}" Dynamic="Required All" />
</Application>
</Directives>
adding ShortcutGenericAnalysis property in csproj while using automapper to map a struct type cause MissingRuntimeArtifactException.
Steps to reproduce 1- clone the reproducing solution : https://github.com/TheFo2sh/UwpDotNativeIssues 2- run using release 64 bit configuration
Expected result project run successfully
Actual result System.Reflection.MissingRuntimeArtifactException: 'This object cannot be invoked because it was metadata-enabled for browsing only: 'System.Func<Optional.Option,Optional.Option,AutoMapper.ResolutionContext,Optional.Option>.Invoke(Optional.Option,Optional.Option,AutoMapper.ResolutionContext)' For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616867'
More Info if you remove ShortcutGenericAnalysis from the csproj , the project build and run correctly. In a lot of cases using ShortcutGenericAnalysis is mandatory to get the build done as without i get compiler craches.