Cannot find type System.SystemException in module mscorlib.dll when reference to Microsoft.Phone in Windows Phone 8.1 app template - windows-phone-8

Microsoft just released Windows App 8.1 with combination of Windows 8.1 and Windows Phone 8.1, so you can create a universal app. However, it gives me a trouble to add Microsoft.Phone 8.1 assembly to project reference.
Here is what I did (in Visual Studio 2013, with Rc2 installed)
1> Create New project from Visual C#->Store Apps -> Windows Phone Apps.
2> Added Microsoft.Phone from this location: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.1
3> Now, do a build, I see the following Error: "Cannot find type System.SystemException in module mscorilib.dll"
Anyone has the similar experience? any solutions?
Thanks

There has been a few API changes as part of programming model in windows phone 8.1 apps.
have a look at this link.
It will solve your problem.
http://blogs.msdn.com/b/paraswadehra/archive/2014/08/21/how-to-send-email-from-your-windows-phone-8-1-app.aspx

Related

How to use third party dll in windows phone 8.1 application with windows runtime component?

I have created the windows phone 8.1 application in which I want to use third party dll file. That's why I have created windows runtime component for the windows phone project. I have given reference of the runtime component to the windows phone 8.1 application project.
In windows runtime component, I have set the additional Include directory path. Moreover, I have also set the Linker -> Input ->additional dependencies as lib file listing. I have drag drop all dll files in my c# windows phone application main project folder and set build action as content and copy output directory as copy always.
However, I got the following error.
An exception of type 'System.IO.FileNotFoundException' occurred in App1.WindowsPhone.exe but was not handled in user code
I have checkout the following question. But did not resolve it.
How to use a C++ dll in Windows Phone 8.1 XAML App within C++ Runtime Component
I found the answer. All the dependencies has been set properly. There was an issue in the dll file which architecture does not match with the current platform.
After created the build for proper architecture, it works.

Windows 8.1 Emulator not found: flash.vhd v flash.update1.vhd

I have a Windows 10 PC and I am trying to create my first Windows Phone app. I have installed the Visual Studio 2015 Communiuty Edition and the Emulators. I get an error when I clcik on the Debug (Emulator) button in Visual Studio:
C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Emulation\Images\flash.vhd does not exist
I have looked in the location above and flash.vhd does not exist, however flash.update1.vhd does exist. What is the difference between flash.vhd and flash.update1.vhd? I am guessing that flash.update1.vhd is flash.vhd with update 1!? How can I configure Visual Studio to use flash.update1.vhd instead of flash.vhd?
I have read a few other questions e.g. this one: Windows 8.1 Emulator does not exist. However, I have not found my answer.

Setup for Windows Phone 8 Application Development. Error while Making new Project

I have :-
1) Windows 7(64 Bit)
2) Visual Studio 13(Installed)
3) Windows Phone SDK 8.1(Installed)
When I am creating new Mobile project, I am getting Error,
A problem was encountered creating the sub project 'App.Mobile.Native.WinPhone'. The project file 'C:\Users\AppData\Local\Temp\us2to0hu.qdd\Temp\App.Mobile.Native.WinPhone.csproj' cannot be opened.
There is a missing project subtype.
Subtype: '{76F1466A-8B6D-4E39-A767-685A06062A39}' is unsupported by this installation.
Please Help.
I searched for the Subtype: ‘{76F1466A-8B6D-4E39-A767-685A06062A39}’
It must be Windows Phone 8/8.1 Blank/Hub/Webview App
Refer to:
http://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs
Please install windows 8.1 SDK from the following link:
https://dev.windows.com/en-us/downloads/sdk-archive
Best Regards,

Windows Phone 8.1 HubApp + HtmlAgilityPack

I know that using HAP in windows phone apps is very problematic, but I very need to. So the problem is that when I add System.Xml.XPath from silverlight 5 or 4 I get "Xaml Internal Error error WMC9999". It's got to be noticed that the version of HAP is 1.4.6 but not 1.4.9 (tha latest one), because it cannot be installed from NuGet (just doesn't add reference) and I've found no links to download it manually.
In old windows phone 8 silverlight app everything worked great.
Please, help.
Use the HtmlAgilityPack-PCL nuget package with Windows Phone 8.1 XAML apps, it works fine with no need to add any references manually.

I'm getting build errors when using MvxEventToCommand within a WP8 project

I'm using the MvvmCross framework to create a windows phone 8 project.
In my WP8 project within the xaml I have the following:
<i:Interaction.Triggers >
<i:EventTrigger EventName="Tap">
<Commands:MvxEventToCommand Command="{Binding OnItemTappedCommand}" />
</i:EventTrigger >
</i:Interaction.Triggers>
My namespaces are as follows:
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
and
xmlns:Commands="clr-namespace:Cirrious.MvvmCross.WindowsPhone.Commands;assembly=Cirrious.MvvmCross.WindowsPhone"
When I attempt to build I get the error:
Cannot resolve dependency to assembly 'System.Windows.Interactivity, Version=3.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Looking in ILSpy I can see that Cirrious.MvvmCross.WindowsPhone.dll references this dll but I only have version 3.9.5.0 available in my assembly references list within my project.
I've tried adding an assembly redirect in my app.config but I think that's more for runtime resolution then for build errors.
What's the best way to resolve this issue?
Thanks
-- EDIT --
I've managed to resolve this issue by finding a WP7.1 version of the System.WindowsInteractive.dll which is version 3.8.5.0. My project is definitely targeting the Windows 8.0 phone OS.
Could this be a problem with the Nuget packaging of MVVMCross?
Just to answer this question since I came across this problem today...
I had a fresh install of Windows 8.1 and the Windows Phone 8 SDK. My sln would build but when MvvmCross resolved the plugins on start-up it would crash with a ReflectionLoadTypeException - the LoaderExceptions property contained a single entry - it was unable to find System.Windows.Interactivity, despite being referenced from the extensions list in the reference manager for the project.
The solution was to install the Windows Phone 7 SDK and grab the Windows Phone 7 version from C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Windows Phone\v7.1\Libraries\System.Windows.Interactivity.dll.