Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ public override bool Execute ()
nativeFrameworks.Add (item);
} else {
item.SetMetadata ("LogicalName", logicalName);
item.SetMetadata ("WithCulture", "false");
item.SetMetadata ("Type", "Non-Resx");
embeddedResources.Add (item);
}

Expand Down
20 changes: 13 additions & 7 deletions msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ Copyright (C) 2020 Microsoft. All rights reserved.
<Output TaskParameter="Include" ItemName="Compile" />
</CreateItem>

<CreateItem Include="@(ObjcBindingNativeLibrary)">
<Output TaskParameter="Include" ItemName="ManifestResourceWithNoCulture" />
</CreateItem>
<ItemGroup>
<EmbeddedResource Include="@(ObjcBindingNativeLibrary)">
<Type>Non-Resx</Type>
<WithCulture>false</WithCulture>
</EmbeddedResource>
</ItemGroup>
</Target>

<!--
Expand Down Expand Up @@ -125,9 +128,12 @@ Copyright (C) 2020 Microsoft. All rights reserved.
WorkingDirectory="%(_NativeFrameworkResource.FrameworkPath)" >
</Zip>

<CreateItem Include="%(_NativeFrameworkResource.ZipFile)">
<Output TaskParameter="Include" ItemName="ManifestResourceWithNoCulture" />
</CreateItem>
<ItemGroup>
<EmbeddedResource Include="%(_NativeFrameworkResource.ZipFile)">
<Type>Non-Resx</Type>
<WithCulture>false</WithCulture>
</EmbeddedResource>
</ItemGroup>
</Target>

<Target Name="_PrepareNativeReferences" Condition="'$(DesignTimeBuild)' != 'true'">
Expand All @@ -137,7 +143,7 @@ Copyright (C) 2020 Microsoft. All rights reserved.
IntermediateOutputPath="$(IntermediateOutputPath)"
NativeReferences="@(NativeReference)"
>
<Output ItemName="ManifestResourceWithNoCulture" TaskParameter="EmbeddedResources" Condition="'$(NoBindingEmbedding)' != 'true'"/>
<Output ItemName="EmbeddedResource" TaskParameter="EmbeddedResources" Condition="'$(NoBindingEmbedding)' != 'true'"/>
<Output ItemName="_NativeFramework" TaskParameter="NativeFrameworks" Condition="'$(NoBindingEmbedding)' != 'true'"/>
<Output ItemName="Compile" TaskParameter="LinkWithAttributes" />
</PrepareNativeReferences>
Expand Down
2 changes: 2 additions & 0 deletions tests/mmptest/src/BindingProjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ public void ShouldBuildWithoutErrors_AndLinkCorrectFramework (BindingProjectType

Assert.False (logs.Item1.Contains ("CS1685"), "Binding should not contains CS1685 multiple definition warning:\n" + logs.Item1);

Assert.False (logs.Item1.Contains ("MSB9004"), "Binding should not contains MSB9004 warning:\n" + logs.Item1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we all use english. But if we have a bot configured to spanish and we land translations, we are going to have issues :/

Nothing really to be changed in this PR, but I've got the feeling this is going to hit us in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have about a million of these in mmp/msbuild ios-msbuild tests.

If nothing else, we can use environmental variables to force language to test this (and hopefully translation as well).


string bindingName = RemoveCSProj (projects.Item1.ProjectName);
string appName = RemoveCSProj (projects.Item2.ProjectName);
string libPath = Path.Combine (tmpDir, $"bin/Debug/{appName}.app/Contents/MonoBundle/{bindingName}.dll");
Expand Down