-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Resource.designer.cs does not yet support comma-delimited list for library %(Aliases) metadata #4409
Comments
Fixes dotnet#4409 Our inital commit (d18c824) to support Aliases did not take into account the fact your can add more than one. This commit handles the comma delimited `Aliases` metadata so that the generated Resource.designer.cs file compiles.
Pr up #4423 |
…4423) Fixes: #4409 Commit d18c824 added support for `%(Aliases)`, but `%(Aliases)` can contain a comma-separated list of names, accorind go the description text in the Visual Studio **Properties** window: > A comma-delimited list of aliases to this reference. However, if you attempt to actually provide a comma-separated list of values, a CS1002 will instead be reported: Resources\Resource.designer.cs(1,20,1,21): error CS1002: ; expected because we generate the line: extern alias Lib1A,Lib1B; Add support for comma delimited `%(Aliases)` metadata values so that the generated `Resource.designer.cs` file compiles, emitting a= separate `extern alias` per value: extern alias Lib1A; extern alias Lib1B;
…4423) Fixes: #4409 Commit d18c824 added support for `%(Aliases)`, but `%(Aliases)` can contain a comma-separated list of names, accorind go the description text in the Visual Studio **Properties** window: > A comma-delimited list of aliases to this reference. However, if you attempt to actually provide a comma-separated list of values, a CS1002 will instead be reported: Resources\Resource.designer.cs(1,20,1,21): error CS1002: ; expected because we generate the line: extern alias Lib1A,Lib1B; Add support for comma delimited `%(Aliases)` metadata values so that the generated `Resource.designer.cs` file compiles, emitting a= separate `extern alias` per value: extern alias Lib1A; extern alias Lib1B;
Release status update A Preview version has now been published on Windows that includes the fix for this item. The fix is not yet included in a Release version. This item will be updated again when a Release version is available that includes the fix. The fix is not yet available on macOS. I will update this item again when a Preview version with the fix is available on macOS. Fix included in Xamarin.Android 10.3.0.74 Fix included on Windows in Visual Studio 2019 version 16.6 Preview 3. To try the Preview version that includes the fix, check for the latest updates in Visual Studio Preview. Fix not yet available on macOS. |
Release status update A Preview version of Xamarin.Android has now been published on macOS that includes the fix for this item. The fix is not yet included in a Release version. I will update this item again when a Release version is available that includes the fix. Fix included in Xamarin.Android 10.3.0.74. Fix included on macOS in Visual Studio 2019 for Mac version 8.6 Preview 2. To try the Preview version that includes the fix, check for the latest updates on the Preview updater channel. |
Release status update A new Release version has now been published that includes the fix for this item. Fix included in Xamarin.Android 10.3.1.0. Fix included on Windows in Visual Studio 2019 version 16.6. To get the new version that includes the fix, check for the latest updates or install the latest version from https://visualstudio.microsoft.com/downloads/. Fix included on macOS in Visual Studio 2019 for Mac version 8.6. To get the new version that includes the fix, check for the latest updates on the Stable updater channel. |
Context: #3808 (comment)
In Visual Studio, I noticed that the description text for Aliases in the Properties window says:
I haven't yet found a mention of this in my quick searches of docs.microsoft.com, but it seems this is indeed allowed for the
%(Aliases)
metadata.Steps to reproduce
Edit the
AndroidUpdateResourcesTest.CheckProjectReferenceAlias
test to replace:Run the test.
Expected behavior
The test passes.
It looks like the desired
external alias
lines to generate for Resource.designer.cs would probably be:Actual behavior
The test fails due to a syntax error in the generated Resource.designer.cs:
Version information
xamarin-android/master@aaea55ff99ae033682dc8eef0817ddbe007aa542
The text was updated successfully, but these errors were encountered: