-
Notifications
You must be signed in to change notification settings - Fork 565
[release/10.0.1xx] [dotnet] Fix handling binding frameworks embedded in binding assemblies remotely. #24538
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
Merged
rolfbjarne
merged 4 commits into
release/10.0.1xx
from
dev/rolf/backport-pr-24518-release/10.0.1xx-2026-01-22
Jan 22, 2026
Merged
[release/10.0.1xx] [dotnet] Fix handling binding frameworks embedded in binding assemblies remotely. #24538
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| using Foundation; |
8 changes: 8 additions & 0 deletions
8
tests/dotnet/BindingWithEmbeddedFramework/MacCatalyst/BindingWithEmbeddedFramework.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-maccatalyst</TargetFramework> | ||
| </PropertyGroup> | ||
| <Import Project="..\shared.csproj" /> | ||
| </Project> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../shared.mk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| using System; | ||
| namespace BindingWithEmbeddedFramework { | ||
| public class MyClass { | ||
| public MyClass () | ||
| { | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| namespace BindingWithEmbeddedFramework { | ||
| public static class CFunctions { | ||
| [DllImport ("XTest.framework/XTest")] | ||
| public static extern int theUltimateAnswer (); | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
tests/dotnet/BindingWithEmbeddedFramework/iOS/BindingWithEmbeddedFramework.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-ios</TargetFramework> | ||
| </PropertyGroup> | ||
| <Import Project="..\shared.csproj" /> | ||
| </Project> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../shared.mk |
8 changes: 8 additions & 0 deletions
8
tests/dotnet/BindingWithEmbeddedFramework/macOS/BindingWithEmbeddedFramework.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-macos</TargetFramework> | ||
| </PropertyGroup> | ||
| <Import Project="..\shared.csproj" /> | ||
| </Project> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../shared.mk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project> | ||
| <PropertyGroup> | ||
| <IsBindingProject>true</IsBindingProject> | ||
| <NoBindingEmbedding>false</NoBindingEmbedding> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="../../common/shared-dotnet.csproj" /> | ||
|
|
||
| <ItemGroup> | ||
| <ObjcBindingApiDefinition Include="../ApiDefinition.cs" /> | ||
| <ObjcBindingCoreSource Include="../StructsAndEnums.cs" /> | ||
| <NativeReference Include="../../../test-libraries/.libs/$(NativeLibName)/XTest.framework" Kind="Framework" /> | ||
| </ItemGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| TOP=../../../.. | ||
| include $(TOP)/tests/common/shared-dotnet.mk |
8 changes: 8 additions & 0 deletions
8
tests/dotnet/BindingWithEmbeddedFramework/tvOS/BindingWithEmbeddedFramework.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-tvos</TargetFramework> | ||
| </PropertyGroup> | ||
| <Import Project="..\shared.csproj" /> | ||
| </Project> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../shared.mk |
19 changes: 19 additions & 0 deletions
19
tests/dotnet/EmbeddedFrameworkInBindingProjectApp/AppDelegate.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using System; | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| using Foundation; | ||
|
|
||
| namespace EmbeddedFrameworkInBindingProjectApp { | ||
| public class Program { | ||
| static int Main (string [] args) | ||
| { | ||
| Console.WriteLine ($"Embedded framework: {BindingWithEmbeddedFramework.CFunctions.theUltimateAnswer ()}"); | ||
|
|
||
| GC.KeepAlive (typeof (NSObject)); // prevent linking away the platform assembly | ||
|
|
||
| Console.WriteLine (Environment.GetEnvironmentVariable ("MAGIC_WORD")); | ||
|
|
||
| return 0; | ||
| } | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
...eddedFrameworkInBindingProjectApp/MacCatalyst/EmbeddedFrameworkInBindingProjectApp.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-maccatalyst</TargetFramework> | ||
| </PropertyGroup> | ||
| <Import Project="..\shared.csproj" /> | ||
| </Project> |
1 change: 1 addition & 0 deletions
1
tests/dotnet/EmbeddedFrameworkInBindingProjectApp/MacCatalyst/Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
...tnet/EmbeddedFrameworkInBindingProjectApp/iOS/EmbeddedFrameworkInBindingProjectApp.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-ios</TargetFramework> | ||
| </PropertyGroup> | ||
| <Import Project="..\shared.csproj" /> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../shared.mk |
7 changes: 7 additions & 0 deletions
7
...et/EmbeddedFrameworkInBindingProjectApp/macOS/EmbeddedFrameworkInBindingProjectApp.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-macos</TargetFramework> | ||
| </PropertyGroup> | ||
| <Import Project="..\shared.csproj" /> | ||
| </Project> |
1 change: 1 addition & 0 deletions
1
tests/dotnet/EmbeddedFrameworkInBindingProjectApp/macOS/Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../shared.mk |
20 changes: 20 additions & 0 deletions
20
tests/dotnet/EmbeddedFrameworkInBindingProjectApp/shared.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project> | ||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
|
|
||
| <ApplicationTitle>EmbeddedFrameworkInBindingProjectApp</ApplicationTitle> | ||
| <ApplicationId>com.xamarin.embeddedframeworkinbindingprojectapp</ApplicationId> | ||
| <ApplicationVersion>1.0</ApplicationVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="../../common/shared-dotnet.csproj" /> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\BindingWithEmbeddedFramework\$(_PlatformName)\BindingWithEmbeddedFramework.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Compile Include="../*.cs" /> | ||
| </ItemGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| TOP=../../../.. | ||
| TESTNAME=EmbeddedFrameworkInBindingProjectApp | ||
| include $(TOP)/tests/common/shared-dotnet.mk |
7 changes: 7 additions & 0 deletions
7
...net/EmbeddedFrameworkInBindingProjectApp/tvOS/EmbeddedFrameworkInBindingProjectApp.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)-tvos</TargetFramework> | ||
| </PropertyGroup> | ||
| <Import Project="..\shared.csproj" /> | ||
| </Project> |
1 change: 1 addition & 0 deletions
1
tests/dotnet/EmbeddedFrameworkInBindingProjectApp/tvOS/Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../shared.mk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetAdditionalItemsToBeCopied still yields every file in the framework directory without filtering out zero-length files. If the Windows side contains placeholder/empty files inside the framework directory, they will still be copied to the Mac and can overwrite non-empty files there. Consider skipping any enumerated file where new FileInfo (file).Length == 0 (and/or reusing the same empty-file logic for each yielded file).