Ios build fails in Azure
See original GitHub issueDescription
Running build targeting ios in Azure pipeline after signing in build step appsettings.json : error : The path ‘…/…/…/…/…/…/…/work/1/s/[NAME]/appsettings.json’ would result in a file outside of the app bundle and cannot be used. [/Users/runner/work/1/s/[NAME]/[NAME].csproj] appsettings.json : error : [/Users/runner/work/1/s/[NAME]/[NAME].App.csproj] Web/typescript/package-lock.json : error : The path ‘…/…/…/…/…/…/…/work/1/s/[NAME]/Web/typescript/package-lock.json’ would result in a file outside of the app bundle and cannot be used. [/Users/runner/work/1/s/[NAME]/[NAME].App.csproj] Web/typescript/package-lock.json : error : [/Users/runner/work/1/s/[NAME]/[NAME].App.csproj] Web/typescript/package.json : error : The path ‘…/…/…/…/…/…/…/work/1/s/[NAME].App/Web/typescript/package.json’ would result in a file outside of the app bundle and cannot be used. [/Users/runner/work/1/s/[NAME].App/[NAME].App.csproj] Web/typescript/package.json : error : [/Users/runner/work/1/s/[NAME].App/[NAME].App.csproj] Web/typescript/tsconfig.json : error : The path ‘…/…/…/…/…/…/…/work/1/s/[NAME].App/Web/typescript/tsconfig.json’ would result in a file outside of the app bundle and cannot be used. [/Users/runner/work/1/s/[NAME].App/[NAME].App.csproj] Web/typescript/tsconfig.json : error : [/Users/runner/work/1/s/[NAME].App/[NAME].App.csproj]
identifier changed to [NAME]
This stops the build process …
Steps to Reproduce
Setup build pipe , I used the following template
trigger:
- master
pool: vmImage: macos-latest
steps:
-
task: InstallAppleCertificate@2 inputs: certSecureFile: ‘MyDistributionCertificate.p12’ certPwd: ‘$(certificatePassword)’ keychain: ‘temp’
-
task: InstallAppleProvisioningProfile@1 inputs: provisioningProfileLocation: ‘secureFiles’ provProfileSecureFile: ‘MyProvisioningProfile.mobileprovision’
-
task: UseDotNet@2 inputs: packageType: ‘sdk’ version: ‘6.x’
-
task: CmdLine@2 displayName: ‘dotnet workload install maui’ inputs: script: ‘dotnet workload install maui’
-
task: DotNetCoreCLI@2 displayName: ‘dotnet publish (Release)’ inputs: command: ‘publish’ publishWebProjects: false projects: ‘MyMAUIProject.sln’ arguments: ‘-f:net6.0-ios -c:Release /p:ArchiveOnBuild=true /p:EnableAssemblyILStripping=false’ zipAfterPublish: false modifyOutputPath: false
-
task: CopyFiles@2 inputs: SourceFolder: ‘$(Agent.BuildDirectory)’ Contents: ‘**/*.ipa’ TargetFolder: ‘$(Build.ArtifactStagingDirectory)’ flattenFolders: true
-
task: PublishBuildArtifacts@1 inputs: PathtoPublish: ‘$(Build.ArtifactStagingDirectory)’ ArtifactName: ‘drop’ publishLocation: ‘Container’
Set up signing .
Run pipe .
Link to public reproduction project repository
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
macos-latest , Ios
Did you find any workaround?
No
Relevant log output
appsettings.json : error : The path '../../../../../../../work/1/s/[NAME]/appsettings.json' would result in a file outside of the app bundle and cannot be used. [/Users/runner/work/1/s/[NAME]/[NAME].csproj]
appsettings.json : error : [/Users/runner/work/1/s/[NAME]/[NAME].App.csproj]
Web/typescript/package-lock.json : error : The path '../../../../../../../work/1/s/[NAME]/Web/typescript/package-lock.json' would result in a file outside of the app bundle and cannot be used. [/Users/runner/work/1/s/[NAME]/[NAME].App.csproj]
Web/typescript/package-lock.json : error : [/Users/runner/work/1/s/[NAME]/[NAME].App.csproj]
Web/typescript/package.json : error : The path '../../../../../../../work/1/s/[NAME].App/Web/typescript/package.json' would result in a file outside of the app bundle and cannot be used. [/Users/runner/work/1/s/[NAME].App/[NAME].App.csproj]
Web/typescript/package.json : error : [/Users/runner/work/1/s/[NAME].App/[NAME].App.csproj]
Web/typescript/tsconfig.json : error : The path '../../../../../../../work/1/s/[NAME].App/Web/typescript/tsconfig.json' would result in a file outside of the app bundle and cannot be used. [/Users/runner/work/1/s/[NAME].App/[NAME].App.csproj]
Web/typescript/tsconfig.json : error : [/Users/runner/work/1/s/[NAME].App/[NAME].App.csproj]
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:7 (3 by maintainers)

Top Related StackOverflow Question
@datvm you can also set the
PublishFolderType=Nonemetadata on the items to prevent them from being copied to the app bundle:@rolfbjarne thanks it works!