TargetException: in entities.graphics

Using Unity 2022.2.16 version.
I have created a 2D URP project.
I installed “com.unity.entities” and “com.unity.entities.graphics” from the package manager.
Create a new scene and create a subscene within it.
When I play it in the editor I get the error message and warning below.
What could be the cause?
Thank you in advance.

TargetException: Non-static field requires a target
System.Reflection.RuntimeFieldInfo.GetValue (System.Object obj) (at :0)
Unity.Rendering.EntitiesGraphicsSystem.ValidateUsingURPForwardPlus () (at ./Library/PackageCache/com.unity.entities.graphics@1.0.0-pre.65/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs:752)
Unity.Rendering.EntitiesGraphicsSystem.OnCreate () (at ./Library/PackageCache/com.unity.entities.graphics@1.0.0-pre.65/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs:817)
Unity.Entities.ComponentSystemBase.CreateInstance (Unity.Entities.World world) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemBase.cs:221)
Unity.Entities.World.AddSystem_OnCreate_Internal (Unity.Entities.ComponentSystemBase system) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/World.cs:467)
Unity.Entities.World.GetOrCreateSystemsAndLogException (System.Collections.Generic.IEnumerable1[T] types, System.Int32 typesCount, Unity.Collections.AllocatorManager+AllocatorHandle allocator) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/World.cs:1150) UnityEngine.Debug:LogException(Exception) Unity.Debug:LogException(Exception) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/Stubs/Unity/Debug.cs:19) Unity.Entities.World:GetOrCreateSystemsAndLogException(IEnumerable1, Int32, AllocatorHandle) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/World.cs:1156)
Unity.Entities.World:GetOrCreateSystemsAndLogException(Type[ ], AllocatorHandle) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/World.cs:1182)
Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal(World, IEnumerable1, ComponentSystemGroup, DefaultRootGroups) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:235) Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal(World, IEnumerable1) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:274)
Unity.Entities.DefaultWorldInitialization:Initialize(String, Boolean) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:154)
Unity.Entities.DefaultWorldInitialization:smile:efaultLazyEditModeInitialize() (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:341)
Unity.Scenes.SubScene:OnEnable() (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Scenes/SubScene.cs:318)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Ignoring invalid [Unity.Entities.UpdateBeforeAttribute] attribute on Unity.Rendering.DeformationsInPresentation targeting Unity.Rendering.EntitiesGraphicsSystem.
This attribute can only order systems that are members of the same ComponentSystemGroup instance.
Make sure that both systems are in the same system group with [UpdateInGroup(typeof(Unity.Entities.PresentationSystemGroup))],
or by manually adding both systems to the same group’s update list.
UnityEngine.Debug:LogWarning (object)
Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/Stubs/Unity/Debug.cs:15)
Unity.Entities.ComponentSystemSorter:WarnAboutAnySystemAttributeBadness (int,Unity.Entities.ComponentSystemGroup) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemSorter.cs:461)
Unity.Entities.ComponentSystemGroup:GenerateMasterUpdateList () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:451)
Unity.Entities.ComponentSystemGroup:RecurseUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:372)
Unity.Entities.ComponentSystemGroup:SortSystems () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:559)
Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal (Unity.Entities.World,System.Collections.Generic.IEnumerable`1<System.Type>) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:279)
Unity.Entities.DefaultWorldInitialization:Initialize (string,bool) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:154)
Unity.Entities.DefaultWorldInitialization:smile:efaultLazyEditModeInitialize () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:341)
Unity.Scenes.SubScene:OnEnable () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Scenes/SubScene.cs:318)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Ignoring invalid [Unity.Entities.UpdateBeforeAttribute] attribute on Unity.Rendering.RegisterMaterialsAndMeshesSystem targeting Unity.Rendering.EntitiesGraphicsSystem.
This attribute can only order systems that are members of the same ComponentSystemGroup instance.
Make sure that both systems are in the same system group with [UpdateInGroup(typeof(Unity.Entities.PresentationSystemGroup))],
or by manually adding both systems to the same group’s update list.
UnityEngine.Debug:LogWarning (object)
Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/Stubs/Unity/Debug.cs:15)
Unity.Entities.ComponentSystemSorter:WarnAboutAnySystemAttributeBadness (int,Unity.Entities.ComponentSystemGroup) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemSorter.cs:461)
Unity.Entities.ComponentSystemGroup:GenerateMasterUpdateList () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:451)
Unity.Entities.ComponentSystemGroup:RecurseUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:372)
Unity.Entities.ComponentSystemGroup:SortSystems () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:559)
Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal (Unity.Entities.World,System.Collections.Generic.IEnumerable`1<System.Type>) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:279)
Unity.Entities.DefaultWorldInitialization:Initialize (string,bool) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:154)
Unity.Entities.DefaultWorldInitialization: DefaultLazyEditModeInitialize () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:341)
Unity.Scenes.SubScene:OnEnable () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Scenes/SubScene.cs:318)
UnityEngine.GUIUtility: ProcessEvent (int,intptr,bool&)

