dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.22k stars 1.76k forks source link

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

Closed RAMESHKUMAR502 closed 3 months ago

RAMESHKUMAR502 commented 4 months ago

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.
github-actions[bot] commented 4 months ago

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 commented 4 months ago

We too are getting this build error. Please see https://github.com/dotnet/maui/issues/23557#issue-2402425395 for repro test app.

Hi @jfversluis - Could this build error be caused due to some internal change that was made for https://github.com/dotnet/maui/pull/21350?

ninachen03 commented 4 months ago

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.

BenDTU commented 4 months ago

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 commented 4 months ago

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

Redth commented 4 months ago

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 commented 4 months ago

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

PureWeen commented 4 months ago

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

shobanasuresh commented 3 months ago

@PureWeen Attaching binlog for the test app shared in https://github.com/dotnet/maui/issues/23557#issue-2402425395

msbuild_binlog.zip

vtmonilgandhi commented 3 months ago

I fixed this issue by removing

`

... `

and removing `

  <BundleResource Include="Resources\Images\app_ic.png" />
  <BundleResource Include="Resources\Images\logo_white.png" />

... `

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

RsZoli commented 3 months ago

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!

Pastajello commented 3 months ago

Nightly build https://dev.azure.com/xamarin/public/_artifacts/feed/maui-nightly/NuGet/Microsoft.Maui.Controls/versions/8.0.70-ci.net8.24326.4 works well, just next nightly starts failing so issie appeared somewhere in : https://dev.azure.com/xamarin/public/_artifacts/feed/maui-nightly/NuGet/Microsoft.Maui.Controls/overview/8.0.70-ci.net8.24327.1

Propably #23269 ? @PureWeen

mmiller-d8 commented 3 months ago

Same. Just updated to 8.0.7 broke it for me too

Kebechet commented 3 months ago

++

Kebechet commented 3 months ago

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

BenDTU commented 3 months ago

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

mnxamdev commented 3 months ago

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>
mnxamdev commented 3 months ago

This doesn't work either:

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

@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.