Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 153, comments - 0, trackbacks - 0

My Links

News

Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories

Archives

Post Categories

.NET Framework

Blogroll

Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

mercoledì 24 agosto 2016

Get Syncfusion's mobile controls with Visual Studio Dev Essentials

A few months ago, Microsoft announced Dev Essentials, a program that allows developers to get a number of tools to build high-quality applications at no cost. In fact, Dev Essentials includes Visual Studio 2015 Community, Visual Studio Team Services, and Visual Studio Code.

Among the others, if you subscribe for Dev Essentials you will also get Syncfusion's Essential Studio for Xamarin and for UWP for free! This is an incredible opportunity: as a Microsoft and Xamarin partner, Syncfusion produces amazing and easy-to-use controls that will let you be more productive than ever and will give you an option to create beautiful, responsive, and attractive apps for both business and entertainment.

Check it out!

Alessandro

posted @ mercoledì 24 agosto 2016 13:20 | Feedback (0) | Filed Under [ Visual Studio 2015 ]

venerdì 19 agosto 2016

Xamarin: use MacInCloud to compile apps for iOS with Visual Studio 2015

As you know, Xamarin allows you to build mobile apps for different platforms: Android, Windows, and iOS by using either Xamarin Studio or Visual Studio 2015. While for Android and Windows you have more freedom, with iOS you necessarily need a Mac (with XCode installed) to compile an app. And, notice "to compile". This is because of some Apple policies.

If you need to develop apps for iOS but you do not own a Mac, you can use a paid service called MacInCloud.
This company basically allows you to rent a Mac that you reach via remote desktop. You simply need a subscription, then you associate Xamarin to the Mac and.. ready to compile! I had a chance of using MacInCloud personally, so I'll describe how it works and I'll also provide some hints that you won't discover easily. Finally, this blog post is on Visual Studio 2015, but the same concepts apply to Xamarin Studio.

First, visit MacInCloud.com:



You will be able to compare available plans and select the best for you:



I personally tried the Pay-as-you-go plan, which is honest in my opinion. With 1$/hour you get all you need. Pay attention: if you choose this plan, you will be required to pre-pay the first 30 hours with 30$. Additional hours will be charged separately. When registering, pay also attention to the following:

  • Choose OS X "El Capitan". Do not choose Yosemite, because there are some compatibility issues with the latest versions of Xamarin.
  • Make sure you select to activate the remote build agent. This will charge you with additional 5$ but it is mandatory to make Xamarin able to connect to the remote Mac.
 
Once paid and registered, you will receive an email with important information such as: name and IP address of your remote Mac, a zip archive containing .rdp files for remote desktop connection, and of course user name and password you need to connect to the Mac. There are several .rdp files, each with a specific screen resolution. Select one and enter your credentials:



If everything is working fine, after a few seconds you will access your remote Mac:




Make sure you have port 6000 unblocked, or visit the FAQ page if you have problems. I had, and the MacInCloud team was very quick to respond and help. Your remote Mac already has all you need for development, including Xamarin Studio and XCode. The latter will not be used directly, but it is necessary because it contains the SDK that Xamarin invokes for the compilation process. Important: start XCode at least once before you do anything else with Xamarin. This is required to activate all the components.

Leave the remote connection open while working with Visual Studio, and remember to Logout when done, otherwise the hour counter will go on.

Now let's go to Visual Studio 2015. Follow these steps:

  1. Open Tools, Options, Xamarin, iOS Settings
  2. Click Find Xamarin Mac Agent
  3. In the dialog, click su Add Mac

First, add the IP address of the remote Mac (the IP, not the name), you received in the activation email:


Click Add. The underlying dialog will contain the name of the newly added Mac, but for now do not click Connect. Click Close instead:


At this point, you will go back to the Xamarin options. Leave blank the Apple SDK field, as it is in the default location on your remote Mac. You can select the Remote simulator flag if you want to debug your app in the local simulator on in the remote simulator. If you uncheck, it will run remotely.

Now open any Xamarin project. You might be asked to enter your Mac credentials, so enter your user name and password. If not when opening a project, credentials will be requested when starting the debug task.

In the toolbar, in the configuration combo box select the iPhone Simulator, then select one of the emulated devices from the list near the Start button. You will find different versions of iPhone and iPad.

Note that the remote Mac Agent must be fully started before compilation. When connecting to the Mac, you will see a success message in the status bar. When ready, simply press F5 or start debugging. The following figure shows the app running in the remote simulator, whereas the second figure shows the app running locally.



Of course, this is what you need to compile, debug, and test an app for iOS but you will also need to read the Xamarin and Apple documentation about publishing and distributing the app.

I was satisfied with MacInCloud and I hope this blog post is useful to you.

Alessandro

posted @ venerdì 19 agosto 2016 13:07 | Feedback (0) | Filed Under [ Xamarin ]

domenica 24 luglio 2016

VS 2015 Update 3: installing a NuGet package as a quick action in the Light Bulb

Among the others, my favorite feature in Visual Studio 2015 Update 3 is the option of adding a NuGet package as a quick action in the Light Bulb, when you type the name of an object that is not defined anyway in the solution. For instance, consider the following figure:




I'm trying to use an object called JsonConvert, which is neither part of the BCL nor defined inside any referenced library. So, if I enable the Light Bulb, I will find a new quick action that suggests me to install from NuGet the Newtonsoft.Json library, which actually defines the JsonConvert object. I need just one click to install the latest version of the library from NuGet, or I can decide to enable the NuGet UI in order to select a different version. In the first case, it's almost immediate:



