How can I run multiple instances of the windows phone 7 emulator at the same time? - windows-phone-7

I'm creating a multiplayer game for windows phone 7. How can I run multiple instances of the emulator in order to debug it?

You can indeed run multiple instances of the Windows Phone 7 emulator at the same time, and even debug them simultaneously, as I show in my blog post.
Open the folder [Your Drive Letter]:\ProgramData\Microsoft\Phone Tools\CoreCon\10.0\addons
Locate the file ImageConfig.en-US.xsl
Take a copy of it, leaving it in the same directory, and name it something like ImageConfig.en-US 2nd Instance.xsl
Open the copy in a text editor.
Locate the element DEVICE and change it's Name attribute, also assign a new GUID value to ID.
Scroll down the file to locate the part that says PROPERTY ID=”VMID”:
Put a new Guid inside that element – make sure though that you use capital letters rather than lower case.
Save the file
Re open the XAP deployment tool, or Visual Studio, if you already have them open, and you’ll see your new Emulator instances.
See the blog post for more details, and screenshots to clarify some of the steps

You can only run one instance of the Windows Phone 7 emulator at a time on a single machine - that's set by default, and if you don't want to mess with custom configurations. When you deploy from Visual Studio, the same instance is shared between the running instances of the development environment.
However, you can create additional instances of the WP emulator if you follow the instructions in this article. Make sure you backup the config files before editing them.

I had the same problem, trying to test my multiplayer game, and i eventually bought a WP7 device (HTC HD7) on ebay, unlocked it for development purposes, and used it and the emulator for testing.
Since I have experience with the android environment, I can say that denying the possibility of multiple emulator instances really damage the development efforts. Hope Microsoft will change this.
BTW, i'm using the Skiller SDK for the multiplayer and social side of my game (Their official WP7 SDK will be avialable in a few days, and you can download it from http://dev.skiller-games.com). I totally recommend it.
Good Luck.

Related

Manually update an windows app in kiosk mode doesn´t work

Manually triggering update of an app when running windows in assigned access (Kiosk mode) doesn´t work.
I have read others facing the same issue and it feels like there is a bug in windows Kiosk mode. But maybe there is some reason for this behaviour?
I have an app that I sideload using an appinstaller file (my app consist of both a uwp part and a consol part linked with a bridge connection). The app works well in Kiosk mode besides the update part. If I enable automatic updates and link to a specific folder on my computer the automatic updates will work and update my app from the specific folder. However this way to update requires two restarts before it is automatically updated. I want to be able to manually trigger the update from within the app itself somehow and have it updated instantly.
I have tried to update using packagemanager using the function below. This works well in desktop but will always freeze in bluscreen with progressring if I run it in an account in Kiosk mode (assigned access).
PackageManager pm = new PackageManager();
pm.AddPackageByAppInstallerFileAsync(new Uri("C:\\myLocalPath"), AddPackageByAppInstallerOptions.ForceTargetAppShutdown, pm.FindPackageVolume("C:\\"));
I have also tried to restart the app using the command below in order to trigger the automatic update without the need to restart the entire computer. This also works well in desktop but will freeze in bluscreen if I am in a Kiosk account.
AppRestartFailureReason result = await CoreApplication.RequestRestartAsync("Restart");
Restarting the entire computer two times and enabling automatic updates will update the app without problems. Why is it not possible to use one of the methods above? Is this a bug in windows kiosk mode or is this really intended??
The same issue is also reported here:
problem-when-restart-app-on-kiosk-mode-windows-10
and here:
intune-kiosk-blue-screen-spinner-after-uwp-app-res
See my answer to how I made this work here:
The same problem described on microsoft docs
I don´t feel very confident with the whole assigned access and package installation concept. It works at the moment for me but my feeling is that it is not very stable. Many different ways of creating almost the same thing. The problem is that there are differences between the results depending on how you get there. For instance two assigne access accounts don´t behave the same if you created them differently. Also adding and removing both apps and accounts leaves trash that you don´t see but can cause problems.At least this is my feeling.

How to Create a Full-Trust UWP App?

Using the Desktop Bridge (formerly known as Project Centennial) through the DAC, one can create a full-trust UWP App. I thought this meant you can now create a Full-Trust UWP App and if so, how do you do that?
What I am trying to figure out is what configuration can I manually set on my UWP Project to grant it full-trust.
If you need some background, I need to create an Enterprise tool that has to be UWP. The application is going to be run on my company and one of the features that would make the UX better is to be able to access some parts of the file system outside of those allowed by UWP and preferably without the summoning of a dialog. Being able to run other DLL would also be a big plus; perhaps DLL Hell is desired this time around.
#Anzurio - just stumbled across your question and thought I'd share our experiences building the new Windows Terminal.
We originally set out to create the Terminal as a UWP app, with a nice modern XAML UI, but quickly found that the UWP app platform couldn't support a couple of our key requirements:
1. Terminal must be able to be launched elevated
2. Terminal must be able to launch & connect to arbitrary executables (e.g. cmd, powershell, wsl, etc.)
Because of these limitations, we had to create the Terminal as a standard Win32 process which contains a XAML Island which hosts the Terminal's Tab Bar and Terminal XAML Control instances in the main window frame.
We have taken care to keep as much app lifetime/logic code OUT of the Win32 host as we can, so that we'll have less work to do if/when the app platform does support our requirements and we get to ship a real UWP Terminal apps.
We are working with the app plat team to figure out how we might be able to build/full-trust modern apps more cleanly in the future.
In the meantime, I hope this response helps, and hope the Terminal source gives you some inspiration as to how to craft your own apps.
I don't know such of options. Yes, DAC can contain the Full-Trusted Win32 apps, but it is only applicable for Win32. UWP - WinRT - apps are restricted with App Container.
The alternative option is - using the "Special capabilities".
Special and restricted capabilities
There are many of declarations that overcome the restrictions of sandbox. Some of these are not applicable for store submission - only for in-house deployment apps. Others need registration for Microsoft to deploy with store. If your requirement is matched, you can use it.
(Added - June 2017) From Win10 AU, we can use the "FullTrustLauncher" API to launch the Win32 component from UWP App. But, yes, it does not mean we can run the "UWP" - WinRT process with full-trust rights. It's applicable only for Win32 process. And, the Win32 app executable should be contained in the application's AppX package and the manifest should declare the executable as "windows.fullTrustProcess".
<Extensions>
<desktop:Extension Category="windows.fullTrustProcess" Executable="fulltrustprocess.exe">
<desktop:FullTrustProcess>
<desktop:ParameterGroup GroupId="SyncGroup" Parameters="/Sync"/>
<desktop:ParameterGroup GroupId="OtherGroup" Parameters="/Other"/>
</desktop:FullTrustProcess>
</desktop:Extension>
</Extensions>
Full​Trust​Process​Launcher Class

