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

Add a workaround for #176 #177

Merged
merged 4 commits into from
Aug 13, 2019
Merged

Conversation

mattleibow
Copy link
Contributor

@mattleibow mattleibow commented Aug 6, 2019

The @(NativeReference) is used for other things in .NET, so make sure to remove the incorrect file. #176

Sample bug here: https://github.com/mattleibow/XamarinNativeReferencesBug

The `@(NativeReference)` is used for other things in .NET, so make sure to remove the incorrect file.

novotnyllc#176
@clairernovotny
Copy link
Collaborator

Happy to merge, but any chance you can add a test case/repro to the test projects?

@@ -34,4 +34,12 @@
<Error Text="The Binding Project for $(_SdkTargetPlatformName) is only supported with only C#, not with $(_SdkLanguageSourceName). Please change the project to C# to use the Bindings Project.'"/>
</Target>

<!-- A workaround for https://github.com/microsoft/msbuild/issues/4584 and resolves https://github.com/onovotny/MSBuildSdkExtras/issues/176 -->
<Target Name="_RemoveNativeReferencesManifest" Condition="'$(IsApplePlatform)' == 'true'" AfterTargets="BuiltProjectOutputGroup">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated this to exclude the binding projects test because @(NativeReference) is also valid in non-binding projects.

@clairernovotny
Copy link
Collaborator

Is this ready to go now?

@@ -32,6 +32,10 @@
<Reference Include="System.Xml" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'xamarin.ios10'">
<NativeReference Include="Resource1.resx" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The actual contents of the file is unimportant because it is only used at app link-time. Also, in order for this test to pass/fail, you need to pack. The issue does not arise in build because iOS never references the "generated" file. But, the pack target does when it tries to pack it.

@mattleibow
Copy link
Contributor Author

I think we are good to go!

@clairernovotny clairernovotny merged commit 8ce9859 into novotnyllc:master Aug 13, 2019
@mattleibow mattleibow deleted the patch-2 branch August 13, 2019 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants