Project Type: .Net 5 MVC
I want to create an application with Electron JS so that it can work offline in case of network failure and communicate with an external peripheral connected to USB.
For this I have to communicate with a generic device driver. At this moment I can already communicate through visual studio (iis).
The problem is that for the drivers to work the main program has to be set to Platform Target x86 and I can't get Electron JS to start.
If I change the Platform Target to AnyCPU (x64) I get Electron JS to start but the drivers don't work.
Could there be some configuration in the part of starting Electron that could allow to overcome this behavior?
Electron.NET - Error PlatformTarget x86
Related
We have a number of apps written in C#, some headed some non-headed (background). They are able to communicate with each other via Windows.ApplicationModel.AppService.AppServiceConnection, which works rather good on ARM on e.g. a Raspberry Pi 3 B (which works well enough with Windows 10 IoT Core, no hardware rendering tho which is a bummer). We are not using Native Tool chain when building our apps for ARM. As building them with Native Tool chain takes forever, so we would like to avoid it if possible.
For non-headed (background) apps built for ARM64 running on Windows 10 IoT Core Windows.ApplicationModel.AppService.AppServiceConnection seems to not work while debugging, when we try to connect to a app service we are greeted with AppServiceConnectionStatus.AppUnavailable. Which means:
// The package for the app service to which a connection was attempted is temporarily
// unavailable. Try to connect again later.
Even when we try to connect later the app fails to do so. A foreground app succeeds to connect, after a while, after a number of tries.
In practice this makes it almost impossible for us to debug (and therefore develop) our apps for ARM64.
To summeries debugging on ARM64 works but Windows.ApplicationModel.AppService.AppServiceConnection does not work as expected when debugging.
You need to download the remote tools with the same architecture as the machine you're installing them on. Please see the detail info about Remote Debugging.
If you use Visual Studio 2019, you can download the Remote Tool for Visual Studio 2019 that the version matches your ARM64 device in this page.
I am very much new to windows core platform.
i have developed a console application in my normal windows 10 host machine using visual studio 2015 and it is working like a champ in local machine using intel(I5/I7) Processors.
Now i have to move my application to PI running windows IOT core. i did xcopy of my files and trying to run using power shell of my windows host machine but thing is.. i could not able to run my application and getting below error message.
why my application is not running in PI? In fact my application is compiled for X86 platforms for intel processors. is this the really cause?? if so how do i compile my source code to target for ARM processors. please let me know the workaround. thanks in advance.
That doesn't look like an architecture mismatch, it looks like a .NET Framework mismatch. (Your code must be AnyCPU, because none of the other options would run both on Intel and also on ARM, and clearly your code is starting to run)
The exception occurs inside log4net, one of the libraries you use. You will have to find a version of log4net that works on that .NET Framework version, or remove that library and find a different way to generate logs.
Windows IoT Core supports UWP and non-UWP app. IoT Core is a UWP centric OS and UWP apps are its primary app type.Universal Windows Platform (UWP) is a common app platform across all version of Windows 10, including Windows 10 IoT Core.
In addition to the traditional UI apps, IoT Core has added a new UWP app type called "Background Applications". These applications do not have a UI component, but instead have a class that implements the "IBackgroundTask" interface.
IoT Core supports certain traditional Win32 app types such as Win32 Console Apps,but only C++ is supported for developing Win32 apps on IoT Core.
If you open powershell and CD into the solution project folder
To compile your code for raspberry pi, you need to compile it using win-arm as target
You can issue one of the commands:
dotnet publish -c Debug -r win-arm
dotnet publish -c Release -r win-arm
It will then compile it into the bin folder relative to the publish profile you have chosen
'..\bin\Debug\netcoreapp2.0\win-arm\publish'
Copy all the content of the publish folder into a directory of choice on the raspberry pi.
This will be able to run a simple .NET Core console app on a raspberry pi running Windows IoT Core
The project can be compiled and deployed to the Emulator and Device.
Everything works fine as long as the build configuration is set at AnyCPU or x86.
And is set to Debug.
But when build configuration is set to Release, project doesn't build.
If project is set to AnyCPU and ARM, the same problem exists.
Error 1
Files has invalid value "<?xml version="1.0"?>". Illegal characters in path.
The error doesn't point to a file.
External Libraries referenced by in this project-
- JeffWilcox.PhoneThemeManager
- Buddy
- AdDuplex
The Windows Phone 8 emulator can run only applications built as AnyCPU or x86, because it is actually running on your PC as on Hyper-V as a virtual machine.
On the other hand all Windows Phone 8 devices are ARM only, so to run your app on device, it needs to be AnyCPU or ARM.
I hope this clears some confusion in the deployment limitations.
When I go in to debug the app, it asks me to choose where I would like to deploy it. When I select Windows Mobile 6.5.3 Professional Emulator and click the Deploy button, it starts to work and throws up a command line and then it goes away and Visual Studio doesn't appear to be in debug mode.
I have the Device Emulator open, Windows Mobile 6.5.3 Professional Emulator loaded and cradled. Can someone help me figure out why it will not let me debug this project?
Brad, I downloaded the code and just unpacked the zip to D:\boxoffice_mobile (a local drive partition). Then I started VisualStudio 2008 and opened the solution file. I get a warning message that the project is not loaded from a trusted location (http://msdn.microsoft.com/en-us/library/bs2bkwxc%28v=vs.80%29.aspx). As I do not use a network drive, I ignored the warning two times and the projects load all fine.
BTW: I found a great tool to manage these 'security' warnings: http://blog.codingoutloud.com/2010/03/05/the-project-location-is-not-trusted-dealing-with-the-dreaded-unblock/. The message had nothing to do with a remote file access.
Then I just looked at the solution configuration to ensure that only the needed projects are build and did no change, as only BoxOfficeMobile and WebserviceTest are set to build and only BoxOfficeMobile is set to deploy.
Then closed solution configuration manager and just pressed F5 to start debugging to see what happens.
The startup project BoxOfficeMobile was build and deployed to "Windows Mobile 6.5.3 Professional Emulator". The emulator started and the files were deployed and the project was stopped by a breakpoint inside the code:
Here is another screen shot with the emulator set to 'Display: Always on top':
So, as you can see, the project is fine and the debug issue on your site is caused by a different setup.
Do you load the project from a network drive share? Try moving it to a local drive and run it from there.
Did you change Device settings in the VS2008 Tools:Options menu? Here is my setup (as coming as default, I did not change anything):
and the details:
The additional settings available via the buttons are empty (Configure) or unchanged (Emulator Options).
I am very interested in seeing what you changed to be not able to debug the project.
before you start developing for Windows Mobile 6.5 Prof, you need to setup your development environment.
First, install Visual Studio 2008 (no express version)
Download and install either ActiveSync (host OS <= Windows XP) or Windows Mobile Device Center / WMDC (Windows Vista/7)
[optional] Download and install Device Emulator Manager
Then download and install Windows Mobile 6.5 DTK (http://www.microsoft.com/en-us/download/details.aspx?id=5389)
Now, you can start a new C# project inside Visual Studio 2008:
Follow the wizard:
The list of Target Platforms depend on the Mobile/CE SDKs you have installed!
Select either .Net Compact Framework 2.0 or 3.5. The choose depends on what is installed on your PC and what is available on the device. If the device comes with 2.0 pre-installed, I would choose 2.0 except for I need something only available in 3.5 (ie Mobile.Status namespace).
Now you get an empty form:
You can change the target device in the project properties:
If you want to change the target platform, look at "Change Target Platform" in Project menu or just right click the project in solution explorer and select Change Target Platform:
The above has nothing to do with Device Emulator Manager or the installed Emulator Images!
You can run a WM5 targeting project on a Windows Mobile 6.5 device if you want.
To start debugging and SmartDevice application inside an emulator. Just Select an Emulator entry from the target device list in Project properties or just in the SmartDevice toolbar. Then click Debug and "Start Debugging". VS will start an emulator with the specified emulator image and deploys your project application files and start remote devugging.
You may also start an emulator image using DeviceEmulatorManager and then cradle the running Emulator image. To use the running and cradled (ActiveSync or WMDC connected!) emulator do NOT select an emulator inside VS but a Device. VS does not see the difference and uses the WMDC connected device, regardless of being an emulator or real device.
VS uses DMA to communicate with the emulator, not USB or Serial as with a real device.
Now start your development.
First of all clean your project.Then freshly start the emulator.Right click the project and select build.Then Debug the project.Your project will be started in Emulator (Don't Open the application from your Emulator at this time).
Just check your Emulator Start>File Explorer>My Device>Program Files whether the project has been previously installed.If so uninstall from the Settings> System > Remove Programs. And try re-building application and deploy it.
I have built an os design (and its bsp) in Visual Studio. I need to know how to get started with writing applications for the os by writing a simple application that will run in the os created (probably in an emulator, I still don't have the Evaluation module for the device). I have Visual Studio 2005 and Windows embedded C.E. 6.0 installed.
Some blogs described how to create the application in eMbedded Visual C++. Will I have to install this apart from Visual Studio to get started?
If you built an image from an OSDesign for a specific device you cannot run it in the emulator. The emulator has it's own sepcific BSP based on which you need to create an OSdesign.
To develop an application for your osdesgin of choice open VS2005 create a new project of type Visual C++-> Smart Device and choose the type you want. Alternatively, you can create a C# application for smart devices that will run on any device that includes the Compact Framework component in the OSDesign or has it installed on the device.
You do not need additional software other than VS2005.
You can download a package from this vendor. It includes demo applications for Windows CE6 (for that device). It also includes a document of how to create a new application for the device. You can use the instructions to create an applcation to your own device.
To test your application as it will perform on the image you built, you will need a physical device.
Update: During the New Project wizard you will be asked to choose the designated platform (native projcets at least) and you will need to choose from a list of SDKs. The list shows the installed SDKs on your desktop machine. You can create your own SDK, but in order ofr it to show in that list you need to install it on the Machine. In Windows CE the SDKs are installed to: C:\Program Files\Windows CE Tools\wce600