Is there a testing conditions checklist for windows phone apps?

I've built a Windows Phone application and was successfully able to get it into the store. I made a few improvements and created a Windows Phone 8 version and submitted the update. However, it keeps failing the certification process (3 times now). I found one issue with the Windows Phone 7.x version and was able to fix that, but now I'm just getting an error that my application fails to run with a silent failure.
I've tried everything I can think of in emulators and devices, but I can't seem to get the failure to happen. It would really be nice if Microsoft would give you more information. Since they don't, I was wondering if anyone had a good list of all the different condition, devices, and steps you go through to test your application before submitting it.
So what are the recommended testing scenarios to test an app in before submitting it to the store?
(What would be really nice would be to see what steps Microsoft uses when they test an app)
BTW - I should mention that I've used the certification tool and the simulation dashboard in my own testing.
Most of the tests used for WP7/WP8 certification are public and can be seen as part of the Windows Phone certification guidelines: App submission requirements for Windows Phone, Technical certification requirements for Windows Phone and Additional requirements for specific app types for Windows Phone. Have a look at the column titled "Test Steps".
Couple of thoughts regarding you specific issue:
Can you share you specific failure report NSTL test results pdf file?
A good way to make sure your second submission goes through is to simply fix the failure from the first submission, and under the "tester notes" say that it's the exact same XAP with one small fix and how it was fixed.
If you can't repro an issue encountered by the testers, you can always resubmit and under the "tester notes" saying just that and ask for more details if it fails again.
The test team may be using 256MB devices (Lumia 610) for WP7 testing and 512MB devices (Lumia 620) for WP8 testing. Have you tested your app in the emulator under those configurations?
We got this problem recently on our two apps on which the another one was an app we did only some text changes. The previous version passed and launced well and the new version did not.
Our reason was very similar as what Bryant tells.
What we did was that after our changes we run the 'Preemptive Solutions Dotfuscator For Marketplace Apps' and upload the dotfuscated xap-file. On our cases the Dotfuscator had changed the size of our own DLL-file (we have our own custom controls for buttons to have two title-lines on the button). At the moment I don't know reason to this but I feel that somehow the Dotfuscator does not found our own DLL properly while dotfuscating (this our DLL is on the References of our project)).
So one reason can be that something goes wrong while dotfuscating. For this reason one should test the dotfuscated xap-file by installing it onto the phone using 'Application Deployment Tool'.
The files and especially the DLL-files inside a yourapp.xap-file can be seen by renaming the file to yourapp.zip and then extracting it.
Tapani

Installation metro style application

I am trying to install my Metro Application.
So, my question is:
Can I move sample pictures for my Application to KnownFolders.Pictures and Videos during installation ?
And, how can I create installation file for my application?
Thank you
With the installation mechanism for Windows Store apps in Windows 8, there is no need to write a setup or installation program. That will all be managed through the Windows Store once your app is published.
Since you can't write a setup program, to accomplish a similar goal, you can put some functionality in the app to execute when it's first run, then save a setting to indicate you've already performed the first run operations.
This would be where you would put your code for moving sample pictures.
However, your app will also need the appropriate permissions to access the KnownFolders location programmatically - check out this article for details. http://msdn.microsoft.com/en-us/library/windows/apps/Hh967755.aspx
It's also a good best practice to ask the user if it's OK to copy sample pictures to their Pictures library.

Detecting and launching an external application from within a Windows Phone 7.1/7.5 application

I need to write an application that can detect if the "Bing - Get me there" application is installed on the current phone and if so, launch it.
Is this possible? The app would need to do this for other external applications as well, so a generic method or interface for this would be helpful.
Applications run in a sandbox on Windows Phone and there is no way to tell if other applications are installed unless you are writing both of them and you use a method to announce to other applications that you are installed and they know how to read that announcement.
2 approaches to such announcements would be:
Have both (all) apps synchronise with a web server and report which devices they have been installed on. The apps can the query which other apps have been installed on that device.
Have all apps write a file to a location where all apps can access. The only place to do this is the PicturesLibrary so you have to embed the identifier in the name of the image or in its contents and be able to query all images to identify the other installed apps. The user could manually delete any images you create in this way though.
Beware, neither method can tell if the other app has subsequently been uninstalled though so this is far from foolproof.
As far as I know, there's no way to do that.
Applications on Windows Phone run in complete isolation, and can not act with other applications, other than some highly specialized apps (i.e. for playing media).

Resources