Xamarin keeps creating SwiftSupport folder

Michelangelo Lattanzio 1 Reputation point

I am building a release version of a Xamarin app which has no Swift dependencies.

When I try to archive the project for publishing I keep finding the "SwiftSupport" folder with an empty "iphoneos" sub-folder.

Normally I expect the "SwiftSupport" folder to not be created if the project doesn't include any dylib, and that's the case if I create a new blank Xamarin project.

So my question is. How can I disable the creation of the "SwiftSupport" folder?

I looked pretty much everywhere but the only "answer" that I get is simply "delete that folder" and that doesn't fit the requirements of my question:

What causes the creation of the SwiftSupport folder?
How to prevent the creation of the SwiftSupport folder in a Xamarin use case where there are no swift libraries involved (Like the default Xamarin project)

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,325 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 38,911 Reputation points Microsoft Vendor


    You can try the following steps to prevent Visual Studio from creating the folder.

    Step1. Make sure there are no file in your SwiftSupport folder.

    Step2. Open the project file of your Solution (*.csproj) with a text editor, search and remove:

       <Folder Include="SwiftSupport\" />  

    Step3, Save the project file and reopen the Solution in VS. The folder would be prevent from creating in VS.

    Best Regards,

    Alec Liu.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.