Bug 36059 - [XVS 4.0] "The application UnifiedSingleViewIphone1 needs to be rebuilt due to an inconsistency between the connected Mac and the local app. Please rebuild the application and try again." when attempting to deploy to device or simulator
Summary: [XVS 4.0] "The application UnifiedSingleViewIphone1 needs to be rebuilt due t...
Status: VERIFIED DUPLICATE of bug 37600
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: 4.0.2 (C6SR2)
Assignee: Bugzilla
URL:
: 35956 ()
Depends on: 37937 40959
Blocks:
  Show dependency tree
 
Reported: 2015-11-19 13:40 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-06-22 15:04 UTC (History)
26 users (show)

Tags: BZSRC6S1
Is this bug a regression?: ---
Last known good build:


Attachments
new log files (22.84 KB, application/zip)
2015-12-17 19:13 UTC, Rafael Cardenas
Details
Logs for ALPHA build as of today - still can't build (1.06 KB, application/x-zip-compressed)
2015-12-17 19:52 UTC, Ian
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
VERIFIED DUPLICATE of bug 37600

Description Brendan Zagaeski (Xamarin Team, assistant) 2015-11-19 13:40:55 UTC
This is a public bug report to track the status of reports of the following problem that has been reported to occur for some users [1] on XamarinVS 4.




## Example error message

> The application UnifiedSingleViewIphone1 needs to be rebuilt due to an
> inconsistency between the connected Mac and the local app. Please rebuild the
> application and try




## Meaning of the error message

Using for example the "Debug|iPhoneSimulator" configuration, this error means precisely that the contents of the following two files (which are intended to be updated on both computer with a new GUID after each new build) are being assessed to be non-matching:

On the Windows PC:
> `obj\iPhoneSimulator\Debug\build-signature\signature` 

On the Mac build host:
> "$HOME/Library/Caches/Xamarin/mtbs/builds/UnifiedSingleViewIphone1/9c59b12813521598f8c3d0554dc0f47d/obj/iPhoneSimulator/Debug/build-signature/signature"




## Steps that would in theory be expected to stop the problem

(Note that the "Reports" mentioned below suggest that at least in some cases these steps are not sufficient to stop the problem.)

1. Clean the project while connected to the build host.

