I have Windows phone 8.1 RT app. I want to write ViewModel Unit test. So I have created Windows phone Unit test project.
I can't able install any Mocking framework like NSubstitute, Moq..
If i create General Unit test project, I can able to install the NSubstitute, but i couldn't refer the Windows phone 8.1 project because TargetFramework of Unit Test project is .Net framework 4.5.2.
Please help me to test my ViewModel using Mocking framework.
Thank you,
Related
My use case, I have Windows 8.1 XAML app v1.0 in appx package. I'd like to deploy this version on my tablet, use it for a while and then test update of this app to version 1.1 which I have in another appx package.
Is this easily possible for tablet apps? I know that for Windows Phone there is Application Deployment Tool, but for Windows 8.1 there is nothing I know about.
Thanks
As long as your tablet is running Windows 8.1 you can side-load the app onto it.
Create the app package using Visual Studio. Then run the Powershell script on your tablet to install the package. (You will be required to have a developer license on the tablet). When you are ready to test the next version just follow the same steps.
https://msdn.microsoft.com/en-us/library/hh975356.aspx?f=255&MSPPError=-2147217396#Create
How can I run my windows phone 8 application in windows phone 7? I have developed an app in windows phone 8 but when I want to run that app in windows phone 7 it is not running. Is there any way to make my app compatible
If the application is written for WP8 you can't run it on WP7. On the other hand, if the application is written for WP7 you can run it on WP8.
If you need to run it on WP7 you must modify your code but there are a lot of improvements in WP8 that maybe you are using in your app but won't be available in your new compilation for WP7.
More information available in https://msdn.microsoft.com/library/windows/apps/jj206947(v=vs.105).aspx
WP8 application can not be run on WP7. although you can run WP7 written code in WP8.
So i would suggest you to rewrite your code using WP7 SDK that will be compatible for both platform.
How can I watch logs from windows phone 8.1. (for instance like for Android by using SDK, or for iOs by using xCode)
The Visual Studio Output Windows is handy if you are debugging your app but you cannot see/collect the logs in another moment.
I recommend the use of MetroLog, a lightweight logging system designed specifically for Windows Store and Windows Phone apps.
You can install it using NuGet
Install-Package MetroLog
Here's an quick example:
using MetroLog;
using MetroLog.Targets;
LogManagerFactory.DefaultConfiguration.AddTarget(LogLevel.Trace, LogLevel.Fatal, new FileStreamingTarget());
ILogger log = LogManagerFactory.DefaultLogManager.GetLogger<MainPage>();
log.Trace("This is a trace message.");
You can find a tutorial explaining how to add it on your project at http://talkitbr.com/2015/06/11/adicionando-logs-em-universal-apps. Also there is an explanation regarding retrieving these logs.
This is what exactly is did:
Installed windows phone 8.0 SDK.
Installed windows phone 8.1 SDK(By first installing VS 2013 professional edition and later installing update R2).
After that 8.1 application xap deployment is failing
Unable to deploy xap on windows 8.1 phone using 8.1 deployment tool “Error-package failed updates, dependency or conflict validation”
The phone i am using is 8.1 updated
Can you please let me know if iam missing something?
Thanks in advance
Using Windows Phone Application Deployment (8.1), I just ran into same issue. I had tried to install an appx package which was built for Store in Release Mode.
I then realised I was trying to install an ARM build onto the emulator which needs an x86 build to run.
So instead I deployed the ARM Release Mode .appx to a physical device so I could test what I needed to test.
Hope this helps!
Not a real answer but an un-explained work around. I've recently started developing against windows phone. I am working on a Windows 8.1 machine that was previously a Windows 8 machine, previously using VS 2012 to develop against WP 8 and now using VS 2013 to develop for WP 8.1.
At intervals I start to receive the same error as reported by the question, both when deploying our WP 8.1 app to an emulator and when trying to run or debug our WP 8.1 unit tests. So far it's been resolved each time by restarting VS 2013 (and the emulator). Restarting the emulator alone has sometimes been sufficient but not always. I have not checked whether it works against a concrete device. More significantly I have no idea why deployment breaks or stopping/starting resolves it...
Our application and unit tests are WP 8.1 silver light projects and use SQLite.
I try PhoneGap Build service to create package for my Javascript application (in fact it is demo from PhoneJS distribution), but the package does not install to my Nokia Lumia device.
How do you build your PhoneGap applications for Windows Phone 8?
You may also use the standard PhoneGap approach to building Windows Phone 8 packages. It is described in the Getting Started with Windows Phone 8 article at Cordova site.
(however this also implies that you have Visual Studio installed, and WP8 SDK)
You can use DevExtreme to build PhoneJS application into Windows Phone 8 native package.
Please check this article for more details.