How to install an XAP from the commandline in a windows mobile 7 standalone emulator? - windows-phone-7

We have installed a windows phone stand alone emulator XDE.exe.
Now we would like to install from the commandline additional windows mobile applications.
For this we used the Smart Device Connectivity API as described in Justin Angel's blog post [1].
This is working fine as long as we have a complete SDK installed.
If we try to install an application on the stand alone emulator we face an error because the datastore is empty [2].
Any idea how the stand alone emulator can be added to the datastore? Or do you know an other approach to install an XAP inside a stand alone emulator?
Thanks for a hint.
Best Regards
Frank
[1] http://justinangel.net/WindowsPhone7EmulatorAutomation
[2] Microsoft.SmartDevice.Connectivity.PlatformNotFoundExceptio
n: Exception of type 'Microsoft.SmartDevice.Connectivity.PlatformNotFoundExcepti
on' was thrown.

Try using the Windows Phone Power Tools. If you download the code you can tweek the WindowsPhonePowerTools.Console to do what you want. Out of the box it seems to have a problem with the way it parses the command line causing full paths to a xap having a ':' on them to not work so well (could be fixed pretty easy though).
To test it out, I copied a xap file to the directory I compiled the WindowsPhonePowerTools.Console to and used the following command line to deploy to the emulator:
wptools.exe -target:emulator -xap:myxapname.xap -install

Try it:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402565%28v=vs.105%29.aspx
XapDeployCmd.exe has the following syntax:
XapDeployCmd.exe
The following table describes the command-line options for XapDeployCmd.exe.
Option
Description
Specifies the command to run. This option has one of the following values:
OptionDescription
/installlaunch - Installs and runs the app on the device. This option requires the Xap FileName argument.
/update - Updates the app already installed on the device. This option requires the Xap FileName argument.
/launch - Launches the app already installed on the device. This option requires the Product ID argument.
/uninstall - Uninstalls the app from the device. This option requires the Product ID argument.
/EnumerateDevices - Lists the valid device targets and a numeric index for each device.
- Specifies the GUID of the app. This value is found in the app manifest file for the project, WMAppManifest.xml.
- Specifies the full path of the XAP to be installed or updated.
- Specifies the target device. This option has one of the following values:
xd - Default emulator.
de - Windows Phone device connected to the development computer.
n - The device at index n in the list of devices. To get the list of devices, run XapDeployCmd.exe /EnumerateDevices.

Related

how to run a self-contained asp.net core api in Mac Os

At first I have to apologize that I know it's a stupid question but since I don't have Mac computer so I can't test it as well, and I also failed to find document in Microsoft about the actions after publish, then I reach here to gather a confirmation from wise SO contributers.
I have an asp.net core project and I published it as self-contained application. When I choose the target OS as windows, then I will get an EXE file in the publish folder, then in a windows OS without .net runtime, I can still run the app by just double clicking the exe file.
Okay, then here's the question, when I choose the target OS as osx-x64, I can get a file like screenshot below. Then if I have a Mac computer, how can I run this File? The Mac wouldn't have .net runtime, and at first I think this app may also can be run by just double clicking the file. Am I right? Or it should be run within a command line like cd xxx first then ./filename?
Thank you very much in advance for your confirmation.

Windows 10 EV code signing no longer works on electron app

