- Home /
How to solve "The type x exists in both y aand z"?,How to solve "The type x exists in both y and z"
I've just exported as package a scene from a Unity 2019.2.17f1 project and imported it in another Unity 2019.2.17f1 project and large number of scripts deliver the following error:
Assets\Scripts\OpcUaComponents\OpcUaUtils.cs(76,16): error CS0433: The type 'NodeId' exists in both 'Opc.Ua.Core, Version=1.4.357.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8' and 'Opc.Ua.Core, Version=1.4.354.0, Culture=neutral, PublicKeyToken=null'
A script looks like this:
using Opc.Ua;
using Opc.Ua.Client;
using System.Collections.Generic;
using UnityEngine;
public class OpcUaUtils
{
private static ReferenceDescription[] ListChildren(Session session, NodeId parentNodeId)
...
}
I would appreciate any ideas how to solve this because the other already published sollutions for similar issues didn't work!
Answer by Bunny83 · Apr 04, 2020 at 11:40 AM
As you can see your project has two different versions of the same assembly. One has the version string "1.4.357.0" the other "1.4.354.0". If you build for .NET Standard, Unity should provide the framework for you. So if you manually copied a version of the framework into your project you should remove it.
Though if you're working on a larger project I highly recommend that you create a backup of your project before you remove anything ^^.
Hello Bunny83, thank you a lot for your help! I exported the package from the 1st project and imported ut in the 2nd one, soes this mean that I've copied the framework manually? If yes what would be the steps to remove it?
Your answer
Follow this Question
Related Questions
How to avoid JavaScript namespace pollution? 2 Answers
Unity overwrites files with the same name but in different namespaces on package import? 6 Answers
Strange crash on package import 1 Answer
[SOLVED]Firebase Remote Config and Facebook Audience Network SDK conflict 1 Answer
Cant Import Package 0 Answers