Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On IOS - After Updating new Package Microsoft.Maui.Controls-8.0.70 App is not Compiling #23554

Closed
RAMESHKUMAR502 opened this issue Jul 11, 2024 · 19 comments · Fixed by #23978
Closed
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer fixed-in-8.0.72 fixed-in-8.0.80 fixed-in-9.0.0-preview.7.24407.4 fixed-in-9.0.0-rc.1.24453.9 i/regression This issue described a confirmed regression on a currently supported version p/0 Work that we can't release without platform/iOS 🍎 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@RAMESHKUMAR502
Copy link

Description

On IOS -
After Updating new Package Microsoft.Maui.Controls-8.0.70 we are seeing below Build Errors:

/Resources/Raw/pdfjs/build/pdf.sandbox.js: Error: The name 'Resources' is reserved and cannot be used.
/Resources/Raw/pdfjs/build/pdf.sandbox.js.map: Error: The name 'Resources' is reserved and cannot be used.

To Support the loading PDF using Javascript we have added PDF.js library from the official PDF.js GitHub repository

After Upgrading the Application to new Nuget package Microsoft.Maui.Controls-8.0.70 we see the issue on IOS, Andriord is working Fine.

Please find the folder Structure Image and Error Image Below
image
image

Steps to Reproduce

After Updating new Package Microsoft.Maui.Controls-8.0.70 we are seeing below Build Errors:

/Resources/Raw/pdfjs/build/pdf.sandbox.js: Error: The name 'Resources' is reserved and cannot be used.
/Resources/Raw/pdfjs/build/pdf.sandbox.js.map: Error: The name 'Resources' is reserved and cannot be used.

To Support the loading PDF using Javascript we have added PDF.js library from the official PDF.js GitHub repository

After Upgrading the Application to new Nuget package Microsoft.Maui.Controls-8.0.70 we see the issue on IOS, Andriord is working Fine.

Link to public reproduction project repository

No response

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.60 SR6

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

NO

Relevant log output

Resources/Raw/pdfjs/web/cmaps/78ms-RKSJ-V.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/83pv-RKSJ-H.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/83pv-RKSJ-H.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/90ms-RKSJ-H.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/90ms-RKSJ-H.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/90ms-RKSJ-V.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/90ms-RKSJ-V.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/90msp-RKSJ-H.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/90msp-RKSJ-H.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/90msp-RKSJ-V.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/90msp-RKSJ-V.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/90pv-RKSJ-H.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/90pv-RKSJ-H.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/90pv-RKSJ-V.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/90pv-RKSJ-V.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Add-H.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Add-H.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Add-RKSJ-H.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Add-RKSJ-H.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Add-RKSJ-V.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Add-RKSJ-V.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Add-V.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Add-V.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-0.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-0.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-1.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-1.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-2.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-2.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-3.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-3.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-4.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-4.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-5.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-5.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-6.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-6.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-GB1-0.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-GB1-0.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-GB1-1.bcmap : error : The name 'Resources' is reserved and cannot be used.
Resources/Raw/pdfjs/web/cmaps/Adobe-GB1-1.bcmap : error :         
Resources/Raw/pdfjs/web/cmaps/Adobe-GB1-2.bcmap : error : The name 'Resources' is reserved and cannot be used.
@RAMESHKUMAR502 RAMESHKUMAR502 added the t/bug Something isn't working label Jul 11, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@shobanasuresh
Copy link

We too are getting this build error. Please see #23557 (comment) for repro test app.

Hi @jfversluis - Could this build error be caused due to some internal change that was made for #21350?

@samhouts samhouts added platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending labels Jul 11, 2024
@ninachen03
Copy link

This issue has been verified using Visual Studio 17.6.12(build 410) (8.0.70)Can repro it, 8.7.61 cannot repro it.

@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version and removed potential-regression This issue described a possible regression on a currently supported version., verification pending labels Jul 12, 2024
@BenDTU
Copy link

