When you build a Xamarin.iOS project for simulator from the Visual Studio for Mac it creates an .app
file in YourApp.iOS/bin/iPhoneSimulator/Debug/device-builds/iphone12.1-13.2.2/
directory and deploys it to a simulator. You also can install the .app file on a simulator manually.
However, it works only from the VS4Mac UI.
When I'm trying to build the project via msbuild
from my Terminal it does not generate the artifacts.
From the console logs, I can see that MSBuild spets (build targets output) does not match with the Build Output in the VS4Mac.
Is there a way to achieve the same result (built YourApp.app
file) but through a command line?
P.S. What I really trying to achieve is to build the .app
simulator bundle on a custom pre-build step of my Xamarin.UITest project, so it could launch the app on a simulator and run tests.
msbuild -restore iosproject.csproj -p:Configuration=Release -p:OutputPath=/youroutputpath