Bug 26854 - Starting a new project targeting Windows Phone 8.1 fails due to missing System.Windows.Interactivity
Summary: Starting a new project targeting Windows Phone 8.1 fails due to missing Syste...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-09 04:19 UTC by joshcomley@googlemail.com
Modified: 2016-12-02 01:47 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 or GitHub 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:
RESOLVED NOT_REPRODUCIBLE

Description joshcomley@googlemail.com 2015-02-09 04:19:10 UTC
Follow these steps:

- Start a new Xamarin.Forms project
- BEFORE first build, retarget the Windows Phone project to 8.1
- Try to run the Windows Phone project

Result:

App crashes out a moment after it tried to launch on the phone.

Alternatively:

- Take any existing Windows Phone 8.1 project
- Delete "Bin" and "obj" directories
- Try to run the Windows Phone project

Result:

Same as above.

Reason:

In Windows Phone 8.1 projects the reference "System.Windows.Interactivity" needs to be added via Visual Studio (under "Assemblies -> Extensions" in the "Add reference" window), but somehow when targeting 8.0 this is automagically added in to the relevant Bin directory at compile time (at least it somehow ends up in the Bin folder).
Comment 1 Udham Singh 2015-02-09 07:46:16 UTC
I have tried to reproduce this issue but not able to reproduce this. To reproduce this issue I have followed the steps mentioned in bug and observed that application is launched successfully. I have checked this issue with Xamarin.Forms.1.3.2.6313-pre3 and Xamarin.Forms.1.3.3.6322-pre3 but not able to reproduce this.

Could you please provide complete environment info, Xamarin.Forms Version, Zip Xamarin Logs and Application Output.

You can get environment info via 'Help > About Microsoft Visual Studio > Copy Info and paste it here' and Zip Xamarin Logs via  'Help > Zip Xamarin Log'.

Environment Info : 

Windows 8.1 pro

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.9.291.0 (9f3e552)
Comment 2 joshcomley@googlemail.com 2015-02-09 07:51:45 UTC
Hi, here is my info.

Do you have a reference to "System.Windows.Interactivity" in your Windows Phone project?

If I debug, the app actually crashes on this line:
            global::Xamarin.Forms.Forms.Init();

And *only* when targeting Windows Phone 8.1 and *only* when the Bin and obj directories have been deleted (which ensures no residual "System.Windows.Interactivity" dlls are left from compiling when 8.0 was targeted)

----------------------------------

Microsoft Visual Studio Ultimate 2015 CTP
Version 14.0.22512.0 DP
Microsoft .NET Framework
Version 4.5.53349

Installed Version: Ultimate

Architecture and Modeling Tools   00269-30000-00001-AA925
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.

LightSwitch for Visual Studio 2015 Preview   00269-30000-00001-AA925
Microsoft LightSwitch for Visual Studio 2015 Preview

Visual Basic 2015 CTP   00269-30000-00001-AA925
Microsoft Visual Basic 2015 CTP

Visual C# 2015 CTP   00269-30000-00001-AA925
Microsoft Visual C# 2015 CTP

Visual C++ 2015 CTP   00269-30000-00001-AA925
Microsoft Visual C++ 2015 CTP

Visual F# 2015 Preview   00269-30000-00001-AA925
Microsoft Visual F# 2015 Preview

Visual Studio 2015 CTP Code Analysis Spell Checker   00269-30000-00001-AA925
Microsoft® Visual Studio® 2015 CTP Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   00269-30000-00001-AA925
Windows Phone SDK 8.0 - ENU

.NET Reflector Visual Studio Extension   8.4.0.35
Integrates .NET Reflector into Visual Studio to allow you to seamlessly debug into third-party code and assemblies, even if you don't have the source code for them.

Visit www.reflector.net for more information.

Copyright (c) 2009-2012 Red Gate Software Inc.

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

ASP.NET and Web Tools Preview   14.0.20107.0
ASP.NET and Web Tools Preview

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

CodeMaid   #114
CodeMaid is an open source Visual Studio extension to cleanup, dig through and simplify our C#, C++, F#, VB, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.

Written by Steve Cadwallader, for more information visit http://www.codemaid.net/

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

ErrorList   1.0
Implementation of the Error and Task lists.

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

JetBrains ReSharper Platform 6   Build 6.0.20141219.120158 on 2014-12-19 12:56:02Z
JetBrains ReSharper Platform package for Microsoft Visual Studio. For more information about ReSharper Platform, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

Microsoft Azure HDInsight HQL Service   1.0.0000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   1.0.0000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.5
Microsoft Azure Tools for Microsoft Visual Studio 2015 Preview - v2.5.21104.1601

Microsoft Code Digger   0.9
Microsoft Code Digger

Microsoft GDB-based Debugger   1.0
Provides support for connecting Visual Studio to GDB

Microsoft.Pex.VisualStudio   1.0
Pex

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

Office Developer Tools for Visual Studio 2015 Preview ENU   14.0.22405
Microsoft Office Developer Tools for Visual Studio 2015 Preview ENU

PowerShell Tools   1.3
Provides file classification services using PowerShell

SQL Server Data Tools   14.0.41025.0
Microsoft SQL Server Data Tools

TeamExplorerExtensions   1.0
Extensions for TeamExplorer tab.

Visual C++ for Cross Platform Mobile Development   1.0
Visual C++ for Cross Platform Mobile Development

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.9.236.0 (d6a2cae)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.6.0.0 (eb24bdcf5cba2c12b673a07e0a8cce368b9563b3)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 3 joshcomley@googlemail.com 2015-02-09 08:11:47 UTC
I can confirm this problem occurs for me on both a Windows Phone 8.1 device and emulator
Comment 5 Sascha Schwegelbauer 2015-12-03 19:07:28 UTC
Problem still present using XamarinForms 2 after retargeting WP8-Project to WP8.1
Comment 6 John Hardman 2015-12-05 16:25:16 UTC
I experienced this as well.
Comment 7 John Hardman 2015-12-05 16:25:49 UTC
Should have mentioned, I experienced it with XF 2
Comment 8 Paul DiPietro [MSFT] 2016-12-02 01:47:37 UTC
This has been outstanding for a while, and due to being idle for so long, I'll make a reasonable guess that it isn't really occurring any more. If someone can get a reliable reproduction of it (or figure out an environmental cause), please feel free to reopen this.