I have an electron app. Pretty basic app. It doesn't use ffmpeg for anything it does play an mp3 chime from time to time. I build my app with electron-forge using squirrel format. I then sign it using the SafeNet Authentication app. It's always worked flawlessly.
It's been a couple months since I last released a version. Only thing that has changed is some html ui updates within my electron app and of course lots of Windows 10 updates.
My app builds fine using electron-forge, it installs and runs without issue. I then sign it like usual from the command line and SafeNet confirms it was signed. Right clicking on the file shows it has been signed by my organization. However, once I execute the signed app I get this error: "The code execution cannot proceed because ffmpeg.dll was not found. Reinstalling the program may fix this problem."
Here is what I have tried so far:
Building/Signing on a different windows 10 machine.
Uninstall/Reinstall SafeNet.
Running signed .exe on a different Windows 10 instance
Building/Signing with a cmd session ran as administrator
I am at a loss, why is it screaming about ffmpeg.dll which my app doesn't depend on? Why only after the .exe has been signed do I get this error?
OS: Windows 10
Electron v7.3.2
Electron-Forge/cli v6.0.0-beta.47
SafeNet x64 v10.3
I feel really stupid. I was trying sign the wrong .exe file. Electron-forge creates two output directories when building an app, a directory called "make" and a directory with the name of your app. I should have been signing the .exe in the make folder. The .exe in the app name folder is a stand alone .exe that doesn't have any of the supported .dll files built into it.
After run the
npx #electron-forge/cli import and `npm run make`
Inside the project folder path it creates out folder. Inside out, there are two folders make and electron..........
Go to make then 64x and then you can find .exe
Use that one. It will work without any issue.

Windows App Certification Kit Warning

I have an app that developed for Windows 7 & 8. Developed in VS2010 using C++/CLI. When tried to certify with Windows App Certification Kit, it shows a warning.
Binary analyzer
Warning: The binary analyzer test detected the following errors:
File C:\Program Files (x86)\MyApp\msvcr100.dll has failed the ExecutableImportsCheck check.
File C:\Program Files (x86)\MyApp\msvcp100.dll has failed the ExecutableImportsCheck check.
Impact if not fixed: If the app doesn’t use the available Windows protections, it can increase the vulnerability of the customer's computer to malware.
How to fix: Apply the SAFESEH, DYNAMICBASE, and NXCOMPAT options when you link the app.
How can I avoid this warning from my app.
It makes no sense to use WACK on your project. It was made to verify WinRT apps, the kind that are published through the Store and run on Windows 8.x or Windows Phone. They need to be safe to run in a very restricted sandbox that makes a very small subset of the winapi available. Limited for security, deployment and power-consumption reasons, what WACK verifies. A desktop DLL like msvcr100.dll cannot meet them. Such apps are built with another CRT, vccorlibxxx.dll
You cannot build such an app with VS2010, VS2012 or higher required. Nor can it run on Win7. You simply need to stop using the tool.
Update: it does appear that WACK was updated in the 8.1 SDK to also verify Windows Logo requirements for desktop apps. This is obscure. Judging from the command help that's displayed when I run appcert.exe /? in an elevated command prompt, you must first create an installer for your app. Then you can run appcert with the -apptype desktop and the -setuppath yourinstaller.exe to have it perform the validation. Some additional command line options appear to matter, like -appusage. I don't know what they mean.
Do keep in mind that this is only useful if you need the Windows Logo certification. There ought to be additional information in the logo program documentation about this. Consider contacting Microsoft if you have Windows Logo program questions.

Windows Phone Power Tool (Pre WP-8) Fails To Load Folder Content

My environment : Win7, VS2010 Pro, Windows Phone Emulator 10.1.40219.390, HTC T8788, Windows Phone Power Tool v1.6.
I need to Get multiple files (they are <3kb json files) to my dev box from a folder on my emulator/device. I had been happily doing this with Isolated Explorer command tool and/or Windows Phone Power Tool till the number of files was very limited. As soon as the number of files increased in the folder both the tools mentioned above failed to open the folder from device. The application on device and emulator is handling large number of files as expected (tested with 4000+ files). Following are my findings regarding the issue with WPPT (and IS explorer): if a folder contains more than 1024 files, WPPT does not load the folder. The physical size of individual file in the folder does not matter. The issue can be reproduced with same effect on emulator and device. On further investigation I found that WPPT breaks at a call to Microsoft.SmartDevice.Connectivity.RemoteIsolatedStorageFile.GetDirectoryListing() which just says - "Unspecified error" with no details. It seems the said API method is now obsolete and i could not find any substantial information on MSDN about it or the issue
Did somebody else also encounter this problem? Is there some way I can pull large number of files (4000+) to my dev box from IS folder on device/emulator (please note, i can only work with the environment mentioned above, so Win8 or WP8 emulator are out of question)?
Regards.

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

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.

Resources