Bug 13187 - [iOS-VS] Error Xamarin.MonoTouch.CSharp.Targets missing from ProgramFiles(x86)\Xamarin\iOS on creating a project using the RC build
Summary: [iOS-VS] Error Xamarin.MonoTouch.CSharp.Targets missing from ProgramFiles(x86...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.3.x
Hardware: PC Mac OS
: High blocker
Target Milestone: 1.3.x
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2013-07-11 15:33 UTC by GouriKumari
Modified: 2013-07-19 05:24 UTC (History)
8 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Comment 1 PJ 2013-07-11 15:40:31 UTC
I can reproduce with 1.3.222: http://screencast.com/t/GARmflN5j1w

Test environment:

Windows 7
iOS for VS 1.3.222
X.A 4.8.0.1
VS2012
Comment 4 Marek Habersack 2013-07-11 19:04:08 UTC
Gouri,

Can you attach the ActivityLog.xml file mentioned in the first screencast in comment 3?
Comment 6 Marek Habersack 2013-07-11 19:47:57 UTC
Gouri,

It appears that the whole installation is broken:

 <errorinfo>Could not load file or assembly 'Mono.VisualStudio.Extension2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=1b9e6d771899610e' or one of its dependencies. The system cannot find the file specified.</errorinfo>

Can you try to repair the package from Control Panel? And if that doesn't help, remove all of the xamarin extensions from the system and reinstall from scratch.
Comment 7 PJ 2013-07-11 20:05:02 UTC
Yeah I mean - when I get this error it's usually fixed by a complete re-install, but we need to figure out the reproduction steps. 

Comment 3, 4, 5, and 6 are about https://bugzilla.xamarin.com/show_bug.cgi?id=7862

The issue of missing targets remains for me - I don't get the (oft  unreproducible) 7862 issue.

http://screencast.com/t/wYFpcM770ifB

Perhaps further discussion on the 7862 issue can resume in a new bug or with bug 7862 REOPENED?
Comment 8 Marek Habersack 2013-07-12 05:35:12 UTC
PJ, I agree we need to get to the bottom of this but I'm worried, it being WIX, it will take us another 3 days just to test a possible solution or 2 (with the builds being slow, with having to wait for both MTVS and MFA to build) and we don't even know the actual repro steps yet.

The screenshots you attached show the problem but they tell me nothing that helps to fix them, alas. If you can repro it consistently, can you answer those questions:

 - Was there any previous version of MTVS installed on the machine and, if yes,
   what version
 - If there was a version, were the Shell assemblies and .targets files present
 - Did Microsoft MSI Fixer detect any problems with both the previous and new
   installation (http://support.microsoft.com/kb/971187)?
 - Is the problem reproducible when upgrading from the latest MTVS release?
 - Install the .msi using msiexec /i path-to.msi /lv path-to.log and attach the 
   log

I'm really worried that we won't have time to fix this before July 22nd... WIX development is inherently slow :(
Comment 9 PJ 2013-07-12 17:19:29 UTC
Hello! I was just able to reproduce and have all sorts of information for you:

I just cleaned all iOS extensions off the machine, and ensured the extension and MSbuild folders were clear of all Xamarin stuff.

I installed iOS for VS 1.1.200 (stable)
I installed X.A 4.6.8 (stable)

Here are the MSBuild contents after the stable installation (note that the Xamarin/iOS folder exists, and has targets files): https://gist.github.com/pjbeaman/28a268e0592e7124f7cc

I installed 1.3.225 (RC). Here is the log (35k lines!): https://gist.github.com/pjbeaman/cb497bfd3b36cad164a6

At this point, I had a completed install, but no MSBuild\iOS folder. Here's the log of the same commands used after 1.1.200: https://gist.github.com/pjbeaman/a7751f5acea2dab1c094

No MSBuild\iOS folder, no targets file. 

The Microsoft MSI Fixer says the symptom that would be alleviated by using the fixer is "Couldn't find local patch" in the log. There is no such line in the 35k line log.

I have saved a snapshot on the VM at the point where all these logs are on the desktop and the issue is reproducible. If further investigation on the machine would be helpful, I can get you access somehow.
Comment 10 Marek Habersack 2013-07-12 21:00:45 UTC
A fix is in the works, but in the meantime I discovered a way to fix the installation. Simply go to Control Panel -> Programs and Features, select Xamarin.iOS and click Repair at the top of the window. That puts all the assemblies back where they should be.
Comment 13 Saurabh 2013-07-19 05:24:20 UTC
Today, we have checked this issue with latest RC builds:

Xamarin.iOS_Setup-1.3.246.0.msi
mono-android-4.8.00011.msi
monotouch-6.4.0.2(Server)
Windows 7 and 8
VS 2010/12

Now, user is able to create iOS application on VS successfully and not getting any error.

Hence, closing this issue and changing its status as Verified.