1

У меня при компиляции сборки в Release появляется вот такая ошибка:

Вызвано исключение: "" в System.Private.Reflection.Execution.dll Вызвано исключение: "System.Reflection.MissingRuntimeArtifactException" в System.Private.Reflection.Execution.dll Cannot retrieve a MethodInfo for this delegate because the method it targeted (System.Runtime.InteropServices.WindowsRuntime.ICommand_CCWAdapter.<>c__DisplayClass1_0.b__0(Object, EventArgs)) was not enabled for metadata using the Dynamic attribute. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616868

По ссылке https://dotnet.github.io/native/troubleshooter/method.html# через конструктор попробовал указать метод динамическим, но проблема осталась. Через конструктор вот что у меня получилось для файла RD.XML:

<Type Name="Alpha.ViewModels.MainViewModel">
  <MethodInstantiation Name="OnItemTappedAsync" Arguments="System.Object" Dynamic="Required" />
</Type>

Проблема вот здесь:

public ICommand ItemTappedCommand => new AsyncCommand((param) => OnItemTappedAsync(param));

В первый раз сталкиваюсь с данной проблемой, поэтому не знаю как правильно ее решить.

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Посмотрите другие вопросы с метками или задайте свой вопрос.