Bug 33881 - designer.cs file is not generated for RESX file in Shared project
Summary: designer.cs file is not generated for RESX file in Shared project
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 5.9
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-09-11 05:59 UTC by Prashant Cholachagudda
Modified: 2015-09-15 07:20 UTC (History)
4 users (show)

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

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:
Status:
RESOLVED ANSWERED

Description Prashant Cholachagudda 2015-09-11 05:59:31 UTC
When we add a RESX file to a shared project the designer.cs file is not generated.
Possible duplicate of #30311

# Steps to reproduce

1. Create a new Xamarin Forms application.
2. Add a resource file, call it Resources.resx

At this point Xamarin Studio should list Resources.designer.cs file, but it does not create it even after building the project.

# Version information

=== Xamarin Studio ===

Version 5.9.5 (build 10)
Installation UUID: f8016946-f8ae-41ff-8a6e-6c3d1a711d07
Runtime:
	Mono 4.0.3 ((detached/d6946b4)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400030020

=== Apple Developer Tools ===

Xcode 6.4 (7720)
Build 6E35b

=== Xamarin.iOS ===

Version: 8.10.4.46 (Business Edition)
Hash: 2c66d2f
Branch: master
Build date: 2015-08-04 13:52:25-0400

=== Xamarin.Android ===

Version: 5.1.5.3 (Business Edition)
Android SDK: /Users/prashantvc/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
Java SDK: /usr
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.2.111 (Business Edition)

=== Build Information ===

Release ID: 509050010
Git revision: 48d16bc4f12ce3938964fc7c3d72fdc6887ad4ad
Build date: 2015-08-18 16:55:24-04
Xamarin addins: c2d51b360ad9f59e689046d47030df27de28f94a

=== Operating System ===

Mac OS X 10.10.4
Darwin Prashant-MBPr.local 14.4.0 Darwin Kernel Version 14.4.0
    Thu May 28 11:35:04 PDT 2015
    root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
Comment 1 Udham Singh 2015-09-11 08:50:16 UTC
I have checked this issue with the help of bug description and able to reproduce the reported behaviour. Please refer the screencast : http://www.screencast.com/t/wm2hcgro 

Ide Logs : https://gist.github.com/Udham1/77a6e7c5ceb730ab2414
Tool Output : https://gist.github.com/Udham1/903d9e39db15a57aa5e6

Environment Info : 

=== Xamarin Studio ===

Version 5.9.6 (build 26)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
Runtime:
	Mono 4.0.4 ((detached/5ab4c0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400040001

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.10.5.26 (Business Edition)
Hash: 6757279
Branch: master
Build date: 2015-08-24 15:04:27-0400

=== Xamarin.Android ===

Version: 5.1.6.5 (Business Edition)
Android SDK: /Users/xamarin76/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.2.111 (Business Edition)

=== Build Information ===

Release ID: 509060026
Git revision: 031075e25277828f9e74a37906e46818286ec615
Build date: 2015-09-03 15:03:44-04
Xamarin addins: 04612007b3d767c051c04c81df1d5bf03b6d7946

=== Operating System ===

Mac OS X 10.9.5
Darwin Xamarin76s-Mac-mini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Matt Ward 2015-09-11 10:23:07 UTC
This is not a duplicate of #30311. That is a bug in the resource code generation on the roslyn branch.

Resource files that generate a separate designer file do not seem to be supported in Visual Studio. You cannot add a new .resx file to a shared project. You can add a .resw file which is similar to a .resx file but does not generate a separate designer.cs file.

Also if you add a .resx file to a shared project in Visual Studio building or saving the file will not generate the designer file.