Uno.Platform and Visual Studio - c#

I am a C++ and python developer but I need to use C# for a professional project.
I know some good basics of .NET Core but I want to find a good UI library to learn.
I test Avalonia and I want to try Uno.Platform for is multi-platform capabilities.
But, I make simple test on Visual Studio and just try if it works on Windows (with UWP sub solution).
It works (thx for templates and tutorial) when I run the application from Visual Studio.
But I want to try the application directly by executing the App.exe generated in bin/x86/... but nothing append. No trace, no error... just nothing.
I try to deploy but the problem persist....
I probably miss something important but I found no information that can help me on internet.
Did you have information to help?
When kind of topic I don't understand in the C# with Uno.Platform CI?

This seems a pretty general question. The best way to go about it is to go to Uno Platform Discord community and chat with users there - www.platform.uno/discord - #uno-platform channel.
For specific questions on how to do X with Uno Platform you should post to Stack Overrlow.

hmm i will try to answer your question. i am also experimenting with Uno.
Since Uno is Crossplatform, every Operating systems Uses its own "Programm Header"
This Header contains a lot of stuff including the needed Code entrance Point for each OS.
For Windows i tried it with the WPF HOST header and it worked.
If you want to get a executabale for the "Hallo World" example try to publish the WPF HOST Header into a folder. it will contain the .exe

Related

Visual Studio - Solution with a WPF and NodeJS Server

I am new to VS, but I have experience wit Python, NodeJS and stuff like this. I do have problably a simple question just for my understanding. If I create a WPF-C# project and do the standard stuff, design a window, make some code behind etc...
Would it be possible to add a NodeJS project, f.e. a web express webserver and deploy it into one bundle for the customer?
The question came up, because the customer does have a windows application and wants to add my NodeJS functioanality. And do not want to have 2 Applications which he has to roll out and update.
Thank you.
In case of my requirements I refactored the WPF-Solution to an electron application, where I implemented all my NodeJS code behind. I was very surprised that the electron app is much more faster. And after a while of reading the docs its very simple to deploy and push to GitHub and do autoUpdates. Even deployment on Mac was incredible easy.
Sounds like commercial, but its indeed true and I am happy with electron :-D
The only hard way I had was to redesign the XAML WPF to HTML and CSS. Still pain in the a** in my opinion.

Including C# ConsoleApplication in UWA

Does anybody of you guys have experiences with including a C#-based Console Application in a C#-based Universal Windows App?
The reason why I'm asking: I've an already exsisting Console Application developed by another developer. This Application includes a database with all the queries which I need for my App.
The problem: When I try to include the CA in my UWA project many commands like
private global::System.Runtime.InteropServices.HandleRef
throw new global::System.ApplicationException
don't get identified by VS2015.
Is there a way to let the UWA project identify CA commands? For example with adding an external CA-library or something like that.
Thank you!
You can't combine full .NET (console, winforms, WPF) assemblies with an UWP app, as they're different .NET frameworks. For more details, please read this reply. Part of the code is shareable in a Portable Class Library (PCL), but most likely not all of the code you've written.
Possible solutions:
Create an API (yourself or with the other developer) to expose the functionality needed over a (preferably) REST api.
Find a way to cheat the system. Example: launch a file (associated to the console application) with the Launcher api and output the results to a text file on disk, which you then read from your UWP app.
The first one is guaranteed to work. You might find a way to cheat the system for the second 'solution', but there's no guarantee that it won't break in the future when Windows 10 gets updated (experienced that myself for another 'hack' on the upgrade between Windows 8 and 8.1).

Remote desktop connection in C#

I want to connect to a remote PC through my own app. I planned to make one in Visual Studio 2012.
I've searched around on the internet, and couldn't find the solution to make an remote connection inside of a form.
I've read something about the "Microsoft Terminal Services Control Type" Liberary (http://www.codeproject.com/Articles/43705/Remote-Desktop-using-C-NET), but i couldn't get it working.
Any help would be appreciated!
You can use this guide : http://www.codeproject.com/Articles/43705/Remote-Desktop-using-C-NET
It's a pretty outdated technology and only works on WinForms AFAIK. I tried using this control in one of my projects but decided to ditch it as I couldn't get it to resize dynamically.
Gaucomole is another good option. but is a bit more complex: http://guac-dev.org/doc/gug/writing-you-own-guacamole-app.html
It runs in a browser and uses HTML5.
EDIT: Just noticed the article I linked is the one you were using. Why couldn't you get it working?
As an alternative for C#, you can also try Myrtille. It was first a commercial application that I made open source recently. Like Guacamole, it works from a web browser (HTML4 and HTML5) in pure javascript (no plugin).
But, as Jonathan said, if you want the remote connection into a winform, you'd better use the Microsoft Terminal Services COM control.

Robotium in C# project

I am looking for a mobile automated testing tool and have found robotium. Will it work with C# android app? Can I add the robotium jar file to a .Net project?
While it is likely that, with some amount of work, Robotium could be made to work with Xamarin.Android, it is an amount of relatively complicated work that the Robotium project is unlikely to do. (the killer item probably being good IDE integration)
However, it appears that Xamarin has acquired a testing framework for mobile applications called Calabash. They have devoted a page to explaining it on their main site: http://developer.xamarin.com/guides/testcloud/calabash/introduction-to-calabash/. My instinct here (without having tried it) would be to try and make it work, as it is pretty likely that Calabash will be supported by Xamarin in the future.

Build a simple web server that I can run as a windows service

I'm a web developer so all my experience is with ruby, python, or PHP. However, I'm gonna do a little windows programming.
I want to build a light weight web server that can handle incoming requests and pass them on to a COM port. I want to be able to distribute it as an exe that will install the server as a windows service.
What do you think would be the best language to do this in? What IDE would be best for said language?
Thanks,
Seth
To be honest you will probably have the most fun doing this in C#. The learning curve will be smaller and the language and most of its features are your friend. The fact that you can set up a windows service in 2 minutes is also a plus.
C# and Visual Studio should be fine for this. C# can be compiled/linked into a .exe, and you can make this into a service very simply.
Please take a look at the source code of Cassini. It's actually the built in server over Visual Studio. It might give you some good ideas to get started with: Link.
Grz, Kris.

Categories