Ignoring invalid [Unity.Entities.CreateAfterAttribute] attribute on Unity.Rendering.RegisterMaterialsAndMeshesSystem targeting Unity.Rendering.EntitiesGraphicsSystem.
This attribute can only order systems that are members of the same ComponentSystemGroup instance.
Make sure that both systems are in the same system group with [UpdateInGroup(typeof(Unity.Entities.PresentationSystemGroup))],
or by manually adding both systems to the same group’s update list.
UnityEngine.Debug:LogWarning (object)
Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/Stubs/Unity/Debug.cs:15)
Unity.Entities.ComponentSystemSorter:WarnAboutAnySystemAttributeBadness (int,Unity.Entities.ComponentSystemGroup) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemSorter.cs:461)
Unity.Entities.ComponentSystemGroup:GenerateMasterUpdateList () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:451)
Unity.Entities.ComponentSystemGroup:RecurseUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:372)
Unity.Entities.ComponentSystemGroup:SortSystems () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:559)
Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal (Unity.Entities.World,System.Collections.Generic.IEnumerable`1<System.Type>) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:279)
Unity.Entities.DefaultWorldInitialization:Initialize (string,bool) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:154)
Unity.Entities.DefaultWorldInitialization: DefaultLazyEditModeInitialize () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:341)
Unity.Scenes.SubScene:OnEnable () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Scenes/SubScene.cs:318)
UnityEngine.GUIUtility: ProcessEvent (int,intptr,bool&)

Ignoring invalid [Unity.Entities.UpdateAfterAttribute] attribute on Unity.Rendering.MatrixPreviousSystem targeting Unity.Rendering.EntitiesGraphicsSystem.
This attribute can only order systems that are members of the same ComponentSystemGroup instance.
Make sure that both systems are in the same system group with [UpdateInGroup(typeof(Unity.Entities.PresentationSystemGroup))],
or by manually adding both systems to the same group’s update list.
UnityEngine.Debug:LogWarning (object)
Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/Stubs/Unity/Debug.cs:15)
Unity.Entities.ComponentSystemSorter:WarnAboutAnySystemAttributeBadness (int,Unity.Entities.ComponentSystemGroup) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemSorter.cs:461)
Unity.Entities.ComponentSystemGroup:GenerateMasterUpdateList () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:451)
Unity.Entities.ComponentSystemGroup:RecurseUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:372)
Unity.Entities.ComponentSystemGroup:SortSystems () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:559)
Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal (Unity.Entities.World,System.Collections.Generic.IEnumerable`1<System.Type>) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:279)
Unity.Entities.DefaultWorldInitialization:Initialize (string,bool) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:154)
Unity.Entities.DefaultWorldInitialization: DefaultLazyEditModeInitialize () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:341)
Unity.Scenes.SubScene:OnEnable () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Scenes/SubScene.cs:318)
UnityEngine.GUIUtility: ProcessEvent (int,intptr,bool&)

That’s basically the same problem as in this thread: Is Entity.Graphics supposed to work with URP's 2D Renderer at all?

TLDR: Bug has been filed

Thanks!