This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 14255 - App using Component with bundled resources fails to compile on Windows / VS
Summary: App using Component with bundled resources fails to compile on Windows / VS
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android (show other bugs)
Version: unspecified
Hardware: PC Windows
: Highest normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-08-26 22:00 UTC by Redth
Modified: 2016-08-03 15:23 UTC (History)
8 users (show)

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


Attachments
Shows the missing resources error on windows, beside the source project containing the resources on mac (378.89 KB, image/png)
2013-09-05 10:40 UTC, Redth
Details
Simple Repro (158.72 KB, application/zip)
2013-09-05 10:42 UTC, Redth
Details
Build Output as file (11.29 KB, application/octet-stream)
2013-09-05 11:05 UTC, Redth
Details
Resources.designer.cs generated (9.20 KB, application/octet-stream)
2013-09-05 11:06 UTC, Redth
Details

Description Redth 2013-08-26 22:00:10 UTC
Here's the sample project: https://www.dropbox.com/s/vueyiahpcoticf9/Test.App.AndroidHud.zip

If you build this on a mac with xamarin studio, everything works as expected.

If you build this on windows with Visual Studio, you get an error about missing resources (some of the resources that are in the component):

Error	5	'Test.App.AndroidHud.Resource.Layout' does not contain a definition for 'LoadingProgress'	\\vmware-host\Shared Folders\Desktop\Test.App.AndroidHud\Test.App.AndroidHud\Resources\Resource.designer.cs	51	101	Test.App.AndroidHud
Error	4	'Test.App.AndroidHud.Resource.Layout' does not contain a definition for 'LoadingImage'	\\vmware-host\Shared Folders\Desktop\Test.App.AndroidHud\Test.App.AndroidHud\Resources\Resource.designer.cs	50	98	Test.App.AndroidHud
Error	3	'Test.App.AndroidHud.Resource.Layout' does not contain a definition for 'Loading'	\\vmware-host\Shared Folders\Desktop\Test.App.AndroidHud\Test.App.AndroidHud\Resources\Resource.designer.cs	49	93	Test.App.AndroidHud
Error	2	'Test.App.AndroidHud.Resource.Drawable' does not contain a definition for 'RoundedBgDark'	\\vmware-host\Shared Folders\Desktop\Test.App.AndroidHud\Test.App.AndroidHud\Resources\Resource.designer.cs	44	103	Test.App.AndroidHud
Error	1	'Test.App.AndroidHud.Resource.Drawable' does not contain a definition for 'RoundedBg'	\\vmware-host\Shared Folders\Desktop\Test.App.AndroidHud\Test.App.AndroidHud\Resources\Resource.designer.cs	43	99	Test.App.AndroidHud
Comment 1 Redth 2013-09-05 10:40:15 UTC
Created attachment 4785 [details]
Shows the missing resources error on windows, beside the source project containing the resources on mac

Shows the missing resources error on windows, beside the source project containing the resources on mac
Comment 2 Redth 2013-09-05 10:41:26 UTC
Also tested this on Xamarin Studio in windows and get the same issue, so it's not strictly related to Visual Studio, but Windows instead....
Comment 3 Redth 2013-09-05 10:42:17 UTC
Created attachment 4786 [details]
Simple Repro

Run on Windows, and it fails, run on Mac and it works.

You can find the actual source of the AndHUD project here: https://github.com/Redth/AndHUD
Comment 4 Redth 2013-09-05 11:03:43 UTC
Building: TestDroid (Debug)
Build started 9/5/2013 11:03:15 AM.

__________________________________________________

Project "C:\Code\TestDroid\TestDroid\TestDroid.csproj" (Build target(s)):



Target _CheckProjectItems:

    CheckProjectItems Task

      NativeLibraries:

      JavaLibraries:

      JavaSourceFiles:

Target _ComputeAndroidAssetsPaths:

      ResourceFiles:

      IntermediateFiles:

Target _GenerateAndroidAssetsDir:

  Skipping target "_GenerateAndroidAssetsDir" because it has no outputs.

Target _ComputeAndroidResourcePaths:

      ResourceFiles:

        Resources\layout\Main.axml

        Resources\values\Strings.xml

        Resources\drawable\Icon.png

      IntermediateFiles:

    Creating directory "obj\Debug\res\".

Target _GenerateAndroidResourceDir:

    Creating directory "C:\Code\TestDroid\TestDroid\obj\Debug\res\layout".

    Copying file from "Resources\layout\Main.axml" to "C:\Code\TestDroid\TestDroid\obj\Debug\res\layout\main.xml".

    Creating directory "C:\Code\TestDroid\TestDroid\obj\Debug\res\values".

    Copying file from "Resources\values\Strings.xml" to "C:\Code\TestDroid\TestDroid\obj\Debug\res\values\strings.xml".

    Creating directory "C:\Code\TestDroid\TestDroid\obj\Debug\res\drawable".

    Copying file from "Resources\drawable\Icon.png" to "C:\Code\TestDroid\TestDroid\obj\Debug\res\drawable\icon.png".

    Touching "C:\Code\TestDroid\TestDroid\obj\Debug\res\layout\main.xml".

    Touching "C:\Code\TestDroid\TestDroid\obj\Debug\res\values\strings.xml".

    Touching "C:\Code\TestDroid\TestDroid\obj\Debug\res\drawable\icon.png".

