[Unity]错误error CS1703解决办法

本文介绍了解决Unity项目中出现的System.Drawing.dll重复引用问题的方法,通过调整项目的ApiCompatibilityLevel设置为.NET4.x来避免编译错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 

Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights reserved.

error CS1703

 

多个System.Drawing.dll文件重复引用

error CS1703: Multiple assemblies with equivalent identity have been imported: 'O:\UnityProjects\EmotionFacialRecognition\EmotionDetectionAsset_UnityDemo-master\Assets\System.Drawing.dll' and 'C:\Program Files\Unity\Hub\Editor\2019.2.11f1\Editor\Data\NetStandard\compat\2.0.0\shims\netfx\System.Drawing.dll'. Remove one of the duplicate references.

Editor-Project Settings-Player-Other Settings-Api Compatibility Level

改为.NET 4.x

(Unity 2020.1.2f1 (64-bit))

 

参考资料:

1.how-to-use-systemdrawing-in-unity2018

2.

3.

 

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值