Develop smart applications for Windows 7 - c#

I'm looking to create a very -tiny- application(s) in Windows 7. I'm looking for a programming language like C# and a simple framework that
Makes the application very light weight
Doesn't require any libraries or modules (only the *.exe and works on a newly installed Win7)
The IDE (Or the compiler) let me easily implement windows 7 features (like the menu, the graphics...)
The point: I want to create a small application (light weight so it can be easily transported), that focus mainly on Windows 7 graphic design and features.
I don't know if such IDE exists but also asking how will you solve it, mean if you have to create a tiny application (gadget like) how will you proceed?

Lightweight and regarding dependencies: Well, since you want kind of C#, you have the .NET Framework. That's not exactly lightweight, unless you're sure that the target system has it available. Be sure to check which .NET version comes preinstalled with Seven. Addendum: Now that 7 is out, it seems it comes preinstalled with .NET 3.5 SP1 (full framework, not client profile). That's a good thing.
Have a look at the Windows API Code Pack for Windows 7 for access to Windows 7 features. Like tvanfosson, I'd also stick with Visual Studio and .NET.

Personally, I'd stick with Visual Studio. You might want to get a utility like NuGenUnify, which makes it easy to use ILMerge to combine any extra libraries into the main exe if you want to distribute as a single file.

So far I haven't seen any other IDE that beats Visual Studio for windows app development. Especially soon after a Windows release. I'd be surprised if I am proved to be wrong.

Related

Getting started with C# on OS X

I'd like to create a few simple C# applications and command line utilities to learn more about C#, affordably. Initially, I tried using Microsoft's free Studio Express in a Windows 8 virtual machine; however, it quickly reported that it could only create apps for the Microsoft app store and failed to build the simplest examples of an XML file transformer.
I also found Mono or rather MonoDevelop. I'm still reading about it. It seems that the SDK is entangled with the MonoDevelop IDE, and the MonoDevelop installer is actually the Xamarin Studio installer. Xamarin is a subscription based IDE and inexpensive versions of it appear to be constrained. Perhaps I need to continue studying; however, I thought I'd ask if anyone has experience getting started with C# on OS X.
Ideally, I'd like the simplest setup. I prefer using command line compilers, simple code editors, and build scripts. Are there Windows and OS X command line compilers for C# applications? Are there framework libraries that can easily be included that work on both OS X and Windows?
First, Mono is not an SDK, but a runtime. The specific point of Mono is to be able to, for the most part, run the same IL on other platforms as what runs on .NET for Windows. This means that, barring the slight hiccups in implementation, you could copy a program, run it via "mono program.exe" (via the console) on OS X, and get the same output (I have tested this with Console applications, at least - UI starts to get a little hairier).
In terms of library, the Mono libraries try to mirror the .NET ones so exactly, that the code you write for one is almost completely compatible with the other.
"MonoDevelop" and "Xamarin Studio" are the same thing, simply having applied a name change after a certain version. They are the most well known tools for building in the .NET language family on a non-Windows system (the only tools I even know of), and tend to mirror the shortcuts of Visual Studio well (at least on windows.) Unlike Mono itself, these are an IDE, and do not constrain you any more than VS constrains you into .NET.
The constraints you'll find with free Xamarin apply mostly to their mobile platforms (iOS, Android) and do not affect working with desktop (ie Windows and OS X) applications.
I've settled on using a Windows 8 virtual machine and Visual Studio Express for Windows Desktop as Dan J recommended. For usage similar to mine, simple desktop and command line apps, be careful not to select and install the "V.S.E. for Windows" version.

Recommendations for porting a C# WPF .NET 4.0 application to Mac OS X (Mono?)

I currently have a (non commercial) application created in MS Visual C# 4.5, using WPF and LINQ.
To make a future porting possible to Mac OS X, I have used the MVVM design pattern to split the logic and user interface.
I would like to know:
1) I know WPF is not supported by Mono. I use a lot of bindings. Is it possible to port this into WinForms (or another way that is supported by Mono) in a reasonably easy manner?
2) I guess all LINQ functionality has to be changed into for/foreach loops?
3) Are there other considerations or recommendations I can take into account or warn when porting it?
Thanks in advance.
Silverligt runs on the Mac. If your application can be limited to what is possible in Silverlight the porting will be very easy because basically Silverlight is WPF in the browser. In the recently released Silverlight 5 you are able to access the entire local file system when running out-of-browser and you can also create multiple windows.
As mentioned in the comments, the Mono XWT cross platform Widget toolkit should do the trick - if (as of April 2012) you're willing to work with very fresh code.
XWT is similar to the SWT widget kit for Eclipse/Java in that it maps directly to the native OS's widgets for Mac-OSX, Linux, and Windows-WPF. It differs in that it is based on the layout system and general API of the GTK-Sharp library used for much of the Mono tools stack (i.e. MonoDevelop, MonoDoc, Banshee, etc.) According to the FOSDEM slides, XWT is intended as a replacement/addition to GTK-Sharp for the Mono project and Xamarin's use in MonoDevelop. My guess is that they want to move MonoDevelop to appear to be more OS native and/or prettier that the GTK widget kit allows presently, possibly to bring their toolchain more towards parity with the Eclipse offerings.
At the time of the writing this answer, the XWT toolkit was still undergoing heavy development (particularly the Windows WPF version), but was reasonably functional on all three platforms.