BenDTU commented Jul 12, 2024

Seeing the same, as triggered by the following for an image used as an iOS splash screen, compiling in Rider on Mac:

<ItemGroup>
   <BundleResource Include="Resources\cover.png" />
</ItemGroup>

@cagriy
Copy link

cagriy commented Jul 12, 2024

Same problem on 8.0.70, cannot compile anymore. Testing on Rider, the problem goes away if I revert to 8.0.61

@Redth
Copy link
Member

Redth commented Jul 13, 2024

Has anyone tried deleting their bin and obj folders and compiling again? Wondering if something changed between versions and some old intermediate output is conflicting.

@RAMESHKUMAR502
Copy link
Author

yes, we Tried Many times by deleting bin and obj..still, we have the same error as above.

@PureWeen
Copy link
Member

Can you create and attach a binlog please?
https://github.com/dotnet/maui/wiki/Capturing-Binary-Logs

@PureWeen PureWeen added the s/needs-info Issue needs more info from the author label Jul 15, 2024
@PureWeen PureWeen added this to the .NET 8 SR7 milestone Jul 15, 2024
@shobanasuresh
Copy link

@PureWeen Attaching binlog for the test app shared in #23557 (comment)

msbuild_binlog.zip

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Jul 16, 2024
@vtmonilgandhi
Copy link

I fixed this issue by removing

<ItemGroup> <None Remove="Resources\Fonts\Precious.ttf" /> <None Remove="Resources\Images\header.png" /> ... </ItemGroup>

and removing
<ItemGroup> <BundleResource Include="Resources\Images\appicnormal.png" /> <BundleResource Include="Resources\Images\app_ic.png" /> <BundleResource Include="Resources\Images\logo_white.png" /> ... </ItemGroup>

As we already include all images with this line <MauiImage Include="Resources\Images\*" />

@RsZoli
Copy link

RsZoli commented Jul 17, 2024

I can confirm this, i'm having the same problem with Maui.Controls 8.0.70, our pipelines suddenly just stopped after the update!

Reverting back to 8.0.61 fixes this!

@mmiller-d8
Copy link

Same. Just updated to 8.0.7 broke it for me too

@Kebechet
Copy link

++

@samhouts samhouts added the area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer label Jul 31, 2024
@Kebechet
Copy link

Kebechet commented Aug 1, 2024

Is fix in https://github.com/dotnet/maui/releases/tag/8.0.71 related to this issue ?

@BenDTU
Copy link

BenDTU commented Aug 1, 2024

I don't think so, I'm still seeing the issue after upgrading to 8.0.71

@mnxamdev
Copy link

mnxamdev commented Aug 2, 2024

This doesn't work either. We have a project with the word "Resources" in it. Please fix this ASAP, this sidetracked us a bit. This issue keeps coming up apparently as I found existing issues for this problem.

<BundleResource Include="..\..\MyProject.Core.Resources\XML\my.xml">
    <Link>Resources\Raw\XML\my.xml</Link>
</BundleResource>

@PureWeen PureWeen modified the milestones: .NET 8 SR7, .NET 8 SR8 Aug 2, 2024
@PureWeen PureWeen added the p/0 Work that we can't release without label Aug 2, 2024
@mnxamdev
Copy link

mnxamdev commented Aug 2, 2024

This doesn't work either:

<BundleResource Include="Resources\HTML\bootstrap.min.css" Condition=" '$(EnableDefaultCssItems)' == 'true' " />

@Redth
Copy link
Member

Redth commented Aug 2, 2024

@mnxamdev I think you're trying to add the Resources subdirectory when that's already where this file will go in the app bundle.

Try this instead:

<ItemGroup>
  <BundleResource Include="..\..\MyProject.Core.Resources\XML\my.xml" LogicalName="Raw\XML\my.xml" />
</ItemGroup>

Alternatively you can glob them in:

