Redth / ZXing.Net.Mobile

Barcode Scanner for Xamarin.iOS, Xamarin.Android, UWP and Tizen
MIT License
1.07k stars 701 forks source link

Ambiguity Errors caused by multiple Resource.designer.cs files #930

Open ashlar64 opened 4 years ago

ashlar64 commented 4 years ago

Hello,

When using the latest version beta 3.0.0 beta5 and compiling the Sample.Forms.Android project there are two 2 ambiguity errors in the ZxingActivity.android.cs file.

SetContentView(ZXing.Net.Mobile.Resource.Layout.zxingscanneractivitylayout); .Replace(ZXing.Net.Mobile.Resource.Id.contentFrame, scannerFragment, "ZXINGFRAGMENT")

The reason for this ambiguity is that there are two Resource.designer.cs files that the project is looking at. The location of these two Resource files are at these two locations:

D:\code_samples\zxing3\ZXing.Net.Mobile-master\ZXing.Net.Mobile\obj\Debug\monoandroid10.0\designtime D:\code_samples\zxing3\ZXing.Net.Mobile-master\ZXing.Net.Mobile\obj\Debug\monoandroid10.0

BTW if both resource files are opened in visual studio the error count jumps up to 1757.

Is there a work around for this?

ashlar64 commented 4 years ago

I found work around. If you place this line of code in the first PropertyGroup in the Zing.Net.Mobile.csprohj file:

False

It will stop making that duplicate Resource.designer.cs which will solve the prob I stated above.

BTW is this project still being worked on? I could lend a hand if needed.

knocte commented 3 years ago

When using the latest version beta 3.0.0 beta5

So this problem doesn't occur in v2.4.1? can you confirm?