As you can see, the library is downloaded from NuGet, installed, and referenced. Also, the proper Imports (or using in C#) directive is automatically added and the object is recognized properly.

Notice that this option is not enabled by default, so you first need to go to Tools, Options, Text Editor, Basic (or C#) in the Advanced node and select the option for NuGet suggestions:



A very useful feature, especially if you know in advance the name of objects you use and you want the IDE to do the job for your.

Alessandro

posted @ domenica 24 luglio 2016 19:09 | Feedback (0) | Filed Under [ Visual Studio 2015 ]

giovedì 7 luglio 2016

My new article on MSDN Magazine: local data with SQLite in Xamarin.Forms

Recently, I have been pretty busy with Xamarin, more specifically with Xamarin.Forms, so I decided to start sharing some of the things I learn on daily basis.

The July 2016 issue of MSDN Magazine is featuring a new article of mine, called "Working with Local Databases in Xamarin.Forms using SQLite".

As many of you already know, Xamarin.Forms allows you to build cross-platform apps for Android, iOS, and Universal Windows Platform using a single, shared C# code base and Visual Studio 2015. Because you might need to store local, structured data in your apps, SQLite is a good choice and this article explains how to leverage this lightweight, open source, serverless database to store information with an examples that uses data-binding techniques and LINQ.

Enjoy!

Alessandro

posted @ giovedì 7 luglio 2016 12:05 | Feedback (0) | Filed Under [ Visual Studio 2015 Xamarin ]

lunedì 2 maggio 2016

Visual Studio Code Succinctly, my new ebook

Here I go again I wanted to share that my new eBook Visual Studio Code Succinctly is available for free.




You probably know how Microsoft is strongly embracing open source and cross-platform development and Visual Studio Code perfectly fits into this. VS Code is a lightweight, open source and cross-platform code-centric development tool that runs on Linux, Mac OSX and Windows. With Visual Studio Code you can write cross-platform applications for the Web and the Cloud, as well as working with folders and code files with support for a large number of languages.

As usual, I tried to put inside this eBook my own experience, trying to bring the value of describing things that you do not usually find on the Web such as working with the Entity Framework, setting up a remote Git repository, or writing a language extension from scratch.

An important note: Visual Studio Code evolves fast and continuously, so some features might change and new features might be added as you read.

Have fun!

Alessandro

posted @ lunedì 2 maggio 2016 16:16 | Feedback (0) | Filed Under [ Misc Visual Studio 2015 ]

giovedì 25 febbraio 2016

Rosyn Succinctly, my new eBook

My new eBook "Roslyn Succinctly" is available under the popular Succintly series from Syncfusion.



I think I can say that Roslyn Succinctly is something unique. There's no much content about .NET Compiler Platform (that is, Roslyn), and it talks about open source VB and C# compilers, about the APIs they expose and how these can be invoked by other developer tools, that we can write too, and use these APIs the same way Visual Studio 2015 does.

This small PDF contains guidance about code analysis, custom domain rules, how you create custom refactorings, architecture, how you can publish your analyzers to NuGet, and how you leverage specific APIs to manage solutions, projects, and documents. As usual, I tried to put my own experience in this book and I tried to provide a logical guidance, which is something the official documentation lacks.

I'm pretty sure you won't regret about the time you'll spend reading this short ebook.

Alessandro

posted @ giovedì 25 febbraio 2016 21:19 | Feedback (0) | Filed Under [ Visual Studio 2015 .NET Compiler Platform (Roslyn) ]

venerdì 7 agosto 2015

Visual Basic 2015 Unleashed: my new book is available

It has been a long road, but my new book Visual Basic 2015 Unleashed is finally available.



It is not a simple update from the previous edition, Visual Basic 2012 Unleashed.

In the 2015 edition, I made significant revisions, fine-tuning contents as technology evolves from the Microsoft perspective. Also, I had the pleasure and the honor of featuring Anthony D. Green and Lucian Wischik from the Managed Languages team at Microsoft as the technical editors. They are the people who know Visual Basic better than any one on the Planet and their work has been invaluable to make this book even more accurate than the past.

If you read the previous editions, and if you are interested in the new one, you will immediately notice a new Chapter 1, called Introducing .NET 2015. The book starts describing the new vision of .NET, talking about .NET Framework 4.6 and the new .NET Core 5.

Among the others, the book explains the new code refactorings, all of the new language features including (but not limited to) the null-conditional operator, string interpolation, read-only auto-properties, partial modules and partial interfaces.

The most juicy chapters are about the .NET Compiler Platform (a.k.a. Project "Roslyn) and Windows 10 development. With these, you learn how to write a Roslyn analyzer and a code refactoring and how to start coding a truly universal Windows 10 app with Visual Basic.

To get a taste of the book, you can download Chapter 42 for free and the full companion code from the book site.

Enjoy!

Alessandro

posted @ venerdì 7 agosto 2015 14:35 | Feedback (0) | Filed Under [ Visual Basic Visual Studio 2015 ]

martedì 14 luglio 2015

New article series about Visual Basic 2015

I've started a new article series about Visual Basic 2015. More specifically, there are three new articles about the new code focused experience in VB and the .NET Compiler Platform.

You might find the articles on the InformIT web site:

Part 1 - The code focused experience in Visual Basic 2015
Part 2 - Live Code Analysis with Visual Basic 2015
Part 3 - Creating custom refactorings with VB 2015 (coming soon)

Enjoy!

Alessandro

posted @ martedì 14 luglio 2015 12:45 | Feedback (0) | Filed Under [ Visual Basic Visual Studio 2015 ]

Powered by:
Powered By Subtext Powered By ASP.NET