Cross platform development, GUI and Database - c#

Forgive me for asking a common question, but I couldn't quite get what I needed from what I found so far.
First question - SQLite. I am using this DB as in my C#.NET 3.5 windows service and it works great, I was looking for a portable solution, because I would like port my service to a linux daemon etc, using Mono, which seems to support it. However, I am not sure how to implement this. I had thought the dll was compatable, but it seems there is a seperate dll for Mono/.NET which I should have expected. Does this mean I need to seperately code/compile for each platform or is there something that would allow me use of SQLite with the same code on various platforms? I have encountered this a few times in my searches, csharp sqlite, a "reimplementation". To be honest, this is quite new to me, is it of use? The Mono SQlite page says that they Mono.Data.Sqlite code is based on System.Data.SQlite and goes on to say...
"We have chosen this way as means to
provide a migration path for
developers using SQLite in their .NET
applications"
Are they referring to creating a new, seperate binary? Or could I run my code as is with some adaptation?
Second question - GUI. As far as I can tell the two main options for cross platform dev in .NET would be GTK# and Winforms. Again however, its the specifics of implementation that are a bit hazey. Can I create a win forms GUI in visual studio as I normally would then easily migrate this using mono? Or should I develop this in something like X-Develop or MonoDevelop?
Many thanks for your advice/patience :D
To help out a little bit here I used the full mysql dll file that was provided and I was able to compile my program on windows using visual studio, and then deploy it to Linux without changing anything(except the case of the mysql dll file, which is kind of annoying you'll see what I mean at some point).
Also from what I've heard winforms isn't totally supported by mono yet, but I may be wrong. I haven't done a gui cross platform yet, but I would test winforms first, just so you could develop it in visual studio, and if that doesn't work I think GTK should be fine.
You just need to make sure that the dll's are compiled for .net 3.5 or below and you should be fine(90% of the time).
Check this out here, http://www.mono-project.com/MoMA and also the link that chris provided.

C# -Mono (platform independence)

I'm very newbie to Ubuntu OS and I have my solution developed in visual studio 2008.
I want my application to run in both windows and Linux(ubuntu).
I've few questions in my mind.
Does mono support visual debugger .
If I start development using
mono.Is it possible to run same in
.net framework (windows) ?? or do I
need to write the NSI script to
download the libraries during
installation from internet and
install.
What is the best way to
achieve platform independence.
Thanks in advance.
Yes, Mono has a debugger - see MonoDevelop.
Assuming you don't use any Mono-specific libraries, or ship them alongside your app, it should just work in Windows against the Microsoft .NET implementation - although of course you'd want to test it.
A lot of achieving platform independence is a matter of the libraries you use: make sure whatever you want to call is either already available in both platforms or can be shipped alongside your app. Beyond that, there are obvious things like not assuming a particular path/directory separator, potentially not assuming a particular endianness (although that's rarely an issue in C# in my experience) - and regular testing, both manual and automated as far as possible.
There is an Mono add-in for Visual Studio that warns you when building your app if you use something that Mono doesn't support yet.
Don't remember the name, thought.

Microsoftless C# development system for Windows

If you were given a new computers with Windows ( XP or Vista ) and had to install a development system for C# which used as little as it could of stuff created at Microsoft, how would you do it?
PS:
I want to make clear ( since it seems I initially didn't ), I do not mean an IDE.
I mean a system. Suppose I install XP or Vista without installing .Net.
What "components" ie compilers, runtimes and libraries do I have to install to make develop in C# and how can i do it using as few Microsoft products as I can.
The question is, Why aren't you using Microsoft products for a product created by Microsoft?
If the answer is cost then have a looksee at the free version of the C# IDE and Compiler, Visual Studio Express.
If there are other reasons, then you can always use your own text editor, download Mono and get the Mono C# compiler and compile everything yourself. If you're looking for an alternative IDE, SharpDevelop is available.
In terms of development IDE one of your best bets would be SharpDevelop
If you want to go a step further and not even use the Microsoft compiler you can use Mono (C# only).
The .NET Framework itself comes with a compiler and build system (csc/msbuild, the equivalent of gcc/make) built in. It's in C:\Windows\Microsoft.NET\v3.5. All you really need to build .NET code is a copy of Notepad (or preferably, Vim)
CSharpBuilder
Sharp Develop
Mono
I have heard about Sharp develop
You could use Eclipse, Mono and a C# plugin. For the more complex stuff you could use the command line for compiling.
I had used ASP.Net Web Matrix to develop some web site in c#1.0 years ago. Its free, lite & easy to use.

Categories