Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Could not load file or assembly 'mscorlib, Version=220.127.116.11, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
This happens on any new project once I add a reference to a web service and try to build in release mode.
After a few searches this appears to be an old issue that had at one point been taken care of.
It now appears to be back.
From what I was able to find out you have to turn off "Generate serialization assembly".
The problem is that there does not appear to be a way to do this in Xamarin Studio.
I had to open my project in VS and do it, then open it back up in Xamarin Studio.
I dont know how I would have done this if I didn't have VS installed.
Any progress on this?
It has been two weeks with out any notice on here.
With the new licensing and the Indie developers not having access to the Visual Studio this makes it impossible to compile into release.
The Xamarin.Android build targets should suppress this build feature if it won't work with XA mscorlib.
Should and do are two totally different things.
I need some kind of resolution on this.
I can not build to release after adding a web service if I do not first pull it into VS and change the "Generate Serialization Assembly" and do a build there.
Once I do that, then I can open it back up in Xamarin Studio and build the release with no problems.
While this is only a inconvienince at work, I only have the Indie license at home and will need to be able to build release products there.
Any progress on this.
I just updated to 4.0.3 and made a new project.
And when it comes time to build the release I get this lovely error.
Now I have to open it up in Visual Studio and disable the Generate Serialization Assembly.
This is more than just an annoyance.
Can we get some kind of response on this?
This has been up here for 5 weeks and has no progress has been recorded.
Can someone please give me an update.
This bug makes Xamarin Studio unusable as a stand alone IDE.
Is this something to do with the strongnaming of our binaries.
It sounds like that. http://forums.xamarin.com/discussion/1476/changes-to-assembly-strongnames-in-xamarin-android-4-6-0#latest
Actually no... And since Generate Serialization Assemblies is only about VS's desktop target profiles and NOT applicable to Xamarin products, it should rather be explicitly denied as mhutch said. I have no idea if it's doable in VS though. People should have never tried such web references in Silverlight, so the same principle should apply Xamarin mobile profile.
Resolution to this should be: any serialization should be done by NOT using generated serializer as DLL. Or with Mono's sgen --keep it is able to generate sources for generated serializer but not as precompiled state (you have to copy sources from some temporary directory).
So will I not be able to add .net 2.0 Web services?
Is it not as simple of just turning off that build feature like I do when I open it up in VS?
I know I should probably switch to JSON, but I have several Soap services that are already running that our other apps are using.
I don't want to rewrite all of those...
What I wrote (sgen) is how to use Sys.Web.Services code. http://msdn.microsoft.com/en-us/library/bk3w6240%28v=vs.80%29.aspx
After some followup, here's the issue + reproduction steps:
0. Run Windows. This doesn't happen on OSX.
1. Launch Xamarin Studio 4.0.3.
2. File > New > Solution...
3. Create an Android Application project.
4. In the Solution panel, right-click the Project > Add > Add Web Reference.
5. In the Add Web Reference dialog, keep the default Web Service Url
5.b. Set the Framework to .NET 2.0 Web Service
6. In the Add Web Reference dialog, Click OK.
7. Build. Build should succeed.
8. Set the Configuration to Release (Project > Active Configuration > Release)
Expected results: It builds!
> SGEN: Error: Could not load file or assembly 'mscorlib, Version=18.104.22.168, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
> or one of its dependencies. Strong name validation failed.
> (Exception from HRESULT: 0x8013141A) (Bxc10693.DefWebService)
1. Open the .csproj within Visual Studio
2. Click Project > ProjectName Properties...
3. In the Build tab, set the Generate serialization assembly drop-down to Off.
4. Save all.
The Project will now build within Xamarin Studio.
1. Manually edit the .csproj.
1.b. This can be done within Xamarin Studio by right-clicking the Solution name in the solution panel > Display Options > Show All Files, then double-clicking the .csproj in the Solution panel.
2. Add the following XML fragment to the first <PropertyGroup/> section:
3. Close and re-open the solution.
Fixed in monodroid/3dc81e91 by updating Xamarin.Android.Common.targets to specify:
This should implicitly fix things for all Xamarin Studio versions, though the fix won't be included until the n ext Xamarin.Android 4.7.x beta.
*** Bug 12708 has been marked as a duplicate of this bug. ***
I hate to say, but this is not fixed yet.
I just went to build a new project and got the same issue.
I opened the project up in VS to do the work around and found that it already said no in the generate serialization assemblies.
I tried to build in VS with no luck. So I changed it back to auto and tried a build, it failed, then I switched it back to no again and this time it built.
I was then able to open and build in Xamarin studio again.
So it appears that there is more that just that single flag involved.
I had to change it away from then back to no to get it to build.
> I just went to build a new project and got the same issue.
A new project using which Xamarin.Android version? It wasn't fixed until 4.7.5 and 4.6.7.
I just updated to 4.7.9 and the problem still exists.
1. Open a brand new android project
2. Add .Net 2.0 Web Reference
3. Build as debug. Everything is Fine
4. Build as release. Get the error.
This is what you will see in screen shot 1.
What is different now is that if you open it up in VS it shows that the generate serialization assemblies is set to off, but it will not build their either. (screen shot 2).
If I change it to auto, try to build, then change it back to NO, it will then build and I can open it back up in Xamarin and continue.
Created attachment 4174 [details]
Xamarin Error Message
Created attachment 4175 [details]
Visual Studio setting
I had the include order wrong; <GenerateSerializationAssemblies/> needs to be specified within Xamarin.Android.CSharp.targets, as Xamarin.Android.Common.targets is too late.
Fixed in master/f6ed53bb for 4.7.11 and bs1/f8ee257d for 4.6.10.