I have Windows Core running on a Raspberry PI. How do I create a rest API in a Windows universal app to run on it? I want to be able send remote commands to the Raspberry PI from a mobile device. I did several search and couldn't find much information. Thanks.
As noted here there's a Restup open source project for this
and NuGet package for it
There's also some experimental (ie fun side project) from Damian on the ASP.NET team about hosting DNX (the host process for your ASP.NET Core apps) located here but that will need some updating to the latest bits.
Related
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
I have started to work on a web service (web api) with .net core and visual studio 15.
My goal is to develop the service on windows and then deploy it on an offline linux pc (The only way to put files on the linux pc is with with an usb flash drive).
Im having trouble with finding documentations or guides on how to accomplish this. Most of the info out there is talking about azure and remote virtual servers which Is irrelevant.
Any information about how I can disturbute to linux and install the .net framework on a standalone linux will be very helpful
you can read about how to install .NET Core on Linux on this pages:
https://get.asp.net/OtherDownloads
https://docs.asp.net/en/latest/getting-started/installing-on-linux.html
To deploy an app to Linux I usually use a source code management like Git (push to Git from windows and pull from Git on Linux).
FTP to the Linux machine could be another option, creating an install package or just use a USB flash drive
I just answered a similar question here. Basically you need to publish your application with the
dnu publish -o ./deploy
command. It will allow you to package your application along with the required packages for distribution.
Using this should allow you to drop that output folder on any machine with .NET Core. You will be able to run your web from the output path without downloading packages from NuGet.
I have a .net CF 2.0 application(app also uses some C++ libraries), running on a windows mobile 5.0 device. And we are planning to use a new device in Windows Embedded 6.5.
Here can I use Xamarin studio to port my app from .netCF 2.0 ?
So that along with device upgrade I will have our app code-base platform independent.
Pros/Cons/thoughts ?
Xamarin only supports Windows 8 (plus 8.1 and 10 runtime coming soon) - not WEH 6.5
If you are looking to transfer to Windows 8 and you are looking to just click the app and hope it ports to Xamarin that isn't going to happen.
If you are coming from WM5 on Compact Framework, its not going to be a nice port. I would recommend a write from scratch and build again. Copy and paste code sections as necessary but it is certainly a build the projects and views from scratch.
You might get some good reuse out of copying C# code across depending how extensive that is, but if it is tied to platform specifics you will run into many issues.
Remember you are going from CF 2.0 to PCL. From WM5 to Windows 8. They are very different.
Also those C++ libraries may have significant problems if they are WM5 specific.
I ported my windows phone7 application to windows 8(just copy paste the xaml and c# code in visual studio 2012->new->project->WPFApplication) and made changes in UI sizes.The problem is the .exe file(after building wpf application) runs only in the system with .NET framework installed.I want to run my application in all system running windows(7(32/64),xp,vista).I am newbie to windows application basically wp7 developer.Thank u.
If you really want to port a windos phone 7 app to windows 8, You should go through the following resources. They provide most of the information.
http://msdn.microsoft.com/en-us/library/windows/apps/hh465136.aspx
http://leventoz.wordpress.com/2012/03/07/moving-a-windows-phone-app-to-windows-8-a-case-study-part-1/
http://leventoz.wordpress.com/2012/03/11/moving-a-windows-phone-app-to-windows-8-a-case-study-part-2/
WPF is a part of the .NET framework, so you can't write a WPF application that can run without the framework on the machine.
If you want to create a binary that run on the classic windows runtime you can't use WPF/C#/VB etc.
Best thing if you want to port your Windows Phone app to Windows 8 is to create a Microsoft Store app, File > New Project > Blank App in VS2012. The app won't run on anything except Windows 8 but the Microsoft Store for Windows 8 is probably the best place to have your app if it's ported from Windows Phone.
Migrating application to WP7 is not that easy as it sounds. There is lot of different APIs and also limited async/await in WP7 when using this extension.
I would probably recommend starting with this MSDN article. It describes basic problems and challenges and also contains useful namespace and API mapping:
Migrate/port a Windows Phone 7 app to a Windows Store app
I have created an XE2 FireMonkey application which needs to run on an iPad. I am familiar with exporting to XCode and recompiling on the Mac machine. This all works quite fine.
The problem however is when I want to connect to an existing web service. Using the WSDL Import, I can create the necessary file and the functionality from my web service works as expected. This only works in a Windows environment though as the file created by the WSDL Import uses the "InvokeRegistry" which is Windows specific.
How can I connect to a web service in FireMonkey in a way which will compile on XCode and work in an iOS environment?
The Web Service Toolkit of Free Pascal is one option. According to this forum post, iOS can be used as target platform.
The toolkit includes a WSDL importer wizard, also available as command line tool ("ws_helper").
"Web Service Toolkit” is a web services package for FPC, Lazarus and
Delphi; “Web Service Toolkit” is meant to ease web services
consumption and creation by FPC, Lazarus and Delphi users.
It seems that one cannot have data connectivity in mobile iOS applications without various forms of "hacking" code. There is currently no standard way with the XE2 framework to support this.
See: http://edn.embarcadero.com/article/41729
XE5 has major improvements and data connectivity is now easily handled via DataSnap. One can easily reference existing web services via a DataSnap server, so the issues I originally had are now solved.