Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
%% Steps to reproduce
1. Create a unified iPhone HelloWorld project (Blank)
2. In project options:
- Enable IPA generation for configs Realease/iPhone & AppStore/iPhone
- Assign a proper application identifier in order to allow build configurations to succeed (development and distribution certificate)
3. Close Visual Studio and open a Visual Studio Developer Command Prompt
4. Run the command `C:\Path\To\The\Solution\TheTestSolution.sln /p:Configuration=Release;Platform=iPhone`
%% Expected results
The build should be properly performed locally && remotely on the mac in order to allow the IPA generation (for both Release and AppStore configurations).
%% Current results
Only the local build is performed.
This was properly working with Xamarin for Visual Studio 3.11 (we have been using it in our TFS builds since December 2014) but seems no longer functional since 4.0.
Find attached the build log from the Windows box.
I think the important part is about the _SayHello target which was already used in Xamarin.VS 3.11 but no longer properly runs since 4.0.
`(_SayHello target) ->
C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(54,5): warning VSXRunBuildLocally: The project TestRemoteBuild was built while disconnected from a Mac agent, so only the main assembly was compiled. Connect to a Xamarin Mac build agent to build the full application. [C:\Users\ggirard\Documents\Visual Studio 2013\Projects\TestRemoteBuild\TestRemoteBuild\TestRemoteBuild.csproj]`
> Windows box
Microsoft Visual Studio Premium 2013
Version 12.0.40629.00 Update 5
Xamarin 188.8.131.526 (5abb0de)
> OS X Box
OS X Yosemite 10.10.5
Version: 184.108.40.206 (Business Edition)
Build date: 2015-09-30 15:22:15-0400
Created attachment 13342 [details]
The build output from the command line specified in the bug description
I have checked this issue and able to reproduce this issue with the help of bug description build using Xamarin.VisualStudio_220.127.116.117_74739827abbb98b1b6e751ed8428dff3d6fee28d monotouch-18.104.22.168_1a6b88f2b2305d50bad065ae4c7292ab6348ff60
Build output: https://gist.github.com/Arpit360/44518a96ff88c666f144
REGRESSION: This issue is working fine with latest stable build
Build output: https://gist.github.com/Arpit360/0c857fd5d57530ecabad
An update to comment 2:
Mac Environment : https://gist.github.com/Arpit360/438405f2b46da57a282f
We changed the parameters for msbuild in 4.0. You now need to add new properties for ServerAddress and ServerUser to (/p:ServerAddress=[myip|hostname] /p:ServerUser[username]). An address and user that will connect via ssh and has been connected once from VS will work (we avoid requiring a password in command line that way). Please let me know if that works for you, and Arpit, please try it to verify that everything's working correctly.
@Joaquin Thanks for the extra info, it helped. I have been able to properly build and generate the IPA for the HelloWorld project but I still can't build my solution.
The problem seems to be due to class library dependencies. I have been able to reproduce the issue by simply adding a new iOS class library project in the HelloWorld solution.
As soon as you did this, both project are uploaded to the remote server, but the iOS app is no longer compiled in that case. The resulting build status is FAILED.
I am going to attach my sample project used to reproduce the issue.
The command line I used for the build was C:\Path\To\My\Solution\TestRemoteBuild>msbuild TestRemoteBuild.sln /p:Configuration=Release;Platform=iPhone;ServerAddress=INF-MMAC-003.local;ServerUser=ggirard
An other point: I saw you are now storing the server address/user in C:\Users\ggirard\AppData\Local\Xamarin\MonoTouch\id_rsa.pub with info detailed as "email@example.com". Do you have any single parameter available for the command line to pass info with this format in the command line? (my aim is to make something generic for our build server which retrieves this data from your file at build time to avoid define it in every build definition).
Created attachment 13378 [details]
Build failed with iOS class library dependency
That le is public key and fairly standard. Having that file lets us not need to store your password, which was a security goal in our design.
As per the user/server, I don't think we have anything that will guess it for you. We do store it, though, in the registry (which is undocumented and may change, but still available).
My advice would be to have a .csproj.user file for your iOS projects with ServerAddress and ServerUser. That will let you change it per user/project, and you won't need to pass that to the command line.
I'll take a look at your project.
(That file... keyboard issues :S)
@guillaume, try this:
/p:Configuration=Release /p:Platform=iPhone /p:ServerAddress=INF-MMAC-003.local /p:ServerUser=ggirard
I just tried that on my box with your solution and it worked beautifully.
@Joaquin your command looks like the same as mine. But I tried it anyway and still:
- Build status mark as FAILED.
- No .ipa generated on the build server, neither .app.
I made a gist of the build log available here https://gist.github.com/ggirard-distech/9f636a7c172e6a83a12d
Did you clean your remote mtbs build cache prior to run it?
You are maybe looking at file resulting from a previous build not issued from the command line...
On my OSX box ~/Library/Caches/Xamarin/mtbs/build/TestRemoteBuild/GUID/ does not contain any "bin" folder resulting from an effective build. I only have Entitlement.plist and Info.plist files with obj and Resources folder.
Sorry but with time I got no longer trust in running the Clean target on Xamarin project... we configured our build script to delete the ~/Library/Caches/Xamarin/mtbs/build folder.
There is a related issue https://bugzilla.xamarin.com/show_bug.cgi?id=34970
@Enzo sorry but your link point to a private bug...
Yep, my bad. There is an activation issue when running from command line. I have asked Enzo to create a new bug for that, and we'll investigate there. I'm hoping to have someone fix it before the next refresh.
Sorry, now it's public.
Thanks, I will wait for next public alpha and keep you posted if I notice something. Thanks for your help.
@Guillaume: As @Enzo mentioned, you might be getting an activation conflict error.
Couple of comments:
1. Do you have XS open on the Mac? That might cause some activation conflicts, as the Xamarin account from VS needs to be pushed to the Mac.
2. For CI environments, you might want to use /ServerPassword=yourMacSSHPassword as an additional parameter if you don't want to have the environment pre-paired.
Hope that helps.
@Jose here my answers
1. No XS, Only XCode in order to use the devices and organizer panes.
2. I'm ok with the pre-paired solution.
Regarding the activation issue, I don't think it is related to my setup as @Enzo is able to reproduce it in 34970.
Thanks @joaquin, I have checked this issue with the help of https://bugzilla.xamarin.com/show_bug.cgi?id=34902#c9
and I am still observing the issue.
Command I am running
C:\Users\Arpit\Documents\Visual Studio 2013\Projects\App11>C:\Windows\Microsoft.
NET\Framework\v4.0.30319\MSBuild.exe /t:Build /p:Configuration=Release /p:Platform=iPhone /p:ServerAddress=mac360-xamarins-Mac-mini.local /p:ServerUser=mac360xamarin App11.sln
Full output: https://gist.github.com/Arpit360/1f036e3f28c7718a70cb
Also I deleted the caches from ~/Library/Caches/Xamarin/mtbs/build but getting same behaviour.
VS 2013 update 5
OS X : 10.10.5
For Now I am changing the status to REOPEN As I have followed the steps mentioned in comment https://bugzilla.xamarin.com/show_bug.cgi?id=34902#c9
Please let me know I am missing anything
@Adrian Thanks for the workaround. I have been able to properly build my application in Release and AppStore versions and in both case to properly generate an IPA file.
I found some other issues I am going to report in separate bugs:
- I got some errors like 'Could not strip assembly `/Users/MyUser/Library/Caches/Xamarin/mtbs/builds/MyProject/3d36846ab4eb62d2eae36bab1d80ebb9/obj/iPhone/Release/mtouch-cache/32/Build/Mono.CSharp.dll`' on switching between configurations.
Subsequent builds, even without cleaning my setup (delete local bin/obj and mtbs folder on mac), do not failed with those errors and properly succeed.
- I also have another issue with assemblies copied to my home directory on the mac.
Thanks again for the quick fix!
I have checked this issue with master builds and I am successfully able to build iOS application remotely the msbuild command.
I have followed below steps:
1. Create a unified iPhone Single View Application
2. In project options:
3. Enable IPA generation for configs Realease/iPhone & AppStore/iPhone
4. Assign a proper application identifier in order to allow build
5. Close Visual Studio and open a Visual Studio Developer Command Prompt
6. Run msbuild command to build the application
I am successfully able to build application without any error/warning.
Hence closing this issue.
I have checked this issue with latest C6 builds and observing this is working fine. I am successfully able to build iOS application remotely the msbuild command without any error/warning.
I have used steps mentioned in Comment 22 and run below commands:
C:\Program Files (x86)\Microsoft Visual Studio 14.0>msbuild "C:\Users\akhileshk\
Documents\Visual Studio 2015\Projects\TestRelease\TestRelease\TestRelease.csproj
" /p:Configuration=Release /p:ServerAddress=192.168.3.26 /p:ServerUser=Apple /p:
C:\Program Files (x86)\Microsoft Visual Studio 14.0>msbuild "C:\Users\akhileshk\
Documents\Visual Studio 2015\Projects\TestAppStore\TestAppStore\TestAppStore.csp
roj" /p:Configuration=AppStore /p:ServerAddress=192.168.3.26 /p:ServerUser=Apple
Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Xamarin 22.214.171.1243 (068946a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android 126.96.36.199 (cc43529)
Visual Studio plugin to enable development for Xamarin.Android.
Xamarin.iOS 188.8.131.52 (4cebfec)
Visual Studio extension to enable development for Xamarin.iOS.
Version: 184.108.40.206 (Business Edition)
Build date: 2015-10-26 23:57:04-0400
Apple Developer Tools
Xcode 7.0 (8227)
Mono 4.2.1 (explicit/b50293b)
GTK+ 2.24.23 (Raleigh theme)
Package version: 402010075
Fixed in version 220.127.116.11 (cycle6)
Author: Adrian Alonso
Commit: cc11aaa5abb689daac7c6c2b5ab2fe63f5e338f7 (xamarin/XamarinVS)