Bug 9106 - [regression] issue with localization and resx
Summary: [regression] issue with localization and resx
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 3.1.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2012-12-21 12:40 UTC by Jonathan Peppers
Modified: 2013-02-06 15:10 UTC (History)
7 users (show)

Is this bug a regression?: ---
Last known good build:

Project displaying the failure (2.98 MB, application/zip)
2012-12-21 12:40 UTC, Jonathan Peppers

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Jonathan Peppers 2012-12-21 12:40:30 UTC
Created attachment 3119 [details]
Project displaying the failure

We were having trouble getting our Xamarin.Mac project to build with localization files included.

Here is an example of the output:

Copying content files
Copying '/Users/jonathanpeppers/Desktop/MonoTouch/XamarinMacResxRepro/XamarinMacResxRepro/bin/Debug/XamarinMacResxRepro.exe' to '/Users/jonathanpeppers/Desktop/MonoTouch/XamarinMacResxRepro/XamarinMacResxRepro/bin/Debug/XamarinMacResxRepro.app/Contents/MonoBundle/XamarinMacResxRepro.exe'
Copying '/Users/jonathanpeppers/Desktop/MonoTouch/XamarinMacResxRepro/XamarinMacResxRepro/bin/Debug/XamarinMacResxRepro.exe.mdb' to '/Users/jonathanpeppers/Desktop/MonoTouch/XamarinMacResxRepro/XamarinMacResxRepro/bin/Debug/XamarinMacResxRepro.app/Contents/MonoBundle/XamarinMacResxRepro.exe.mdb'
Copying '/Users/jonathanpeppers/Desktop/MonoTouch/XamarinMacResxRepro/MyResources.MyNamespace/bin/Debug/fr/MyResources.resources.dll' to '/Users/jonathanpeppers/Desktop/MonoTouch/XamarinMacResxRepro/XamarinMacResxRepro/bin/Debug/XamarinMacResxRepro.app/Contents/MonoBundle/fr/MyResources.resources.dll'
File '/Users/jonathanpeppers/Desktop/MonoTouch/XamarinMacResxRepro/MyResources.MyNamespace/bin/Debug/fr/MyResources.resources.dll' is missing.
Build complete -- 1 error, 0 warnings

---------------------- Done ----------------------

Could not find support file '/Users/jonathanpeppers/Desktop/MonoTouch/XamarinMacResxRepro/MyResources.MyNamespace/bin/Debug/fr/MyResources.resources.dll'.
Build: 1 error, 0 warnings

But the file is there, it is just looking for the wrong path.

So I played around with it, and it seems to be due to our project being named MyResources.MyNamespace.dll instead of MyResources.dll.  If you drop the ".MyNamespace" off the output, it seems to work.

I'm attaching a repro for you guys to take a look at.  I have MonoDevelop 3.1.1 and Xamarin.Mac 1.0.11, but I can paste the full info if you need it.
Comment 1 Sebastien Pouliot 2012-12-21 13:58:12 UTC
-> Xamarin.Mac
Comment 2 Sebastien Pouliot 2012-12-21 14:09:04 UTC
not 100% sure if it's in the addin or with MD so c.c. mhutch
Comment 3 Dave Dunkin 2012-12-22 13:16:46 UTC
I'm getting this same error with MonoDevelop 3.1.1 and MonoTouch 6.0.8 after updating from MD 3.0.6 and MT 6.0.7. The last part of the namespace is being cut off. This solution built fine with the previous version of MD.

Also reported by another user here: http://mono.1490590.n4.nabble.com/Issues-with-resources-project-tt4657791.html
Comment 4 Sebastien Pouliot 2012-12-22 13:47:44 UTC
Sounds like an MD regression -> MonoDevelop
Comment 6 Brandon 2013-02-06 12:44:26 UTC
I, too, am having this issue.

I had a project named Project.Suffix which contained .resx files. In the Project Output settings, the assembly name was also Project.Suffix. This project file was not the main app, but was referenced by the main app. When building the project in question, it built fine. When building the main app file, that's when I got this error.

It did not go away until I renamed the resx project to ProjectSuffix and also changed the Project Output to be the same name.

Interestingly enough, though, I am seeing this problem in a branch of my current code but not the trunk. They both have the same solution structure.

Just thought i'd add my $0.02. I also am running MonoDev 3.1.1 and MT 6.0.8
Comment 7 Jeffrey Stedfast 2013-02-06 13:11:23 UTC
Brandon: can you try https://files.xamarin.com/~jeff/MonoDevelop-3.1.1.dmg ?

It should be fixed in that custom build, but it'd be nice if someone other than me could confirm the fix. Thanks.
Comment 8 Jeffrey Stedfast 2013-02-06 13:12:41 UTC
Jonathan, Dave: feel free to also give that dmg a try.
Comment 9 Brandon 2013-02-06 13:45:45 UTC
worked like a charm! :) when will this hit the mainstream?
Comment 10 Jeffrey Stedfast 2013-02-06 15:10:46 UTC
I'm pretty sure the patches are in the upcoming 4.0 release, so maybe in another few weeks. There's discussion of putting out some public betas soon, so maybe sooner.