I'm absolutely desperate with this.
I wanted to change my Xamarin Forms Project from PLC to .NET Standard (v.1.5) and i made the mistake to change it in the Project options. After changing, i realised it's a bad approach and wanted to restore to PLC. After changing back i cannot build the project anymore as I'm getting 96 compile errors. Every error is saying "Error CS0344"
The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
and 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
It says that for basically every CS and XAML file i have in the project. I have no idea what to do to fix this. I searched almost the whole web for a solution and i'm clueless.
Thanks in regards for your help.
Related
Hi I am new to xamarin and have encountered some errors trying to migrate Xamarin to maui and I'm not sure how to solve. I understand that I am supposed to change the [Register] attribute on one of the C# types to a different Java type name. But how do I do that. Any advice would be appreciated.
Error XA4215 The Java type xamarin.essentials.fileProvider is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.
Error XA4215 xamarin.essentials.fileProvider generated by: Xamarin.Essentials.FileProvider, Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Error XA4215 xamarin.essentials.fileProvider generated by: Microsoft.Maui.Essentials.FileProvider, Microsoft.Maui.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
For me I was referencing https://github.com/jamesmontemagno/StoreReviewPlugin which automatically brings in Xamarin Essentials. I think that package needs to be updated to reference Maui Essentials.
Wonder if you have something similar in a package.
My application is running fine on local, after i publish to azure web apps it gives me the error
Could not load file or assembly 'Microsoft.Practices.ObjectBuilder2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
how do I fix this? I do not even have the objectBuilder2, if its something I have to reference where do I get it?Please help
Microsoft.Practices.ObjectBuilder2 is part of Enterprise Library. See here
Do you use this library? If not, try to remove references to it. If you use it, then add appropriate .dll to your installation.
For me Microsoft.Practices.Unity references was broken. I've just removed and added it again and worked. Maybe any refereces to Microsoft.Practices.* that would be broken can show this error.
Place Microsoft.Practices.ObjectBuilder2.dll in bin folder of your web application, this will work.
Recently we've started upgrading all our projects to MVC5. I've done 4 other projects without issue but for some reason this one is throwing 95 warnings.
ASPNETCOMPILER : warning CS1701: Assuming assembly reference 'System.Web.Mvc,
Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' matches 'Sy
stem.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
', you may need to supply runtime policy
Now I am completely aware of what this warning normally means. I have looked EVERYWHERE for an incorrect reference, checked every single dependency, even gone so far as to grep every single file in my project folder. I feel like I've wasted days on this and its driving me bonkers!
Does anyone have any suggestions on debugging this issue?
We just did a merge(TFS) between two branches. But now when I compile, I've this error:
No way to resolve conflict between
"AA.BB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
and
"AA.BB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bfd296a93930d932".
Choosing "AA.BB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"AA.BB" is one of our project, I've checked that we only reference it as a project. And we have only project named like this.
Does someone knows why this error is happening? And where this PublicKeyToken error can come from?
What I already tried:
Remove all reference to this project and make again the references
Search if one of those project was having a copyLocal = true(not the case) or referencing directly a DLL(not the case)
Note that:
The build is considered as succeed but when I launch the application I got errors(basically an error saying that this dll doesn't match the manifest)
If I got in the classes that uses this, I've no errors
I finally found the issue, I post it since maybe it can help someone in the future.
The issue was that before the Merge, there were some project which were having a different output directory.
So, when doing the rebuild, some project were finding multiple reference of the same project in different directory.
The solution is quite simple: Delete manually once the output directory and you're good :)
I saw a few posts on apple push notifications from an asp.net application but none of them i saw addressed the issues i'm having with the APNs-Sharp libraries. I'm assuming it should work with an asp.net application written in c# but im getting this error:
Error: Could not load file or assembly 'Newtonsoft.Json.Compact, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
I thought it was because i was missing the dll file. So i downloaded it and put it in the project. But, when i tried to add a reference to it i got this error:
A reference to 'C:\Users\me\Desktop\WebSite\Bin\Newtonsoft.Json.Compact.dll' could not be added.
This error message didn't help at all... Then i just tried to run it with out adding the reference and i got this error:
Error: Could not load file or assembly 'Newtonsoft.Json.Compact, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The module was expected to contain an assembly manifest.
I'm pretty much out of ideas on why its not working.. I downloaded their source code and ran one of the test projects with my p12 file and app id and it worked... so im not sure why its not working in my asp.net app.
The dll i downloaded was corrupted. I had to download the source code for the APNs-sharp project and get the dll from within the source code.