uwp mobile configuration is arm or x64? - xaml

I have an app in Windows Store and I've only targeted Windows Desktop because as per my knowledge, ARM config is for Windows Mobile, but my app cannot build packages for ARM due to some errors, so I've created my app bundle on x86 and x64 and uploaded the bundle to the store.
Now my question is should I make it available on Windows Mobile as well? because when VS runs the app on emulator (any CPU config) it builds it in x64 and then deploys to mobile emulator, why is that? Shouldn't it be building it in ARM config when trying to deploy on a mobile emulator?

ARM, x86, x64 are CPU architectures, different architectures support different instructions. Your source code is compiled down to CPU instructions, that's why you have to do it for each architecture once.
The mobile emulator still runs on the CPU of your PC, so it uses the x64 architecture. But this code will not work on your ARM phone, because its CPU simply cannot execute the compiled instructions.

Related

Why does A VB.NET DLL Addin for Inventor compiled on an Intel machine work on the Intel machine but not on AMD?

Im developing continually an inventor Addin in VB.Net in visual studio 2019 ,
i have multiple machine different builds , but once in a while some machine just don't want to load the Addin f.e. the current version i have now works on all machines except one AMD machine .
When i compile the same project with the same settings no changes at all on the AMD machine with ANY CPU build option it runs without problem . When i do it on my primary developing machine it does not work on this other computer.
I checked dependencies with dependency walker , i do not get any error messages .
When i make breakpoints in DEBUG mode and debug dll compilation in the first methods called in the "StandardAddInServer.vb" file it does not reach it on the AMD machine when it is compiled on the Intel machine. But in reverse it runs smoothly .
I have no idea what this could be and I'm only speculating that is has to do with AMD/Intel difference of the machines . Any help would be appreciated to come to a solution.
Inventor 2018.3.7 Professional Build 287 is on the Intel i7-4771 machine Visual Studio Community 2019 16.3.9 , .NET 4.8.03761
Inventor 2018 Professional build 112 is on the AMD Ryzen 7 3700X machine Visual Studio Community 2019 16.7.2 .NET 4.8.03752
Any more information which could be helpful will be provided gladly .
Well.... i tought lets make the maschines identical in regards to software .. i started installing inventor updates one by one at Version 2018.3.1 the Addin magically was working .... so i hope i help somebody if the , addin automatically unloads without any error , its probably autodesk inventors fault ...
Are you using ANY CPU ,or are you forcing the project to a given bit size?
If you don't set this, and leave it at ANY CPU? Well, if you launch the application from Visual Studio (such as installing on that target machine), then the application will run as x32 bits.
HOWEVER if you launch the program from the windows command line (command prompt).
Well, if you use the x64 bit command prompt, you get a x64 bit running - in-process program. If any of your external .dll's or libraryes are x32 (or not compiled with ANY cpu), or you using any un-manage code libraies (say like ghostscript or some such)? Then your program will run (or try to) as x64 bits.
However, if you launch a x32 bit windows command prompt (there are two of them - one is x32, and one is x64). So, if you launch the .net exe (your program) from a windows x32 bit prompt, then your program will run in-process as x32 bits.
So, be careful here. Using ANY CPU from Visual Studio will ALWAYS get you a x32 bit program - including debugging. But RUNNING the program (launching outside of VS) will not always be x32 bits.
And the above behaviours seems to explain your issues/problems on the AMD machine. It was NOT that you installed VS on that machine, but that using VS to launch your program in fact FORCED it to run as x32 bits.
Bottom line:
do NOT use ANY CPU unless that is exactly what you need, and that you are VERY sure any external libraries are also compiled as ANY CPU, or in fact that any external libraries doe NOT USE any un-managed code.
All in all? I would config your project to force run as x86 ALWAYS, and thus you not get some surprises of code not working.
I doubt very much that the AMD CPU is the issue, and installing VS only worked because of forcing your project to run as x32 as opposed to x64 bits. It has zero to do with AMD here.
You could try with a former framework version like 4.6.2. That should fix the problem. It could be that the newer service packs of Inventor can deal with addins created with newer .net versions. When 2018 Inventor was released, .net 4.8 was not available.
Was Albert wrote is true as well. If the architecture of your dll doesn't meet that of your host process, it can't be loaded. A 64bit process can use 64bit dlls only whereas a 32bit one can deal with 32bit dll only. A .Net project won't be compiled by Studio into fully functional machine code (nowadays you can do this as well), but intermediate code only, which will be compiled finally by the .net framework on the target machine. If anyCPU is selected, you don't have to provide different versions for different hardware because of this behaviour.

Visual Studio 2015 run and debug on different OS version simulators

I am developing a VB.Net based Windows8.1(10) Store application.
After published, I've found out that my App crashes on Windows8.1 while it works fine on Windows10.
So, I want to debug my App on the Windows8.1. However, I cannot find how to do so.
When I [Run] the App to [Simulator], it runs on clone of my computer, but I want to run it on other version of Windows.
Visual Studio 2015 is now installed on Windows10.
Thanks.
Disclaimer: I work on Visual Studio, though not on the Universal/Modern App area.
This is not a supported scenario and there is no feature present in Windows that emulates or simulates previous versions of the "Modern" runtime environment.
The Simulator feature is actually a local-loopback Remote Desktop (Terminal Services) session and existed to make it easier to debug Modern applications given that they could only run in a fullscreen mode, however as this is no-longer the case (as apps are now floating windows) the utility of the Simulator is limited, and as you're discovering is not relevant to your problem.
The only solution I can recommend is to use Hyper-V (or another desktop virtualisation product, such as VirtualBox or VMWare if you don't want a hypervisor installed) to install a dedicated Windows 8.1 environment followed by installing the Visual Studio Remote Debugger.
Given the rapid adoption of Windows 10 (as it is provided as a recommended update to the majority of Windows 8.1 users) I don't personally recommend explicitly targeting the Windows 8.x "Modern" app environment unless you know you will have users or if it's a contract requirement.

Running a C# application (Awesomium) on multiple platforms with the Mono Project

Would it be possible to develop just one application (Xamarin Studio) that uses awesomium mono? Compile it for the mono runtime and it works across all operating systems (win, android, linux, mac, ..)?
This would be magical.

Release build Windows Phone 8 library for Any CPU change to x86

Strange configuration which I can't seem to understand.
I have a Windows Phone 8 library that I want to build for Any CPU, this works fine when I am selecting Debug, but soon as I choose Release configuration changes the platform to x86.
I can change it to Any CPU, save and exit options but if you open it again it is switched back to Active (x86).
What do I miss? The proper way to distribute Windows Phone libraries?
Regards.

Can Metro style native app have same name for different CPU in Windows 8 Store?

Assuming I'm programming in native (unmanaged) c++ and want to compile my application to x86, x64 and ARM:
How can I publish my application to Windows 8 store to support all three CPU architectures?
Can I publish 3 apps with same name but different CPU architecture?
When you create an app package, you will have the option to choose what kind of CPU you want to support.