<ItemGroup>
  <BundleResource Include="..\..\MyProject.Core.Resources\**" LogicalName="Raw\%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

I suspect you don't really want the Raw\ part of that logical name though. The BundleResource items are already going to go into the Resources\ folder in the app bundle, and Raw\ is really just a convention of the MAUI single project targets which help automatically include anything in the shared Resources\Raw\** folder be added to the BundleResource item group, and have the recursive directory preserved.

So let's say you put a file in the project MyMauiApp/Resources/Raw/SomePath/ToSome/TextFile.txt, we would automatically add your item to the BundleResource group to end up in the app bundle path: Resources/SomePath/ToSome/TextFile.txt.

mattleibow added a commit that referenced this issue Aug 2, 2024
Fixes #23554

Prior to Maui 8.0.70, there was a bug that only removed the "Resources/" prefix, and not the correct "Platforms/iOS/Resource": #16734

This PR #23269 fixes the original issue, but now exposed the case where BundleResource were included in the root Resources folder instead of the Platforms/iOS/ folder.
github-actions bot pushed a commit that referenced this issue Aug 5, 2024
Fixes #23554

Prior to Maui 8.0.70, there was a bug that only removed the "Resources/" prefix, and not the correct "Platforms/iOS/Resource": #16734

This PR #23269 fixes the original issue, but now exposed the case where BundleResource were included in the root Resources folder instead of the Platforms/iOS/ folder.
mattleibow added a commit that referenced this issue Aug 5, 2024
Fixes #23554

Prior to Maui 8.0.70, there was a bug that only removed the "Resources/" prefix, and not the correct "Platforms/iOS/Resource": #16734

This PR #23269 fixes the original issue, but now exposed the case where BundleResource were included in the root Resources folder instead of the Platforms/iOS/ folder.
PureWeen added a commit that referenced this issue Aug 5, 2024
…ce (#24015)

* Remove the 'Resources' prefix from BundleResource

Fixes #23554

Prior to Maui 8.0.70, there was a bug that only removed the "Resources/" prefix, and not the correct "Platforms/iOS/Resource": #16734

This PR #23269 fixes the original issue, but now exposed the case where BundleResource were included in the root Resources folder instead of the Platforms/iOS/ folder.

* Update Microsoft.Maui.Controls.SingleProject.targets

* Update Microsoft.Maui.Controls.SingleProject.targets

* Update Versions.props

* Add a test

# Conflicts:
#	src/TestUtils/src/Microsoft.Maui.IntegrationTests/TemplateTests.cs

* string

---------

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
@github-project-automation github-project-automation bot moved this from Todo to Done in MAUI SDK Ongoing Aug 5, 2024
github-actions bot pushed a commit that referenced this issue Aug 5, 2024
Fixes #23554

Prior to Maui 8.0.70, there was a bug that only removed the "Resources/" prefix, and not the correct "Platforms/iOS/Resource": #16734

This PR #23269 fixes the original issue, but now exposed the case where BundleResource were included in the root Resources folder instead of the Platforms/iOS/ folder.
PureWeen pushed a commit that referenced this issue Aug 6, 2024
…esource (#24024)

* Remove the 'Resources' prefix from BundleResource

Fixes #23554

Prior to Maui 8.0.70, there was a bug that only removed the "Resources/" prefix, and not the correct "Platforms/iOS/Resource": #16734

This PR #23269 fixes the original issue, but now exposed the case where BundleResource were included in the root Resources folder instead of the Platforms/iOS/ folder.

* Update Microsoft.Maui.Controls.SingleProject.targets

* Update Microsoft.Maui.Controls.SingleProject.targets

* Add a test

* string

---------

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer fixed-in-8.0.72 fixed-in-8.0.80 fixed-in-9.0.0-preview.7.24407.4 fixed-in-9.0.0-rc.1.24453.9 i/regression This issue described a confirmed regression on a currently supported version p/0 Work that we can't release without platform/iOS 🍎 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.