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

ILStrip failed for [..]/Xamarin.iOS10/ru/Xamarin.Forms.Platform.iOS.resources.dll: File '[...]/Xamarin.iOS10/ru/Xamarin.Forms.Platform.iOS.resources.dll' not found #13922

Closed
rolfbjarne opened this issue Jan 27, 2022 · 7 comments
Assignees
Labels
bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6)
Milestone

Comments

@rolfbjarne
Copy link
Member

This is a spin-off of #13838 (CC @lauxjpn). See that issue if this does not contain enough information.


Steps to Reproduce

I have a net6.0-ios targeting project, that references a package that contains culture specific resource assemblies (the package is a locally build Xamarin.Forms package, of which the iOS related parts target net6.0-ios).

I am running the following build command for my project on my Windows 10 development machine, to build the project remotely on my macOS build host:

dotnet publish "C:\PathToSolution\src\ProjectName\ProjectName.csproj" -c Release -p:ServerAddress=192.168.0.3 -p:ServerUser=username -bl -v d

This results in the following:

C:\PathToSolution\src\ProjectName\ProjectName.csproj(93,9): error : ILStrip failed for C:/Users/Username/.nuget/packages/xamarin.forms/6.0.0/lib/Xamarin.iOS10/ru/Xamarin.Forms.Platform.iOS.resources.dll: File '/Users/username/Library/Caches/Xamarin/mtbs/builds/ProjectName/c42c14ed284fb2fb3c932a4cc8d9e9afc0f6d0aaeb390b848220a469cd12041d/C:/Users/Username/.nuget/packages/xamarin.forms/6.0.0/lib/Xamarin.iOS10/ru/Xamarin.Forms.Platform.iOS.resources.dll' not found.

At the macOS build host, the following files exist:

~ % ls -lah /Users/username/Library/Caches/Xamarin/mtbs/builds/ProjectName/c42c14ed284fb2fb3c932a4cc8d9e9afc0f6d0aaeb390b848220a469cd12041d/C:/Users/Username/.nuget/packages/xamarin.forms/6.0.0/lib/Xamarin.iOS10
total 4272
drwxr-xr-x  6 username  staff   192B Jan 27 00:15 .
drwxr-xr-x  3 username  staff    96B Jan 27 00:15 ..
-rw-r--r--  1 username  staff   1.3M Jan 27 00:15 Xamarin.Forms.Core.dll
-rw-r--r--  1 username  staff    13K Jan 27 00:15 Xamarin.Forms.Platform.dll
-rw-r--r--  1 username  staff   701K Jan 27 00:15 Xamarin.Forms.Platform.iOS.dll
-rw-r--r--  1 username  staff   111K Jan 27 00:15 Xamarin.Forms.Xaml.dll

The following 2 (sample) directories exist on the macOS build host as well, but contain no files:

/Users/username/Library/Caches/Xamarin/mtbs/builds/ProjectName/c42c14ed284fb2fb3c932a4cc8d9e9afc0f6d0aaeb390b848220a469cd12041d/obj/Release/net6.0-ios/ios-arm64/stripped/ar
/Users/username/Library/Caches/Xamarin/mtbs/builds/ProjectName/c42c14ed284fb2fb3c932a4cc8d9e9afc0f6d0aaeb390b848220a469cd12041d/obj/Release/net6.0-ios/ios-arm64/stripped/ar/Xamarin.Forms.Platform.iOS.resources.dllUsers/Username/.nuget/packages/xamarin.forms/6.0.0/lib/Xamarin.iOS10/ar

A sample Xamarin.Forms resource assembly item looks like this:

C:\Users\Username\.nuget\packages\xamarin.forms\6.0.0\lib\Xamarin.iOS10\ar\Xamarin.Forms.Platform.iOS.resources.dll
    DestinationSubPath = ar\Xamarin.Forms.Platform.iOS.resources.dll
    RelativePath = ..\ProjectName.app\\\ar\\Xamarin.Forms.Platform.iOS.resources.dll
    NuGetPackageVersion = 6.0.0
    AssetType = resources
    Culture = ar
    NuGetPackageId = Xamarin.Forms
    OutputPath = obj\Release\net6.0-ios\ios-arm64\\stripped\ar\Xamarin.Forms.Platform.iOS.resources.dll
    CopyLocal = true
    DestinationSubDirectory = ar\
    CopyToPublishDirectory = PreserveNewest
    PathInPackage = lib/Xamarin.iOS10/ar/Xamarin.Forms.Platform.iOS.resources.dll

The major upload operations for assemblies happen in the PrepareForBuild target for _UnpackLibraryResources items and in the _RunILLink target.
In both targets, the Xamarin.Forms.Platform.iOS.resources.dll files are not being uploaded to the macOS build host (no error or warning).

The last time the Xamarin.Forms.Platform.iOS.resources.dll files were locally copied on the Windows 10 development machines was in the _CopyFilesMarkedCopyLocal target, shortly after the CoreCompile target.

@rolfbjarne
Copy link
Member Author

It seems that the resource assemblies aren't copied to the Mac.

@chamons could you have a look?

CC @emaf maybe you have ideas about what's happening?

@chamons chamons self-assigned this Jan 27, 2022
@emaf
Copy link
Contributor

emaf commented Jan 27, 2022

@mauroa is this the same ILStrip problem you were facing?

chamons added a commit to chamons/xamarin-macios that referenced this issue Jan 28, 2022
chamons added a commit to chamons/xamarin-macios that referenced this issue Jan 28, 2022
@mauroa
Copy link
Contributor

mauroa commented Jan 31, 2022

@emaf @rolfbjarne @chamons almost the same issue as this one: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1430924

The only difference is that it's not with resource assemblies but with the main app assembly. I can't see any assembly put in the stripped folder after the ILStrip Task runs

chamons added a commit that referenced this issue Feb 2, 2022
@dalexsoto
Copy link
Member

As per comment on https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1430924 closing.

@lauxjpn
Copy link

lauxjpn commented Feb 18, 2022

As per comment on https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1430924 closing.

@dalexsoto Please quote the comment. The workitem is not publicly available. Thanks!

@chamons
Copy link
Contributor

chamons commented Feb 18, 2022

This issue can not reproduce on 17.2 Preview 2[32214.110.main].

This will be fixed in an upcoming preview.

@lauxjpn
Copy link

lauxjpn commented Feb 20, 2022

@chamons Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6)
Projects
None yet
Development

No branches or pull requests

6 participants