Bug 55405 - C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1659,3): error : Object reference not set to an instance of an object.
Summary: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamari...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.4.0 (15.1)
Hardware: PC Mac OS
: --- normal
Target Milestone: 15.2
Assignee: Bugzilla
Depends on:
Reported: 2017-04-19 19:45 UTC by smorsi27
Modified: 2017-05-05 23:19 UTC (History)
7 users (show)

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

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:

Description smorsi27 2017-04-19 19:45:46 UTC
I'm currently getting this issue on my machine: 

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1659,3): error : Object reference not set to an instance of an object." when I build my solution. 

My setup: 

Macbook Pro 2016 (OS Sierra 10.12.4) running Parallels with Windows 10 Creator's Update. On Windows 10, I'm using Visual Studio 2017 15.1 to build this solution. I'm getting this error while building on windows. 

I am able to connect to my mac from the macbook pro agent successfully though. So no issues there. 

Solution won't build because of obscure null reference error above.
Comment 1 smorsi27 2017-04-19 19:52:07 UTC
Just a note, the solution runs fine directly on my Macbook Pro using Xamarin Studio but not on my virtual windows machine.
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-20 03:14:23 UTC
Non-engineering team preliminary quick review
(See https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/howto-file-bug/ for general reference.)

## Considers the relevant log files for the part(s) of the process where something goes wrong (IDE editing, MSBuild building, deploying, launching, attaching the debugger, an in-app error, or something else) and has them attached?
(See https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/version-logs/ for general reference.)

Not yet.  @smorsi27, since this error occurs during the build step and involves the Mac remote connection, please collect and attach back both the diagnostic MSBuild output and the IDE log files:

1. Set "Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity" to Diagnostic.

2. Also enable verbose mtouch output by adding -v -v -v -v under "Project Properties > iOS Build > General [tab] > Additional Options > Additional mtouch arguments".

3. The next time you build the project the diagnostic MSBuild output will now be visible in the Output window.

4. Once you hit the error again, you can save the diagnostic MSBuild output to a file via "File > Save Output As..." and zip it up.

5. Please also collect the zip file from "Help > Xamarin > Zip Logs".

6. Attach back the zipped files from steps 4 and 5.

## Specific to one particular project, development computer, or target mobile device?

@smorsi27, does the issue occur in a template project?  If not and you might be able to zip up and attach back a chopped down version of your full project that demonstrated the project, that would be perfect.

## Suspected to be a regression or a problem with a new feature?

Uncertain.  Comment 0 mentions "Windows 10 Creator's Update", but beyond that there aren't yet any hints about whether the environment might have changed and caused a breakage, whether the project might have been altered in some way and caused a breakage, or something else.

## Already took up time for many users?

Unclear at the moment.  Additional details from the log files might help establish a connection to other reports.

## Makes development (a) difficult, impossible, or potentially hazardous, (b) moderately inconvenient, or (c) mildly inconvenient for users?

(a) or (b) As described, this exception is preventing the user from continuing Xamarin.iOS development within Visual Studio in the Windows environment, but they are able to proceed with some development in Xamarin Studio on the Mac.
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-20 03:23:15 UTC
In addition to gathering the information mentioned in Comment 3, please also confirm that the following versions are installed.

### Windows

Does "Help > About Microsoft Visual Studio" show the following?


### Mac

Does "Xamarin Studio > About Xamarin Studio > Show Details" show the following?

Mono 4.8.0 (mono-4.8.0-branch/9d74414) (64-bit)

Comment 5 smorsi27 2017-05-05 21:41:52 UTC
Sorry, can you close this case? I can no longer reproduce this issue! It seems to be fixed?
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2017-05-05 23:19:40 UTC
## Status update

I will mark this bug as resolved per the latest information in Comment 5.  If needed this bug can be reopened by the original reporter if that user gets stuck on the issue again.  In that case, please attach back the additional information from Comment 3 and Comment 4, and then you can change the status of the bug to REOPENED.  Thanks!

(For any other users who might see a similar symptom in the future, please file a new bug report that include as many details as possible, such as the details mentioned in Comment 3 and Comment 4.  Thanks!)