MSB3231 Unable to remove directory

Daniel Manchester 81 Reputation points
2023-02-27T22:01:32.31+00:00

When building a release to a remote device (my Mac) I am getting the following error.

Error MSB3231 Unable to remove directory "obj\Release\net7.0-ios\ios-arm64". Could not find a part of the path 'libSkiaSharp'. ChronicleMobileApp C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.2.1024\tools\msbuild\iOS\Xamarin.Shared.targets

Not sure how to get around this.

Thanks for your help.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,857 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Manchester 81 Reputation points
    2023-02-28T19:13:40.21+00:00

    Hi Wenyan,

    I removed the publish info from my csproj file and was able to get my release build to work again. Thanks for your help.

    Here is what I removed

    	<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
    		<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
    		<CodesignKey>Apple Distribution: My Company Info</CodesignKey>
    		<CodesignProvision>MyMauiSigning</CodesignProvision>
    		<ArchiveOnBuild>true</ArchiveOnBuild>
    	</PropertyGroup>