__DynamicallyInvokableAttribute could not be found - C#

Узнай цену своей работы

Формулировка задачи:

Здравствуйте. Я хочу создать библиотеку содержащую класс Object из NET Framework. Я скопировал код в проект DLL языка C#, но при компиляции такая ошибка:

The type or namespace name '__DynamicallyInvokableAttribute' could not be found (are you missing a using directive or an assembly reference?)

Я нашел это на другом форуме:

I found that it's used in the Runtime*Info.IsNonW8PFrameworkAPI() suite of internal methods. Having this attribute placed on a member makes IsNonW8PFrameworkAPI() return false for it and thus makes the member available in WinRT applications and shuts up the The API '...' cannot be used on the current platform. exception. Profiler writers should place this attribute on members emitted by their profiler into framework assemblies, if they want to access them under WinRT.

Но я не знаю что такое profiler в сборках. Скажите как добавить этот атрибут?

Решение задачи: «__DynamicallyInvokableAttribute could not be found»

textual
Листинг программы
[AttributeUsage(AttributeTargets.All, Inherited = false)]
public class __DynamicallyInvokableAttribute: Attribute
{
    public __DynamicallyInvokableAttribute() {}
}

ИИ для рефератов и докладов


  • Экспорт Word по ГОСТу
  • Минимум 80% уникальности текста
  • Поиск релевантных источников в интернете
  • Готовый документ за 2 минуты

Оцени полезность:

7   голосов , оценка 4.571 из 5