Tuesday, September 27, 2016

Setting up a Xamarin development enviroment in Visual Studio 2015

In this post, I will keep track of all the important steps I followed in order to successfully build, deploy and run a HelloWorld Xamarin.Forms application, both in an emulator as well in a physical device - plus successfully debugging it as well.

I had lots of trouble and in doing that under Windows 7, where much of the goals mentioed above were not accomplished at all.

On the other hand, after moving to a fresh new Windows 10 installation on a formatted drive, everything changed dramatically. Installing Visual Studio with Xamarin Cross Platform component was all I did to achieve running the app both in an emulator and device, plus debugging.

So here is the check-list, as I am aware of:

  1. Operational System: Windows 10 (it seems, by googling, possible to do all this in Windows 7, but from my experience, it adds lots of difficulties, such as the absence of Hyper-V virtualization server (hindering emulation) - weighed against the smooth experience of doing it in Windows 10 - must make you consider upgrading your OS very seriously.
  2. Installing Visual Studio 2015 marking the Xamarin Cross-Platform components box.

Debugging:
  1. Make sure the debugger selected in the project's properties is Xamarin, in order to successfully debug.

      2. Make sure your Hyper-V instance setting for Processor -> Compatibility "Migrate to a physical computer..." is selected.



In addition, make sure you follow the Visual Studio Output window under Xamarin and Xamarin Diagnostics, to be aware of any problems.



In order to debug an Adroid device, remember that you must enable the Developer Options mode, which is achieved by clicking 7 times in Build Number under the About entry. There, you must select "USB Debugging".

Monday, September 26, 2016

Permanently run Visual Studio in admin mode


Right click in your VS shortcut -> Properties -> Advanced -> Run as administrator.


Wednesday, August 24, 2016

Unable to debug Silverlight Application

I was unable to successfully debug my silverlight application until I came across the this answer from StackOverflow (worth checking the one above it as well, although it was the 2nd that fixed my issue).

Monday, August 22, 2016

Fixing error Silverlight.Csharp.Targets was not found

If you are facing build errors where some (likely projects that rely on Silverlight) of your projects are not being loaded into the solution, here's what worked for me (I used Visual Studio 2015, but the same should work for 2010):

(The solution is based on what was proposed here).


  1. Go do Programs and Features, select your Visual Studio installation, and run a Modify (if not present, you may be forced to go with Repair). Check the checkbox that mentions Silverlight
  2. Afterwards, when reopening Visual Studio to see if the project(s) is/are correctly loaded - you will be prompted to install Silverlight Developer - the pop-up will include the download link as well. Download, install, and you are (hopefully) done.

Wednesday, August 17, 2016

Visual Studio Web Development Extensions

http://webtooling.visualstudio.com/extensions/web-development

Going up one level, you get into http://webtooling.visualstudio.com, that overviews what visual studio offers in covering the technologies being used today.

P.S.: PowerTools has historically given me freezing problems, making it not an option.

P.S. II: The power tools issue mentioned above is gone after moving to Windows 10 (recommend, by the way, seems to give benefits on many other fronts, like Xamarin development, for example).

Wednesday, August 10, 2016

Javascript learning resources

I found in Felix Kling's stackoverflow profile 3 really interesting links about learning javascript.

Eloquent JavaScript (free online edition)
You don't know JavaScript (free online edition)
quirksmode.org - especially DOM and event handling

I was surprised to find the sources look very good and are free.