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

<ItemGroup>
<_BuiltProjectOutputGroupOutputIntermediate Remove="$(OutDir)$(_DeploymentTargetApplicationManifestFileName)" />
<BuiltProjectOutputGroupOutput Remove="$(ProjectDir)$(OutDir)$(_DeploymentTargetApplicationManifestFileName)" />
</ItemGroup>
</Target>

</Project>
4 changes: 4 additions & 0 deletions Tests/ClasslibraryAsSdk/ClasslibraryAsSdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('uap')) ">
<Page Include="uwp\**\*.xaml"/>
<Compile Include="uwp\**\*.cs" />
Expand Down