Target _ResolveMonoAndroidSdks:

    MonoAndroid Tools: C:\Program Files (x86)\MSBuild\Xamarin\Android\

    MonoAndroid Framework: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\

    MonoAndroid Binaries: C:\Program Files (x86)\MSBuild\Xamarin\Android\

    Android Platform API level: 8

    TargetFrameworkVersion: v2.2

    Android NDK: \\psf\Home\Documents\Android\ndk\android-ndk-r8d\

    Android SDK: C:\Users\20363\AppData\Local\Android\android-sdk\

    Android SDK Build Tools: C:\Users\20363\AppData\Local\Android\android-sdk\build-tools\17.0.0\

    Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39\

Target _ValidateAndroidPackageProperties:

    GetAndroidPackageName Task

      ManifestFile: C:\Code\TestDroid\TestDroid\Properties\AndroidManifest.xml

      AssemblyName: TestDroid

      PackageName: TestDroid.TestDroid

Target _BuildDependencies:

    Resolved library outputs: 

Target _ExtractLibraryProjectImports:

      Assemblies: 

        C:\Code\TestDroid\Components\AndHUD-1.1\lib\android\AndHUD.dll

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll

      Jars: 

      ResolvedResourceDirectories: 

        C:\Code\TestDroid\TestDroid\obj\Debug\__library_projects__\AndHUD\library_project_imports\res

Target _GetLibraryImports:

      NativeLibraries: 

      Jars: 

Target _CheckDuplicateJavaLibraries:

      JavaSourceFiles:

      JavaLibraries:

Target _GetAdditionalResourcesFromAssemblies:

      Assemblies: 

        C:\Code\TestDroid\Components\AndHUD-1.1\lib\android\AndHUD.dll

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll

Target _UpdateAndroidResgen:

      AdditionalResourceDirectories: 

        C:\Code\TestDroid\TestDroid\obj\Debug\__library_projects__\AndHUD\library_project_imports\res

    C:\Users\20363\AppData\Local\Android\android-sdk\build-tools\17.0.0\aapt.exe package -f -m -M C:\Users\20363\AppData\Local\Temp\loerfodo.4zt\AndroidManifest.xml -J C:\Users\20363\AppData\Local\Temp\loerfodo.4zt --custom-package testdroid.testdroid -F C:\Users\20363\AppData\Local\Temp\loerfodo.4zt\resources.apk.bk -S obj\Debug\res -S C:\Code\TestDroid\TestDroid\obj\Debug\__library_projects__\AndHUD\library_project_imports\res -I C:\Users\20363\AppData\Local\Android\android-sdk\platforms\android-8\android.jar --auto-add-overlay 

      AdditionalResourceDirectories:

        C:\Code\TestDroid\TestDroid\obj\Debug\__library_projects__\AndHUD\library_project_imports\res

          []

      Resources:

        C:\Code\TestDroid\TestDroid\obj\Debug\res\layout\main.xml

          [layout\Main.axml]

        C:\Code\TestDroid\TestDroid\obj\Debug\res\values\strings.xml

          [values\Strings.xml]

        C:\Code\TestDroid\TestDroid\obj\Debug\res\drawable\icon.png

          [drawable\Icon.png]

      References:

        C:\Code\TestDroid\Components\AndHUD-1.1\lib\android\AndHUD.dll

          []

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll

          []

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll

          []

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll

          []

        C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll

          []

      - Not remapping resource: Attribute.barColor

      - Not remapping resource: Attribute.barLength

      - Not remapping resource: Attribute.barWidth

      - Not remapping resource: Attribute.circleColor

      - Not remapping resource: Attribute.delayMillis

      - Not remapping resource: Attribute.radius

      - Not remapping resource: Attribute.rimColor

      - Not remapping resource: Attribute.rimWidth

      - Not remapping resource: Attribute.spinSpeed

      - Not remapping resource: Attribute.text

      - Not remapping resource: Attribute.textColor

      - Not remapping resource: Attribute.textSize

      - Not remapping resource: Drawable.ic_errorstatus

      - Not remapping resource: Drawable.ic_successstatus

      - Remapping resource: Drawable.icon -> drawable\Icon

      - Not remapping resource: Drawable.roundedbg

      - Not remapping resource: Drawable.roundedbgdark

      - Not remapping resource: Id.LoadingImage

      - Not remapping resource: Id.LoadingProgressBar

      - Not remapping resource: Id.LoadingProgressWheel

      - Not remapping resource: Id.myButton

      - Not remapping resource: Id.textViewStatus

      - Not remapping resource: Layout.loading

      - Not remapping resource: Layout.loadingimage

      - Not remapping resource: Layout.loadingprogress

      - Remapping resource: Layout.main -> layout\Main

      - Not remapping resource: String.app_name

      - Not remapping resource: String.hello

      - Not remapping resource: String.library_name

      - Not remapping resource: Styleable.ProgressWheel

      - Not remapping resource: Styleable.ProgressWheel_barColor

      - Not remapping resource: Styleable.ProgressWheel_barLength

      - Not remapping resource: Styleable.ProgressWheel_barWidth

      - Not remapping resource: Styleable.ProgressWheel_circleColor

      - Not remapping resource: Styleable.ProgressWheel_delayMillis

      - Not remapping resource: Styleable.ProgressWheel_radius

      - Not remapping resource: Styleable.ProgressWheel_rimColor

      - Not remapping resource: Styleable.ProgressWheel_rimWidth

      - Not remapping resource: Styleable.ProgressWheel_spinSpeed

      - Not remapping resource: Styleable.ProgressWheel_text

      - Not remapping resource: Styleable.ProgressWheel_textColor

      - Not remapping resource: Styleable.ProgressWheel_textSize

      RemovedDirectories: 

        C:\Users\20363\AppData\Local\Temp\loerfodo.4zt

Target GenerateTargetFrameworkMonikerAttribute:

  Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.

Target CoreCompile:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;__MOBILE__;__ANDROID__;__ANDROID_1__;__ANDROID_2__;__ANDROID_3__;__ANDROID_4__;__ANDROID_5__;__ANDROID_6__;__ANDROID_7__;__ANDROID_8__ /errorendlocation /preferreduilang:en-US /reference:C:\Code\TestDroid\Components\AndHUD-1.1\lib\android\AndHUD.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" /debug+ /debug:full /optimize- /out:obj\Debug\TestDroid.dll /target:library /utf8output MainActivity.cs Resources\Resource.designer.cs Properties\AssemblyInfo.cs "C:\Users\20363\AppData\Local\Temp\MonoAndroid,Version=v2.2.AssemblyAttributes.cs" obj\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\Debug\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\Debug\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

    Resources\Resource.designer.cs(43,73,43,82): error CS0117: 'TestDroid.Resource.Drawable' does not contain a definition for 'RoundedBg'

    Resources\Resource.designer.cs(44,77,44,90): error CS0117: 'TestDroid.Resource.Drawable' does not contain a definition for 'RoundedBgDark'

    Resources\Resource.designer.cs(49,67,49,74): error CS0117: 'TestDroid.Resource.Layout' does not contain a definition for 'Loading'

    Resources\Resource.designer.cs(50,72,50,84): error CS0117: 'TestDroid.Resource.Layout' does not contain a definition for 'LoadingImage'

    Resources\Resource.designer.cs(51,75,51,90): error CS0117: 'TestDroid.Resource.Layout' does not contain a definition for 'LoadingProgress'

Done building target "CoreCompile" in project "TestDroid.csproj" -- FAILED.



Done building project "TestDroid.csproj" -- FAILED.



Build FAILED.



Resources\Resource.designer.cs(43,73,43,82): error CS0117: 'TestDroid.Resource.Drawable' does not contain a definition for 'RoundedBg'

Resources\Resource.designer.cs(44,77,44,90): error CS0117: 'TestDroid.Resource.Drawable' does not contain a definition for 'RoundedBgDark'

Resources\Resource.designer.cs(49,67,49,74): error CS0117: 'TestDroid.Resource.Layout' does not contain a definition for 'Loading'

Resources\Resource.designer.cs(50,72,50,84): error CS0117: 'TestDroid.Resource.Layout' does not contain a definition for 'LoadingImage'

Resources\Resource.designer.cs(51,75,51,90): error CS0117: 'TestDroid.Resource.Layout' does not contain a definition for 'LoadingProgress'

    0 Warning(s)

    5 Error(s)



Time Elapsed 00:00:02.58


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

Build: 5 errors, 0 warnings
Comment 5 Redth 2013-09-05 11:05:00 UTC
Created attachment 4787 [details]
Build Output as file
Comment 6 Redth 2013-09-05 11:06:23 UTC
Created attachment 4788 [details]
Resources.designer.cs generated
Comment 7 Atsushi Eno 2013-09-13 14:39:28 UTC
I believe I made a fix for this. We'll know once it's verified on Windows. Thanks for the helpful report.

[master b8b34eb]
Comment 8 Prashant manu 2014-01-22 05:10:54 UTC
I have checked this issue with following builds:

All Windows
VS 2013/2012/2010
X.Android 4.13.0-39

I have build the attached project on VS. It builds successfully.

Note You need to log in before you can comment on or make changes to this bug.