Skip to content

Commit

Permalink
fix(assets): Always generate a valid BundleResource LogicalName
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Apr 19, 2024
1 parent c62fed4 commit 6891d30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,11 @@
Condition="!exists('$(OutputPath)\Assets\SharedAssets.md')" />
</Target>

<!-- fail the build if a BundleResource.LogicalName contains a rooted path -->
<Target Name="ValidateBundleResourceLogicalName" AfterTargets="AfterBuild">
<Error
Condition="'%(BundleResource.LogicalName)' != '' And $([System.IO.Path]::IsPathRooted('%(BundleResource.LogicalName)'))"
Text="BundleResource.LogicalName must not contain a rooted path" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
TargetPlatform="$(XamarinProjectType)"
DefaultLanguage="$(DefaultLanguage)"
IntermediateOutputPath="$(IntermediateOutputPath)"
ContentItems="@(Content);@(_SourceItemsToCopyToOutputDirectory)"
ContentItems="@(ContentWithTargetPath);@(_SourceItemsToCopyToOutputDirectory)"
AndroidAssetsPrefix="$(MonoAndroidAssetsPrefix)"
IosAppManifest="$(_UnoIosAppManifest)"
Condition="'$(XamarinProjectType)'!=''">
Expand Down

0 comments on commit 6891d30

Please sign in to comment.