Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question How to use JetBrains.Annotations from nuget?

Discussion in 'Scripting' started by unity_4CCAB079EC420FB17022, Mar 30, 2023.

  1. unity_4CCAB079EC420FB17022


    Aug 8, 2022
    Recently, I need to use "StructuredMessageTemplateAttribute" from JetBrains.Annotations. But the default one from Unity does not contain it. I download the library from nuget and place it under Plugins.
    Unity Editor starts to show

    Code (CSharp):
    1. Library\PackageCache\com.unity.timeline@1.7.3\Editor\treeview\Drawers\AnimationTrackDrawer.cs(8,49): error CS0433: The type 'UsedImplicitlyAttribute' exists in both 'JetBrains.Annotations, Version=4242.42.42.42, Culture=neutral, PublicKeyToken=1010a0d8d6380325' and 'UnityEngine.CoreModule, Version=, Culture=neutral, PublicKeyToken=nul
    I believe that UnityEngine.CoreModule has its own version of JetBrains.Annotations. However it is the stripped version which has no "StructuredMessageTemplateAttribute".

    I am just wondering is there any way to use full version of "JetBrains.Annotations"?