2. Manually delete the `bin\` and `obj\` folders on Windows and the `$HOME/Library/Caches/Xamarin/mtbs` folder on Mac.

3. Manually remove any previously installed versions of the app from the device (or use the "Simulator -> Reset Content and Settings" menu item if running on a simulator).




## Possible alternate workarounds


A. One user reported that explicitly disconnecting and reconnecting the Mac build host helped (See "Reports" no. 2)


B. Another user reported a possible (though inconvenient) workaround (See "Reports" no. 1)

1. Create a new project, and then re-import all of the existing resources and files from the old project.
2. Build the project on the command line using MSBuild.
3. Debug the app from Visual Studio (without rebuilding).




## [1] Reports

1. A report from a customer on the forum:
http://forums.xamarin.com/discussion/56054/the-application-xxx-needs-to-be-rebuilt-due-to-an-inconsistency

2. A customer who replied on that thread, for whom disconnecting and
reconnecting the build host helped with the problem:
http://forums.xamarin.com/discussion/comment/165853/#Comment_165853

Two more customers from the Cycle 6 Release Announcement:
3. http://forums.xamarin.com/discussion/comment/165683/#Comment_165683
4. http://forums.xamarin.com/discussion/comment/165849/#Comment_165849




## Regression status

Based on the customer reports, this Appears to be a regression introduced in XamarinVS 4.0 ("Cycle 6").
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2015-11-19 13:42:25 UTC
For the Xamarin Team: see Non-public Bug 35956 for one set of example IDE log files and Diagnostic MSBuild Output from a customer.
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2015-11-19 13:49:42 UTC
*** Bug 35956 has been marked as a duplicate of this bug. ***
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2015-11-19 19:18:52 UTC
## Small update

The reporter of Bug 35956 confirmed that indeed the 2 "signature" files as described in Comment 0 under "Meaning of the error message" contained different content, so it seems the problem is that for some reason one or both of these files is not being updated correctly by XamarinVS during the build process.
Comment 5 Evgeniy Zverev 2015-11-30 12:09:31 UTC
I have the same behavior.

For me the problem was in the dynamic IP address of the Xamarin Mac Agent. I have a windows development station that never reboots and a Mac that was first connected to with IP (for instance 192.168.2.127).

Then the Mac was shut down overnight and restarted in the morning. Via DHCP it obtained a new IP (for instance 192.168.2.111).

After that I used the Visual Studio menu item "Tools->iOS->Xamarin Mac Agent" to open the pairing dialogue and pressed the "connect" button and it showed that VS is now connected. Near the Xamarin Mac Agent host name it showed the wrong, old IP and I did not notice it at first.

After such faulty connection, and attempt to build a project ends up with the following output in the VS Build output windows:

Connecting to Mac server 192.168.2.127... (old IP)
xamarin warning : Connection failed to establish within 10000 milliseconds.

and the build process was made local on VS side.

An attempt to start debugging after such a build ends up with the behavior described in this BUG.

In this particular case there is a workaround:
1. In the "Tools->iOS->Xamarin Mac Agent" dialogue press the right mouse button over the "connected" Xamarin Mac Agent and in context menu (one could not hide it better) press "disconnect". Then reconnect in the usual way. The VS should obtain the new IP address and building and debugging seems to go smoothly.
Comment 7 Miha Markic 2015-12-04 14:13:57 UTC
Same here. Connection is fine, a blank app (or any other I tried) won't start due to mentioned error. I'm on beta channel.
Comment 11 Sebastian Fialka 2015-12-10 14:05:05 UTC
Same problem here!
Comment 12 Sebastian Fialka 2015-12-10 14:05:38 UTC
Btw. a complete reinstallation of Xamarin on my Mac did not change it...
Comment 13 TR 2015-12-10 21:42:10 UTC
Do you have spaces in the username you use on the Mac? When I switched to a user with no spaces in the username, I can deploy to the simulator!
Comment 14 Daniel Cazzulino 2015-12-16 15:29:40 UTC
Hi there, 

The current Alpha channel bits contain an improved way to determine the "out of date-ness" by properly hashing the contents on the mac, so it's more than just a "signature" (it was just a GUID previously), and far more precise.

If the signature check fails again, please let us know. We've also improved the logging for that scenario, so it would also help us better diagnose this issue if it happens.

Thanks!
Comment 15 Rafael Cardenas 2015-12-16 22:45:22 UTC
Now I get the error "Could not authenticate the user using the existing ssh keys"
Comment 16 Brendan Zagaeski (Xamarin Team, assistant) 2015-12-17 00:27:08 UTC
@Rafael, I suspect that new error is not related to the exact changes that were made to address this specific problem, but they might be caused by some other change in the latest Alpha. If you haven't already, I'd recommend creating a support email thread [1] about that new problem to see if the Support Team can help get you past that initial connection error. Thanks in advance!

[1] See "Business & Enterprise Support" on https://xamarin.com/support
Comment 17 Ian 2015-12-17 03:53:02 UTC
It's happening again with 4.0.17, the newest build of everything
Comment 18 Brendan Zagaeski (Xamarin Team, assistant) 2015-12-17 03:57:19 UTC
@Ian, if you get chance, free to attach your new log files (optionally as a private attachment so they are only visible to the Xamarin team). As mentioned briefly in Comment 14, the updated logging in the Alpha builds might reveal some new clues to help the XamarinVS team diagnose the remaining causes of this issue.


Side note for bookkeeping: I believe "4.0.17" in Comment 17 is a small typo for "4.0.1.37"
Comment 19 Rafael Cardenas 2015-12-17 19:13:46 UTC
Created attachment 14343 [details]
new log files

new log files with latest Alpha Cycle 6 Service Release 1
Comment 20 Brendan Zagaeski (Xamarin Team, assistant) 2015-12-17 19:21:51 UTC
@Rafael, thanks for the IDE logs. If you get a chance, please do also attach your new diagnostic MSBuild output log for the build that fails.
Comment 21 Ian 2015-12-17 19:52:34 UTC
Created attachment 14344 [details]
Logs for ALPHA build as of today - still can't build

Microsoft Visual Studio Enterprise 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Enterprise

Architecture and Modeling Tools   00322-90000-48301-AA618
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-90000-48301-AA618
Microsoft Visual Basic 2015

Visual C# 2015   00322-90000-48301-AA618
Microsoft Visual C# 2015

Visual C++ 2015   00322-90000-48301-AA618
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015 (RC1 Update 1)   14.1.11120.0
ASP.NET and Web Tools 2015 (RC1 Update 1)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.7.1   14.0.11112.0
Azure App Service Tools v2.7.1

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JetBrains ReSharper Ultimate 10.0.1   Build 104.0.20151114.160203
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

LLBLGen Pro Designer   4.0
The LLBLGen Pro designer integrated inside Visual Studio.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50616.0
Microsoft SQL Server Data Tools

Telerik ASP.NET MVC VSExtensions   2015.5.1030.0
Telerik UI for ASP.NET MVC VSExtensions

TypeScript   1.7.4.0
TypeScript for Microsoft Visual Studio

Xamarin   4.0.1.37 (019d80f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.41 (3192c79)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.4.1.0 (dab1554)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 22 Brendan Zagaeski (Xamarin Team, assistant) 2015-12-17 20:25:29 UTC
@Ian, as with Comment 20:

Thanks for the IDE logs. If you get a chance, please do also attach your new diagnostic MSBuild output log for the build that fails. The attached IDE logs do not mention the word "inconsistency". Thanks in advance.
Comment 23 Ian 2015-12-17 20:36:11 UTC
Sure, how do I get a "diagnotic MSBuild" log?
Comment 24 Brendan Zagaeski (Xamarin Team, assistant) 2015-12-17 20:42:12 UTC
"Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity"

Diagnostic MSBuild output will now be visible within the Output panel after a build.

You can then save the output to a file via "File -> Save Output As...".

(https://msdn.microsoft.com/en-us/library/jj651643.aspx)
Comment 25 Ian 2015-12-17 20:50:52 UTC
It was Resharper! Resharper 10 Ultimate now can "MSbuild" your system for you, does a great job on ASP.NET, Xamarin Android etc. Really fast.

It works fine for Xamarin Android, but fails for Xamarin iOS

Once I disabled Resharper Build helper (Resharper Options) it works now.

Yeh ha!!!
Comment 26 Rafael Cardenas 2015-12-19 19:39:41 UTC
Well, tired of waiting for a solution of this, I did a complete factory reset of may MAC, wipe all data and did a complete fresh installation without restoring older backups. 

I installed Xcode again and Xamarin, and also I installed again my Windows machine on parallels.

Now everything is working, I think there was a problem with previous beta or alpha versions settings that caused the error.
Comment 27 C# Derp 2016-01-05 17:43:33 UTC
I will add that when I receive this error, I also receive two warnings:

"Could not authenticate the user using the existing ssh keys"

and

"The project My Project 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."

even when I am using the correct authentication and Visual Studio is connected to the Mac build agent (the symbol is lit green).
Comment 28 Brendan Zagaeski (Xamarin Team, assistant) 2016-01-08 08:09:05 UTC
Thanks C# Derp for that extra detail. It looks like that is in fact the underlying problem for this bug for all the remaining users who are seeing the problem. I have re-reviewed a few of the older unresolved reports of this problem that included the list of build warnings, and in all of those cases the root cause of the "inconsistency" was in fact that the remote build process was not happening _at all_ because of this failure to authenticate with the existing SSH keys.

To put it another way, the "signature" file was "inconsistent" because it _did not exist_ on the Mac at all (or it was a left-over from a previous successful remote build that did not hit the "could not authenticate" warning).

(I think XamarinVS should ideally also output a different error message when the deployment fails because the remote build cache does not exist _at all_, so I will file another bug to request that change.)




## Note to the Xamarin team

The remaining issue to investigate for this bug is why some users get the "Could not authenticate the user using the existing ssh keys" warning when building from Visual Studio, even though the connection status is "fully connected" and command line builds using MSBuild do _not_ hit that problem. (For example, for the user on https://kb.xamarin.com/agent/case/237519, building on the command line completed the remote build phase correctly, but building in VS always hit the "could not authenticate" problem.)




## Side note about the problem with "ReSharper Build"

As Ian mentioned in Comment 25, the "ReShaper Build" [1] engine is currently incompatible with the Xamarin.iOS build process because ReSharper Build is unable to establish the connection to the Mac build host. The build process therefore does not perform any remote build on the Mac at all, leading to the same "inconsistency" error as the SSH authentication problem.

[1] https://blog.jetbrains.com/dotnet/2015/10/15/introducing-resharper-build/
Comment 31 Joe Sauve 2016-01-11 06:22:19 UTC
I too ran into this issue this evening. I usually use Xamarin Studio (mainly because it's been my go-to for Xamarin development since 2011). But I tried VS 2015 Enterprise tonight. I updated the Xamarin VS extension to most recent Stable. I had some issues with building right off the bat: "could not copy exceeded retry count of 10." for my core app DLL. So, I wiped out all my obj and bin folders manually. Then when I went to build, I received the "The application [application name] needs to be rebuilt due to an inconsistency between the connected Mac and the local app. Please rebuild the application and try again." That app is https://github.com/xamarin/app-crm

I fired up another solution in order to narrow things down. The other solution builds and deploys to the iOS simulator just fine. That app is: https://github.com/jsauvexamarin/app-customers/tree/enhancements

Just providing my experience for context.
Comment 32 Joe Sauve 2016-01-11 06:25:22 UTC
...I should also mention that I DID have ReSharper enabled at first, but then I disabled it. But that didn't help. I just keep getting: "The application [application name] needs to be rebuilt due to an inconsistency between the connected Mac and the local app. Please rebuild the application and try again."
Comment 34 Joe Sauve 2016-01-12 03:27:39 UTC
This seems to be resolved for me, albeit still a pain to manually remedy.

Steps taken:
1. Manually remove all bin and obj folders from each project in the solution via OS X Finder.
2. In VS 2105 on Windows guest, disconnect from / re-connect to Mac build agent.
3. Build

My environment:
OS X El Capitan
VMWare Fusion 8
Windows 8.1 Enterprise
Xamarin 4.0.0.1717 (1390b70)
Xamarin.iOS   9.3.99.33 (ea30b32)
Xamarin.Android 6.0.0.35 (d300845)

Another peculiar thing that seems to be happening is that if I try to build the iOS project after this clean/disconnect/re-connect, VS doesn't automatically build my core Forms project as I would expect it to; the iOS build complains about not being able to find the DLL for the core project. If I manually build the core project first, and then build iOS, it all work fine. I can build, launch, and the debugger attaches.
Comment 35 Kent 2016-01-12 03:34:14 UTC
To add to what others have said, this is the annoying little dance I do every time this happens:

1. exit VS
2. copy my solution's packages directory somewhere safe
3. `git status` and make sure there are no untracked files that I care about (if so, add them)
4. `git clean -xdf` (this blows away everything that isn't staged)
5. copy my packages directory back
6. start VS up again and build

Of course, it could be another 5 minutes or 5 hours before the same problem occurs again. It's gotten so frustrating that I've *almost* written a script to automate recovery from the problem.
Comment 36 Brendan Zagaeski (Xamarin Team, assistant) 2016-01-12 04:45:12 UTC
@Joe,

> This seems to be resolved for me

## Note to other users CC'd on this bug

To be clear, the issue Joe was seeing in Comment 31, Comment 32, and Comment 34 appears to have been different from the "ssh keys" problem discussed in Comment 27 and Comment 28.

The XamarinVS team is still actively investigating the "Could not authenticate the user using the existing ssh keys" issue from Comment 27.

To help focus the discussion moving forward, I have filed a new Bug 37600 for that specific problem, and I will mark this bug as a duplicate.




## Feel free to continue discussion on this bug for the _expected_ causes of the error

Keep in mind that the "inconsistency" message is _correct_ if either (a) you have old files on the Mac build host that were created before the update to Xamarin 4 or (b) you have new build files on the Windows PC that were built while _explicitly disconnected_ from the Mac build host. In either of those cases, the steps under "expected to stop the problem" from Comment 0 should successfully stop the problem.)

Feel free to add additional hints and tips to address that _expected_ behavior on this bug.




## File new bugs for other _unexpected_ causes of the error

For similar issues where this "inconsistency" error is _not expected_ (as described above), and where "Could not authenticate the user using the existing ssh keys" does _not_ appear as a build warning, please file a new separate bug report [1]. Thanks!

[1] https://bugzilla.xamarin.com/newbug?release=C6.




* * *

> VS doesn't automatically build my core Forms project as I would expect
> it to

@Joe, FYI this can easily happen if the core Forms project is not currently set to "Build" for the iOS platform configurations in the "Build -> Configuration Manager".

If you are seeing a discrepancy in that behavior that is not caused by the Configuration Manager settings, please file a separate bug for that problem. Thanks!



Best,
Brendan
Xamarin Customer Support

*** This bug has been marked as a duplicate of bug 37600 ***
Comment 37 Rohit 2016-01-20 19:23:19 UTC
Deleting obj folder helped me
Comment 38 web 2016-02-24 20:19:51 UTC
I get the error because I used a space in the "Solution Configuration" name. I used "Debug iPhone". When doing this, I get the above error. I deleted all the files on Mac and Windows, but the error comes again. After changed to a "Solution Configuration" without a space, the project deploys perfect :)

It seems, that the space in the folder name is the cause of the problem.
Comment 39 Brendan Zagaeski (Xamarin Team, assistant) 2016-02-24 21:33:14 UTC
In reply to Comment 38, thanks for the report! I believe that issue will be resolved by the fix for Bug 37937. (I have now updated the summary of that bug report slightly to reflect that the problem affects _any_ configuration name that contains a space.)
Comment 40 talebia 2016-03-27 06:00:12 UTC
This is really annoying. I keep getting the error message and even a disconnect/re-connect from Mac (and the rest of the above mentioned remedies) does not help so I have to restart my machine to get it fixed. and that only works not for so long until another reboot...
Comment 41 kontakt 2016-04-10 09:33:11 UTC
I have this problem too, but I've figured out a workaround. When I get this message, I untick Build in Build/Configuration Manager for iOS project and I start debugging again. Just keep trying, evantually it will start debugging, although sometimes it can take about 5 attempts.
Comment 42 Kent 2016-04-10 09:36:55 UTC
Yes, definitely aware it _eventually_ works. See my tweet here: https://twitter.com/kent_boogaart/status/700547105903874048
Comment 43 Jay Pedro 2016-06-11 01:47:59 UTC
After fighting with this for 6hrs today I found out the problem was from Resharper. Our company instituted the Resharper Build over VS Build. Once I shut off the Resharper build everything worked perfectly. To turn of Resharper build go to Resharper>Options>Tools>Build and select Visual Studio instead of Resharper build.
Comment 44 Steven 2016-06-22 02:50:24 UTC
I just started having this after todays Stable update. IT worked fine for the first 30 minutes or so then I started getting the problem. Closing VS and reloading the project fixed it the first few times but not anymore. So it seems to get worse with time for me.

I have cleaned obj and bin files, restarted both machines, rebuilds, etc. I haven't been able to run the project in the last hour at all.

Figures of course, production is broken due to another Xamarin bug and now I can't even test the fix. Frustrated, can you tell?!

Here is some log info.

Xamarin Information: 0 : [2016-06-22 11:48:15.1661] Xamarin - 4.1.1.3-c7sr0+34a92cd
Xamarin.VisualStudio.Activation.AccountManager Information: 0 : [2016-06-22 11:48:15.3088] VS2013 Professional
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-22 11:48:15.3817] No license found for iOS
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-22 11:48:15.3857] Running license sync for iOS
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-22 11:48:15.3877] Not logged in, using iOS VSProfessional
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-22 11:48:15.3906] No license found for Android
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-22 11:48:15.3936] Running license sync for Android
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-22 11:48:15.3966] Not logged in, using Android VSProfessional
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-06-22 11:48:24.4473] Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-06-22 11:48:24.4823] Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage Warning: 0 : [2016-06-22 11:48:24.4872] Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-06-22 11:48:25.8498] Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-06-22 11:48:25.8653] Initialization finished
Xamarin.VisualStudio.IOS.XamarinIOSPackage Warning: 0 : [2016-06-22 11:48:25.8653] Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2016-06-22 11:48:25.8653] MDAddinsHash: 33f406fa2dcf214012c78cb846585f062b2e1d24

Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver Error: 0 : [2016-06-22 11:48:26.9553] System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
   at Microsoft.VisualStudio.Design.VSDynamicTypeService.CheckCache()
   at Microsoft.VisualStudio.Design.VSDynamicTypeService.GetCachedTypeResolutionService(String hierRef)
   at Microsoft.VisualStudio.Design.VSDynamicTypeService.GetTypeResolutionService(IVsHierarchy hier, UInt32 itemid)
   at Microsoft.VisualStudio.Design.VSDynamicTypeService.GetTypeDiscoveryService(IVsHierarchy hier, UInt32 itemid)
   at Microsoft.VisualStudio.Shell.Design.DynamicTypeService.GetTypeDiscoveryService(IVsHierarchy hierarchy)
   at Clide.Solution.IProjectNodeExtensions.GetReferencedAssemblies(IProjectNode project)
   at Xamarin.VisualStudio.Forms.Intellisense.ProjectTypeResolver.<SearchTypesAsync>b__19_0() in C:\Users\builder\data\lanes\3420\34a92cd0\source\xamarinvs\src\Features\VisualStudio.Forms.Intellisense\ProjectTypeResolver.cs:line 135
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 11:48:40.5804] MacServer State transition from DisconnectedState to SshConnectingState on Stevens-iMac.local (192.168.16.74)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 11:48:43.6947] Starting Broker 4.1.1.3 in port 50957...
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 11:48:50.7019] MacServer State transition from SshConnectingState to SshConnectedState on Stevens-iMac.local (192.168.16.74)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 11:48:50.7330] SSH Connection established with the Mac Stevens-iMac.local:50957
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 11:48:50.7953] MacServer State transition from SshConnectedState to AgentsStartingState on Stevens-iMac.local (192.168.16.74)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 11:48:50.8109] Starting agents on Mac Stevens-iMac.local (192.168.16.74)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 11:48:51.5116] Starting Agent IDB 4.1.1.3...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 11:48:54.8439] Agent IDB 4.1.1.3 is running
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 11:49:03.7041] Starting Agent Build 4.1.1.3...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 11:49:05.5571] Agent Build 4.1.1.3 is running
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 11:49:16.4883] Starting Agent Designer 4.1.1.3...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 11:49:20.6277] Agent Designer 4.1.1.3 is running
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 11:49:20.6900] MacServer State transition from AgentsStartingState to ConnectedState on Stevens-iMac.local (192.168.16.74)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 11:49:20.6900] Connected to the Mac Stevens-iMac.local (192.168.16.74) with Full support.
Xamarin.Messaging.Client.Ssh.MessagingAuthenticationMethod Warning: 0 : [2016-06-22 11:51:24.3619] Unable to authenticate using the private key authentication method
Renci.SshNet.Common.SshException: Message type 80 is not valid.
   at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout)
   at Renci.SshNet.PrivateKeyAuthenticationMethod.Authenticate(Session session)
   at Xamarin.Messaging.Client.Ssh.MessagingAuthenticationMethod.Authenticate(Session session)
Xamarin.VisualStudio.IOS.MonoTouchProjectProperties Error: 0 : [2016-06-22 11:51:24.4241] There was an error checking the consistency between the local build and the remote build state on the Mac:
	Local signature path:  'C:\Programming\Source\Mobile_VehicleLogBook\Mobile_VehicleLogBook\Mobile_VehicleLogBook.iOS\obj\iPhoneSimulator\Debug\build-signature\signature'
	Remote signature path: 'C:\Programming\Source\Mobile_VehicleLogBook\Mobile_VehicleLogBook\Mobile_VehicleLogBook.iOS\obj\iPhoneSimulator\Debug\build-signature\signature-remote'
	Mac Server connected: True
	Build agent status: 'Running'
	AppName: 'Mobile_VehicleLogBookiOS'
	SessionId: '5505183f467bb004f2ab437db111a092'
	Server Signature Path: 'obj\iPhoneSimulator\Debug\build-signature\signature'
System.AggregateException: One or more errors occurred. ---> Renci.SshNet.Common.SshAuthenticationException: Permission denied (publickey).
   at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
   at Renci.SshNet.ConnectionInfo.Authenticate(ISession session)
   at Renci.SshNet.Session.Connect()
   at Renci.SshNet.BaseClient.Connect()
   at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__82.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__84.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Xamarin.VisualStudio.IOS.MonoTouchProjectProperties.MatchesBuildSignature() in C:\Users\builder\data\lanes\3420\34a92cd0\source\xamarinvs\src\Core\VisualStudio.IOS\PropertyProviders\MonoTouchProjectProperties.cs:line 91
---> (Inner Exception #0) Renci.SshNet.Common.SshAuthenticationException: Permission denied (publickey).
   at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
   at Renci.SshNet.ConnectionInfo.Authenticate(ISession session)
   at Renci.SshNet.Session.Connect()
   at Renci.SshNet.BaseClient.Connect()
   at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__82.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__84.MoveNext()<---

Xamarin.Messaging.Client.MessagingClient Error: 0 : [2016-06-22 12:02:44.9669] An error occured on client vs6592steve while executing a post for topic xma/ping/Broker4113
System.TimeoutException: The operation has timed out.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__23`2.MoveNext()
System.Net.Mqtt.TcpChannel Warning: 0 : [2016-06-22 12:02:44.9825] The TCP Network Stream has completed sending bytes. The observable sequence will be completed and the channel will be disposed
Xamarin.Messaging.VisualStudio.MessagingService Error: 0 : [2016-06-22 12:02:44.9825] Keep Alive mechanism failed. No ack received from the Broker. The connection will be disconnected...
Xamarin.Messaging.Exceptions.MessagingException: An error occured on client vs6592steve while executing a post for topic xma/ping/Broker4113 ---> System.TimeoutException: The operation has timed out.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__23`2.MoveNext()
   --- End of inner exception stack trace ---
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__23`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__22`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__26`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__32`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.Messaging.VisualStudio.MessagingService.<<MonitorConnectivity>b__114_0>d.MoveNext()
System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-06-22 12:02:44.9981] Client vs6592steve - Packet Channel observable sequence has been completed
System.Net.Mqtt.Client.Client Warning: 0 : [2016-06-22 12:02:44.9981] Client - Packet observable sequence has been completed, hence closing the channel
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 12:02:45.0761] MacServer State transition from ConnectedState to DisconnectedState on Stevens-iMac.local (192.168.16.74)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 12:02:45.0761] The underlying client has been closed
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 12:02:45.0917] Disconnected from Mac Stevens-iMac.local (192.168.16.74)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:02:45.1073] The underlying client has been closed
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 12:07:50.7958] MacServer State transition from DisconnectedState to SshConnectingState on Stevens-iMac.local (192.168.16.74)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:07:52.0787] Starting Broker 4.1.1.3 in port 58794...
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 12:07:58.5191] MacServer State transition from SshConnectingState to SshConnectedState on Stevens-iMac.local (192.168.16.74)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:07:58.5351] SSH Connection established with the Mac Stevens-iMac.local:58794
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 12:07:58.5601] MacServer State transition from SshConnectedState to AgentsStartingState on Stevens-iMac.local (192.168.16.74)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 12:07:58.5641] Starting agents on Mac Stevens-iMac.local (192.168.16.74)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:07:59.0780] Starting Agent IDB 4.1.1.3...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:08:02.0927] Agent IDB 4.1.1.3 is running
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:08:10.8648] Starting Agent Build 4.1.1.3...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:08:12.5297] Agent Build 4.1.1.3 is running
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:08:23.2676] Starting Agent Designer 4.1.1.3...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:08:27.1182] Agent Designer 4.1.1.3 is running
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:08:27.1252] MacServer State transition from AgentsStartingState to ConnectedState on Stevens-iMac.local (192.168.16.74)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-22 12:08:27.1272] Connected to the Mac Stevens-iMac.local (192.168.16.74) with Full support.
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-06-22 12:08:29.3490] SSH Connection established with the Mac Stevens-iMac.local:58794
Xamarin.Messaging.Client.Ssh.MessagingAuthenticationMethod Warning: 0 : [2016-06-22 12:08:40.7598] Unable to authenticate using the private key authentication method
Renci.SshNet.Common.SshException: Message type 80 is not valid.
   at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout)
   at Renci.SshNet.PrivateKeyAuthenticationMethod.Authenticate(Session session)
   at Xamarin.Messaging.Client.Ssh.MessagingAuthenticationMethod.Authenticate(Session session)
Xamarin.VisualStudio.IOS.MonoTouchProjectProperties Error: 0 : [2016-06-22 12:08:41.1488] There was an error checking the consistency between the local build and the remote build state on the Mac:
	Local signature path:  'C:\Programming\Source\Mobile_VehicleLogBook\Mobile_VehicleLogBook\Mobile_VehicleLogBook.iOS\obj\iPhoneSimulator\Debug\build-signature\signature'
	Remote signature path: 'C:\Programming\Source\Mobile_VehicleLogBook\Mobile_VehicleLogBook\Mobile_VehicleLogBook.iOS\obj\iPhoneSimulator\Debug\build-signature\signature-remote'
	Mac Server connected: True
	Build agent status: 'Running'
	AppName: 'Mobile_VehicleLogBookiOS'
	SessionId: '5505183f467bb004f2ab437db111a092'
	Server Signature Path: 'obj\iPhoneSimulator\Debug\build-signature\signature'
System.AggregateException: One or more errors occurred. ---> Renci.SshNet.Common.SshAuthenticationException: Permission denied (publickey).
   at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
   at Renci.SshNet.ConnectionInfo.Authenticate(ISession session)
   at Renci.SshNet.Session.Connect()
   at Renci.SshNet.BaseClient.Connect()
   at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__82.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__84.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Xamarin.VisualStudio.IOS.MonoTouchProjectProperties.MatchesBuildSignature() in C:\Users\builder\data\lanes\3420\34a92cd0\source\xamarinvs\src\Core\VisualStudio.IOS\PropertyProviders\MonoTouchProjectProperties.cs:line 91
---> (Inner Exception #0) Renci.SshNet.Common.SshAuthenticationException: Permission denied (publickey).
   at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
   at Renci.SshNet.ConnectionInfo.Authenticate(ISession session)
   at Renci.SshNet.Session.Connect()
   at Renci.SshNet.BaseClient.Connect()
   at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__82.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Xamarin.Messaging.VisualStudio.MessagingService.<DownloadFileAsync>d__84.MoveNext()<---

System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-06-22 12:09:59.3720] Client build6592steve - No packet has been sent in 90 seconds. Sending Ping to Server to maintain Keep Alive
Comment 45 Brendan Zagaeski (Xamarin Team, assistant) 2016-06-22 15:04:02 UTC
The key information from Comment 44 is 2 lines from `*Ide.log` file:

> Xamarin.VisualStudio.IOS.MonoTouchProjectProperties Error: 0 : [2016-06-22 12:08:41.1488] There was an error checking the consistency between the local build and the remote build state on the Mac:

and

> System.AggregateException: One or more errors occurred. ---> Renci.SshNet.Common.SshAuthenticationException: Permission denied (publickey).


That issue has its own bug report, listed as one of the "Depends On" bugs on this bug report:
Bug 40959

Further follow-up about that particular cause of the error will be handled on that bug report.


* * *

As a reminder for any other users who might come across this bug in the future due to different causes of the error, as discussed in Comment 36, please:

> File **new bugs** for other _unexpected_ causes of the error

Thanks!