Archive

Posts Tagged ‘visual studio’

Impressions during developing my first application with Mono and Gtk# (GtkSharp)

2012/09/30 Comments off

Why Mono? Why Gtk?

Over the past couple of years I have been developing C# ASP.NET enterprise applications. So I am quite comfortable with the Microsoft stack.

That answers the first question: Mono gives me C# and the .NET stack.

On the other hand I have been using linux as a desktop environment on my home machine for over a decade. I am comfortable with using linux as my primary OS.

That answers the second question: Mono gives me access to Gtk, the graphics library of gnome, which is the default “desktop” in many linux distributions.

The App

I want to synchronize different Git repositories semi-automatically using a Gui.

  • Default behaviour of the automation can be loaded via a Json file.
  • Each entry describes a repository set to be synchronized.

The app is located at https://github.com/draptik/RepoSync

I also published a small demo application for gtk# and treeview: https://github.com/draptik/GtkSharpTreeViewDemo

Impressions

Monodevelop vs Visual Studio

I’ll keep it brief: If you’re used to Visual Studio and ReSharper, Monodevelop does not come close. On the other hand Monodevelop is a full C# IDE which works with linux. And Monodevelop can be used cross-plattform.

Gtk# API

The Gtk# API is not your typical .NET library. You will very soon notice that the origins are C/C++. This takes some getting used to if you have a .NET background.

Typically there are no return values. Instead Gtk# methods very often use the “out” keyword in .NET because that comes closer to the C++ implementation using pointers.

Here is an example:

## Mono Gtk# Code
bool someBool = false;
if (listStore.GetIterFirst (out iter)) {
do {
someBool = (bool) listStore.GetValue (iter, 0);
} while (someBool && listStore.IterNext (ref iter));
}
return someBool;

## Pseudo-C# Code
return listStore.ToList().Any(s => s.MyBoolProp);

From the .NET side, I don’t like the Gtk# API. I prefer methods having return values. I guess it is a matter of tast. If it would really bother me, I would write some wrappers around… 😉

Advertisements

Antivir regression bug makes Visual Studio 2010 unusable

2011/07/09 Comments off

The current version of Antivir Personal slows down Visual Studio 2010 making it unbearable to develop ASP.NET applications.

Debugging with active Antivir: appr. 5min for an empty Default.aspx page to display.

Debugging with deactivated Antivir: a few seconds for an empty Default.aspx page to display.

Until Antivir fixes this bug I will give Microsoft Security Essentials a try.

Regression because this has been addressed and fixed in December 2010:

Antivir FAQ (English)

Antivir FAQ (Deutsch)

This applies to the following version of Antivir:

Produktversion 10.2.0.696 29.06.2011
Suchengine 8.02.06.04 06.07.2011
Virendefinitionsdatei 7.11.11.27 07.07.2011
Control Center 10.00.12.31 28.06.2011
Config Center 10.00.13.20 28.06.2011
Luke Filewalker 10.03.00.07 28.06.2011
AntiVir Guard 10.00.01.59 28.06.2011
Filter 10.00.26.09 28.06.2011
AntiVir WebGuard 10.01.09.00 28.06.2011
Planer 10.00.00.21 02.05.2011
Updater 10.00.00.39 21.06.2011

Installing SQL Server Management Studio 2008 Express after installing Visual Studio 2010

2011/03/17 Comments off

Visual Studio 2010 comes with its own version of SQL Server Express.

If you try to install SSMS(E) (SQL Server Management Studio Express) afterwards and run into trouble, take a look at this post by Alexander Zeitler.

NHibernate Code Completion (IntelliSense) for Visual Studio

2010/12/08 Comments off

Enable code completion (IntelliSense) in Visual Studio by copying the XSD files from NHibernate to your Visual Studio’s XML folder.

For example (NHibenrate 2.0.1):

Files to copy:

${nhibernate-location}\NHibernate\2.0.1\nhibernate-configuration.xsd
${nhibernate-location}\NHibernate\2.0.1\nhibernate-mapping.xsd

Destination:

C:\Programme\Microsoft Visual Studio 10.0\Xml\Schemas

Using NUnit with Visual Studio Express

2010/08/20 Comments off

Since Microsoft’s Visual Studio Express edition does not allow installation of any plugins anymore (f.ex. TestDriven.Net), here is a quick workaround to get NUnit-GUI working. Add this to your Post-Build section of your Project settings:

copy /Y “$(ProjectDir)App.config” “$(TargetDir)$(TargetFileName).config”

For more details please consult http://codebetter.com/blogs/darrell.norton/archive/2005/05/13/63169.aspx

Problem upgrading VMware Tools (because of JIT-Debugger) solved

2009/05/26 Comments off

After resurrecting an old VMware installation (I started with the first freely available version of VMware.. version 1) and upgrading successfully (see this post), I was not able to update Vmware Tools within my guest OS (Windows XP SP3). I tried the automatic update option as well as the interactive update option. Both resulted in Visual Studio’s JIT (Just-In-Time) Debugger complaining and aborting the upgrade (on the guest OS).

Solution: Within the guest OS (WindowsXP in my case), uninstall VMware Tools and restart the guest OS. After restarting the guest OS the VMware UI “VMware Tools”-section will have changed from “Upgrade VMware Tools” to “Install VMware Tools”. Clicking the latter installed a fresh version of VMware tools without any problems.

This worked with VMware-server-2.0.1-156745 in combination with host OS Ubuntu 9.04 and guest OS Windows XP SP3.