Tuesday, December 29, 2015

SharePoint Server 2016 Beta 2 now available for download

SharePoint Server 2016 Beta 2 is now available for download here: https://www.microsoft.com/en-us/download/details.aspx?id=49961

You can read more about SharePoint Server 2016 Beta 2 here: https://blogs.office.com/2015/11/18/announcing-sharepoint-server-2016-beta-2-and-project-server-2016-beta-2/


Monday, December 21, 2015

Mozilla Firefox 64-bit vs. Google Chrome 64-bit

Ever since Mozilla Firefox FINALLY released a 64-bit version of their browser, I began comparing my usage of numerous tabs open in Mozilla Firefox and Google Chrome.

After closing and re-opening Firefox numerous times, I had no trouble re-loading Firefox even with 100+ tabs open.

However, as soon as I attempted to accomplish the same thing with Google Chrome with even only 50+ tabs open, I got the following error message:






I could neither kill the offending tab nor wait a sufficient time for the browser to finally load the page!

This problem effectively deadlocked my Google Chrome browser and prevented it from loading any other pages making my Google Chrome browser COMPLETELY USELESS!!

I tried closing and re-opening Google Chrome numerous times in order to rectify this problem, but it seemed to make no difference.

Needless to say, Google Chrome does not handle a large number of tabs open simultaneously very well.

I looked at how Google Chrome was storing my browsing data and I found this:



The amount of data that Google Chrome was storing and caching significantly slows down the browser after a period of time and prevents pages from loading quickly.  Until you clear out your cache and browsing history, Google Chrome will continue to run very slowly!

I will continue to use Google Chrome as part of my development processes and testing, but I will now more heavily rely on Mozilla Firefox 64-bit to handle my MAJOR web researching and browsing needs!!

Friday, December 18, 2015

Validating Input Parameters in PowerShell

If you need to validate Input Parameters in PowerShell for your PowerShell scripts, you will definitely want to take a look at these articles which provide useful insight on how to specify a set of validation attributes you can provide for your PowerShell Input Parameters:

http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/15/simplify-your-powershell-script-with-parameter-validation.aspx

http://learn-powershell.net/2014/02/04/using-powershell-parameter-validation-to-make-your-day-easier/

https://technet.microsoft.com/en-us/library/dd878347%28v=vs.85%29.aspx

In my case, I needed to validate my PowerShell Input Parameters using ValidateSet, but you can use any number of these validation attributes to validate input in your own PowerShell scripts!

Thursday, December 17, 2015

Incredibuild now included with Visual Studio 2015

Visual Studio 2015 now includes a brand new project template under Other Languages called Build Accelerator.

 Selecting this template allows you to install Incredibuild free of charge for use within Visual Studio 2015 RTM or Visual Studio 2015 Update 1.

You can read more about Incredibuild that is included with Visual Studio 2015 here: http://blogs.msdn.com/b/visualstudio/archive/2015/11/30/improving-your-build-times-with-incredibuild-and-visual-studio-2015.aspx

If you want to learn more about Incredibuild, you can watch these Channel 9 videos:

https://channel9.msdn.com/Events/Visual-Studio/Connect-event-2015/802

https://channel9.msdn.com/Events/Visual-Studio/Connect-event-2015/803

You can also check out a more full-featured version of Incredibuild for yourself here: https://www.incredibuild.com/


Installing Windows PowerShell v. 4.0 on Windows Server 2008 R2

I recently had to install PowerShell v. 4.0 (https://www.microsoft.com/en-us/download/details.aspx?id=40855) on a Windows Server 2008 R2 server and I noticed that after installing PowerShell v. 4.0, running $PSVersionTable still only showed v. 2.0!

Well, I did a bit of digging through PowerShell articles and came across this insightful article: http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx

It provided this very useful information:

Scenario: Installing WMF 4.0 on a computer that is not running .NET Framework 4.5 will report that the installation is successful, but the components of WMF 4.0 (such as Windows PowerShell, WMI, etc.) will not be updated.
Solution: Install .NET Framework 4.5, and then run the WMF 4.0 installer again.

It also pointed to this article: http://blogs.msdn.com/b/powershell/archive/2013/10/29/wmf-4-0-known-issue-partial-installation-without-net-framework-4-5.aspx 

As it turned out, .NET Framework v. 4.5 was not installed on this server, and therefore I needed to install .NET Framework v. 4.5 BEFORE installing PowerShell v. 4.0!!

After I did this, my PowerShell version correctly displayed v 4.0!



No snap-ins have been registered for Windows PowerShell version 4 for SQL Server Snap-in

I was recently using the following line in one of my PowerShell scripts to run SQL Server database commands:

Add-PSSnapin SqlServerCmdletSnapin100

However, I was suddenly faced with this error message:

Add-PSSnapin: No snap-ins have been registered for Windows PowerShell version 4.

Huh??  I had installed SQL Server Management Studio, so I assumed that the PowerShell tools would be installed and available.

Well, as it turns out, I needed to install the PowerShell Tools and Shared Management Objects from the SQL Server 2014 Feature Pack here: https://www.microsoft.com/en-us/download/details.aspx?id=42295

Once I did that, I could simply use Invoke-SQLCmd directly in my PowerShell scripts, or I could simply use this line instead:

Import-Module SQLPS -DisableNameChecking

That was enough to get my PowerShell scripts which invoked SQL commands to work!

Wednesday, December 16, 2015

Firefox 64-bit for Windows finally available!!

The Mozilla Foundation has FINALLY released a 64-bit version of their Mozilla Firefox browser!!

You can read more about the Firefox 64-bit release here: https://blog.mozilla.org/futurereleases/2015/12/15/firefox-64-bit-for-windows-available/

Lastly, you can download the 64-bit version from here: https://www.mozilla.org/en-US/firefox/all/

Woo hoo!

IP and Network Scanner for Windows

I was recently helping a friend determine the devices on his network when we discovered that his router was so old that it did not list out the attached devices on the network!

Therefore, I decided to start searching for networking tools that would list out all of the devices on the network and came across Advanced IP Scanner: http://www.advanced-ip-scanner.com/index2.php

It allowed me to easily scan all of the devices on the network and not only list out the names of the devices and their respective IP addresses, but also the manufacturer of many of the devices such as Samsung, Apple, Lite-On etc.!

It was a very handy tool to do network discovery and I would recommend it to anyone that may find themselves in a similar situation with no easy way to determine the network devices directly from the router.

Tuesday, December 15, 2015

Available Plugins for TeamCity

If you are looking for information about some of the Plugins in TeamCity as well as how to install Plugins in TeamCity, you can check out this article: https://www.jetbrains.com/teamcity/plugins/

For a comprehensive list of available TeamCity Plugins, you can check out this link: https://confluence.jetbrains.com/display/TW/TeamCity+Plugins

The Plugins labeled with a JB icon are Plugins provided directly by Jetbrains while other Plugins are provided by various 3rd party developers/companies.


Monday, December 14, 2015

Database Migration Tools to SQL Server

If you have ever had to perform a database conversion, you might be wondering what tools are available to perform database conversions.

I have used several tools in the past for my wide variety of database conversions from different platforms such as Informix and Oracle to SQL Server:

  1. Altova MapForce: http://www.altova.com/mapforce.html
  2. EMS Data Pump: http://www.sqlmanager.net/en/products/datapump
  3. Spectral Core Full Convert: https://www.spectralcore.com/fullconvert
  4. SQL Server Migration Assistant: http://blogs.msdn.com/b/ssma/archive/2014/08/21/latest-update-microsoft-sql-server-migration-assistant-ssma-v6-0-is-now-available.aspx

Out of all the tools, the one that I found the easiest to use and most user friendly was definitely Spectral Core Full Convert.  It was also the most affordable and the technical support they provided was also excellent!

You can decide for yourself which tool is your favorite!   

Wednesday, December 9, 2015

Figuring out Build Parameter values in TeamCity

If you work with build parameters in TeamCity, you may configure your own build parameters, or you may end up using the built-in build parameters that TeamCity provides.

The problem with using TeamCity's build parameters though is that it is not easy to determine what the expected values are based on their names!

So how exactly do you figure out what the values are for each of these pre-defined build parameters?

Quite easily in fact!  You simply run a build in TeamCity for your build configuration!

Now, when you go into the dialog for the completed build, you will see an option for "Parameters"





When you click on Parameters, you will see a list of all the values populated for the TeamCity Parameters:




Now, you can see all of the values that TeamCity is using for all of the various parameters and you can use them accordingly in your build steps and build configurations!



Adding additional Jar files to Ant ClassPath in TeamCity

I recently began working with Java again after a period of many, many years and had to start working with Ant to perform some Java builds.

Well, I soon discovered that, unlike MSBuild, Ant does not have a built-in XMLTask!!

There is a company that has provided this functionality to Ant in the form of a separate .jar file called xmltask.jar.  http://www.oopsconsultancy.com/software/xmltask/  On the downside, since this is not included as part of Ant, you have to specify the path to the .jar file while you are building your Ant script.

TeamCity supports this through Ant command line parameters in the Ant Build Step:  https://confluence.jetbrains.com/display/TCD9/Ant

You specifically need something like the following line to reference your additional Ant libraries:
-lib "%teamcity.tool.ant-net-tasks%"

In my case, I ended up using the following path:
-lib C:\BuildTools\xmltask.jar



That was all that was needed to get my Ant build script to build!!



 

Understanding TeamCity Checkout Rules

At some point in time while using TeamCity, you may find that you need to provide checkout rules to control the directory or directories in which TeamCity pulls code from your source control tree (VCS Root).

Well, if you read over the dialog for the checkout rules, you may find this very confusing at first:







If you read over the TeamCity documentation on using checkout rules, it is only slightly more helpful: https://confluence.jetbrains.com/display/TCD9/VCS+Checkout+Rules

Therefore, what is an actual example of how to use checkout rules?


In this dialog, I am using +:. (the . means the root of the checkout directory) and mapping it to a Common directory by using the => notation. 


Thus, TeamCity will create a Common directory on the file system before pulling the source code from the VCS Root/Source Control Repository.  Then, it will automatically take the contents of the VCS Root and place it in the Common directory instead of in the root of the build checkout/build working directory. 

That is all there is to it!!

Simpler than you thought, huh???





Creating a directory structure tree recursively in PowerShell

I was recently working on converting some command-line scripts over to PowerShell and I discovered a very lengthy script that was using a long series of mkdir commands to create one directory after the other in a directory tree.

Ultimately, the mkdir command was simply trying to make the deepest folder in the directory structure.

However, accomplishing this using PowerShell is extremely easy using the New-Item command!

This command will create the entire directory structure in the folder tree/folder hierarchy for you automatically:

New-Item "C:\Temp\distribution\package\db\Scripts\SQL Server" -ItemType Dir

Using Visual Studio Publish Profiles in TeamCity

If you want to use Publishing Profiles while building your Visual Studio solutions in TeamCity, you will discover that it is relatively easy to accomplish!

First of all, you will want to create 2 System Properties (under the Parameters for the Build Configuration Settings):

  1. system.PublishProfile - set to the value of your PublishProfile (such as Release)
  2. system.DeployOnBuild - set to true
That is all that is needed!  Now, when TeamCity builds your Visual Studio solution, it will automatically pass these parameters to your Visual Studio build step as MSBuild Command line parameters.

If you then take a look at your Build Configuration's Build Log, you will notice that these parameters are being passed to your Visual Studio build so that your Publishing Profile is being executed!


Tuesday, December 8, 2015

Exciting changes in Advanced Installer

Over the past several releases Advanced Installer has made great strides in improving their software to be more aligned with the features and capabilities of InstallShield by providing better dialog support and additional command line support.

The latest release as of this writing (v. 12.6) has numerous enhancements and improvements that I have personally waiting for more than a year!

You can read the version notes for this latest release of Advanced Installer here: http://www.advancedinstaller.com/release-12.6.html#enhancements

Does destination specify a file name or directory name on the target while using XCopy

I was recently setting up some build steps to use XCopy when I suddenly encountered the following error message:

Does destination specify a file name or directory name on the target (F = file, D = directory)? 

Well, there was a lot of confusion about how to solve this issue even after reading this TechNet article: https://technet.microsoft.com/en-us/library/bb491035.aspx 

While the TechNet article advises using the /i switch, that will not work when you are dealing with just a single file.

Therefore, the better approach is to simply modify your XCopy command to use the following instead:

xcopy C:\SrcDir\SrcFile.txt  C:\DestDir\* /Y

This will allow you to avoid getting the File or Directory prompt and allow you to run your scripts unattended!

Handling Inner Exception Messages in C#

If you have ever needed to log Inner Exception Messages, you may have encountered instances when you cannot directly use the .InnerException.Message property because the value may be null.  In addition, if you have a series of exceptions that occurred then you will need to recursively log all of the exceptions that occurred in the entire call stack.

Well, fortunately, you can implement this functionality as an Extension Method! 

The code to implement this Extension Method can be found here: https://britebit.wordpress.com/2014/05/16/unwrap-inner-exception-messages/

It is also available on GitHub here: https://gist.github.com/harrybiscuit/e84a9728e66958f3fde7#file-unwrapinnerexceptionmessages-cs

Monday, December 7, 2015

Generate Help Files from your Visual Studio XML Comments

If you want to generate Help Files from your Visual Studio XML Comments, there are numerous tools available to accomplish this including Doxygen and Sandcastle HelpFile Builder, but there are very few tools I found which integrate with the Visual Studio IDE.

I ended up looking at the following tools as options to generate Help Documentation directly from within Visual Studio:

  1. VSDocMan: http://www.helixoft.com/vsdocman/overview.html
  2. GhostDoc: http://submain.com/products/ghostdoc.aspxv
  3. Document! X: http://www.innovasys.com/product/dx/overview
  4. Doc-O-Matic: http://doc-o-matic.com/
  5. Help+Manual: http://www.helpandmanual.com/index.html
Out of all of the available options, GhostDoc offers the cheapest solution for a Personal User License at a cost of only $50/user!


Storing TeamCity Project Settings in Team Foundation Server Version Control

If you have read about the feature in TeamCity which allows you to store Project Settings in a version control repository, you may also know that it has not supported Team Foundation Server in the past: https://confluence.jetbrains.com/display/TCD9/Storing+Project+Settings+in+Version+Control

Well, fortunately, that has now changed with the release of the new TeamCity Plugin to support TFS!  http://blog.jetbrains.com/teamcity/2015/12/teamcity-cross-platform-tfs-support/

With the release of this plugin, you will be able to store your TeamCity Project Settings in TFS as well as support platforms other than Windows! 

Currenly, the plugin targets TeamCity 9.x, however, the future release of TeamCity 10.x will have this plugin built right in!

I am definitely eager to try out this new plugin and cannot wait for TeamCity 10.x to be released!

Friday, December 4, 2015

Passing parameters/arguments to an XSL Style Sheet using C#

If you are using XSL Style Sheets in your C# code, you may eventually have a requirement to pass arguments to your XSL Style Sheets.

Fortunately, Microsoft has a solution allowing you to accomplish just that!

You can use the XsltArgumentList class and use the AddParam method to pass arguments to the your XslCompiledTransform Transform method.

You can read more about how to accomplish this here: https://msdn.microsoft.com/en-us/library/ms163439%28v=vs.110%29.aspx


OzCode for Visual Studio Debugging

I was recently browsing around the MSDN site while I was doing some .NET research when I suddenly came across this website: http://www.oz-code.com/

The site promises "Your Road to Magical Debugging".

Well, I decided to read more about the features of OzCode here: http://o.oz-code.com/features

After reading about the features, I was incredibly impressed and decided to download a trial for myself.

When I am doing a lot of debugging, particularly when I am refactoring and learning new code, I tend to write lots of expressions in the Immediate Window and adding a lot of values into the Watch windows.  I also tend to lose a lot of time when I encounter exceptions in the code base when I am trying to figure out how some code or a .NET class works.

Much to my surprise, OzCode lived up to all of its expectations!  I was able to view exceptions before they were going to occur and I could easily hover over all the variables in my code at a single glance (using Magic Glance) to see their values without having to write them into expression windows.  Whenever I encountered if statement blocks, OzCode would immediately highlight which code was going to execute in the if block. 

After using it for just a day, I was so amazed by the time savings that it provided, that I decided to buy it that same day!

You can try it out for yourself and see how it really provides "The Road to Magical Debugging".

If you like it as much as I do, if you are an MSDN Subscriber, you can snag yourself a 20% discount off licenses of OzCode: http://www.oz-code.com/promotion?discountCode=MSDN_Subscriber

Happy Debugging!

Thursday, December 3, 2015

.NET Framework v. 4.6.1 and Developer Targeting Packs

.NET Framework v. 4.6.1 was recently released and along with it the Developer Targeting Packs were also released!  The Developer Targeting Packs allow you to target .NET Framework v. 4.6.1 using older Visual Studio IDEs such as Visual Studio 2012 and Visual Studio 2013.

You can read more about the .NET Framework v. 4.6.1 release here: http://blogs.msdn.com/b/dotnet/archive/2015/11/30/net-framework-4-6-1-is-now-available.aspx

You can download the Developer Targeting Pack here: http://www.microsoft.com/en-us/download/details.aspx?id=49978

Free Code Review for Git, Mercurial and Subversion

If you are looking for a free code review tool as part of your development processes, you will be happy to know that Jetbrains (the maker of TeamCity and Resharper) is offering a free 10-user license of Upsource!

You can read more about Upsource here: https://www.jetbrains.com/upsource/

If you need more than 10-user licenses, you can purchase additional user licenses: https://www.jetbrains.com/upsource/buy/

Setting a Build Parameter in TeamCity from within a Build Step

I recently had a requirement to set a TeamCity Build/Configuration parameter from one of my build steps so that I can use this value in a subsequent build step.

Normally, TeamCity has numerous built-in operations and values that you can leverage throughout your build configurations, but what about the scenario where a built-in TeamCity value or plug-in cannot meet that need?  Well, fortunately, TeamCity has a solution for that in the form of Service Messages!  https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-AddingorChangingaBuildParameter

When I first read this section of the documentation, however, I was extremely confused as to how to leverage this in my own Build Configuration.

First of all, I needed to create/define the necessary build parameter in my Build Configuration as defined int the documentation.  In this instance, I needed to create a System parameter called BUILD_TIMESTAMP.  

If I fail to define the required build parameter before running my build, I will receive an error stating that my build agent is unable to run a compatible build configuration, therefore, it is very important that you define the build parameters that you need ahead of time.

Once I had that in place, fortunately, a quick test in TeamCity led me to the answer I needed.

My particular requirement was to set a Build Timestamp, therefore, in my PowerShell script, I did something like the following:
$currentDate = Get-Date -Format yyyyMMdd

 

Write-Host "##teamcity[setParameter name='system.BUILD_TIMESTAMP' value='$currentDate']"

Now, when I want to use that value in any subsequent Build Steps, I can simply use the %system.BUILD_TIMESTAMP% value as a parameter anywhere else in my Build Configuration.

 A quick output in a subsequent PowerShell script Build Step yielded the required result!


Write-Host %system.BUILD_TIMESTAMP%


Visual Studio 2015 Update 1 First Look

I decided to go ahead and update my Visual Studio 2015 RTM installation to Visual Studio 2015 Update 1 the other day, so I thought I would share some of the visible changes that I noticed immediately:

  1. The Visual Studio 2015 icon changed and now looks different than the earlier Visual Studio 2013 icon
  2. The Send a Smile icon in the top right hand corner has now changed and is instead labeled "Send Feedback" with a drop down menu containing the following menu items:
    • Report a Problem
    • Provide a Suggestion
    • Rate This Product
    • Settings
  3. The NuGet Package Manager has had some major updates to the interface providing for a much more user friendly experience.







These are just some of the obvious things that I noticed as soon as I installed it.  I will be updating this post as I continue to find new things in this welcome update!

The network bridge on device 'VMnet0' is not running

I recently went through a Windows 10 Update and when I subsequently starting my using VM in VMWare Workstation, I noticed that I no longer had network connectivity!

I attempted to connect my Network Adapter in my Guest VM when I suddenly encountered the following error message:






Fortunately, it seems this problem is widespread and is reasonably well document on the Internet in the form of YouTube videos such as this one: https://www.youtube.com/watch?v=CWqZg25YUTY

If you want to save yourself the time of watching the YouTube video, this is what I did:


  1. Go to your Network Adapter
  2. Right click and go to Properties
  3. Click on Install...
  4. Select Service and click on the Add... button
  5. Select VMWare Inc.  and the VMWare Bridge Protocol
  6. Click OK
  7. The VMWare Bridge Protocol should now be checked in the Network Adapter Properties
  8. From the Services Applet (services.msc) restart the VMWare DHCP Service and VMWare NAT Service
  9. Now try connecting your Guest VM's Network Adapter
  10. You should have network connectivity in your Guest VM now!







You may also be able to use "Restore Defaults" from the Virtual Network Editor, but this will wipe out any network settings that you may have configured in the Virtual Network Editor:

  1. Click on the Edit menu from VMWare Workstation
  2. Click on Virtual Network Editor
  3. Click on Change Settings... 
  4. Click on Restore Defaults
  5. This will reinstall the virtual network settings on your network adapter as well

Wednesday, December 2, 2015

Visual Studio 2015 Update 1 and Team Foundation Server Update 1 now available!

Visual Studio 2015 Update 1 and Team Foundation Server Update 1 are now available for download:

https://www.visualstudio.com/news/vs2015-update1-vs

https://www.visualstudio.com/news/tfs2015-update1-vs

 They both contain a large variety of updates and fixes, so they will probably be worthwhile releases to install on your existing installations of Visual Studio 2015 and Team Foundation Server 2015!


MSBuild command line parameters contain "/property:" or "/p:". It is recommended to define System Property on Build Parameters instead

I recently needed to pass some additional parameters to my Visual Studio build in TeamCity and I passed the parameters in the Visual Studio Build Step as follows:


As you can tell from the above screenshot, I was passing traditional command-line parameters to MSBuild (/p:PublishProfile=Release /p:DeployOnBuild=True) when I suddenly encountered the following error message in the build log:

MSBuild command line parameters contain "/property:" or "/p:". It is recommended to define System Property on Build Parameters instead

Well, the error message was very cryptic and an Internet search did not return any useful results with solutions.

Fortunately, though I found this article which hinted at the solution: https://johanleino.wordpress.com/2013/03/19/using-teamcity-for-asp-net-development-part-2/

I then read this TeamCity article: https://confluence.jetbrains.com/display/TCD9/Defining+and+Using+Build+Parameters+in+Build+Configuration

This informed me that TeamCity automatically passes all System Parameters to the Build Configuration without any additional effort.  Of course, this ultimately led me to the conclusion that I simply needed to define System parameters in my Build Configuration for PublishProfile and DeployOnBuild (my MSBuild Command Line Argument properties) and ignore passing any values on the command line whatsoever!

This is what finally worked for me:




Changing the Encoding of a document using Notepad++

If you ever have to deal with different types of Encoding and having to convert back and forth between different encodings (such as UTF-8 and UTF-16), then you will be glad to know that this can be easily accomplished using Notepad++!

  1. From the Notepad+ application, select the Encoding menu
  2. Select the appropriate type of Encoding or Conversion you want to produce
Now when you save your document using Notepad++, the document will be saved using the specified Encoding!



You can download Notepad++ from here: https://notepad-plus-plus.org/download

Very affordable Xml Editor for XML, XSL/XSLT and DITA

If you are looking for a sophisticated Xml Editor for a very affordable price with support for a wide variety of standards including DITA, I would definitely check out Oxygen XML Editor: https://www.oxygenxml.com/

The Personal license of Oxygen XML Editor provides a license for 2 of their products:
  • Oxygen XML Editor
  • Oxygen XML Author
 For only $200 ($240 including 1-year of maintenance), you get the same capabilities as are offered in their Professional edition as well as many of the same features and functionality that would be found in more expensive XML editing suites such as Altova XMLSpy or Stylus Studio at a small fraction of the cost!  Neither XMLSpy nor Stylus Studio offer a "Personal" edition license, therefore, providing an even more compelling reason to consider Oxygen XML Editor for your own use.

You can buy Oxygen XML Editor from here: https://www.oxygenxml.com/xml_editor/buy_oxygen_xml_editor.html

To read more about the licensing requirements for purchasing Personal edition, you can check out this page: https://www.oxygenxml.com/buy_personal.html



Using dotnetrdf and SPARQL

I recently started working on a project that required use of the RDF standard and so I immediately started searching for any .NET libraries that would support this standard and I came across dotnetrdf which is available for download from here: http://dotnetrdf.org/ or also available as a NuGet package.

Well, one of the requirements for working with RDF on my project was to use SPARQL so I immediately began digging into the User Guide to figure out how to accomplish this.

Based on the dotnetrdf documentation, there are 2 main sections that you have to review to begin working with SPARQL:

Unlike using a query language such as T-SQL with SQL Server, SPARQL uses different processing engines for Select statements vs. Insert, Update and Delete statements.

Therefore, if you are using Select SPARQL queries, you will want to read the Querying with SPARQL section and you will be using the SparqlQueryParser and SparqlResultSet classes.

However, if you are using Insert, Update or Delete statements, you will want to read the Updating with SPARQL section and you will be using the SparqlUpdateParser and SparqlUpdateCommandSet classes.

When you finally need to execute your queries or updates against your SPARQL server (such as Apache Jena Fuseki https://jena.apache.org/download/index.cgi) you will most likely be using the
SparqlRemoteEndpoint or SparqlRemoteUpdateEndpoint classes.

That is pretty much all there is to using dotnetrdf with SPARQL!!

PluralSight offering 40% Off subscriptions!

As part of Cyber Monday, PluralSight is offering 40% off of new subscriptions!

You can sign up for a new PluralSight subscription from here: http://app.pluralsight.com/signup?discountCode=cyber154&oid=&promo=&utm_campaign=&utm_content=&utm_medium=&utm_source=&utm_term=&wid=701j0000001e4X1AAI

If you are an existing PluralSight subscriber, you are still eligible for 40% off of your renewal by clicking on this link: https://learn.pluralsight.com/offers/cyber-monday/subs-save-40--percent-on-pluralsight?mkt_tok=3rkmmjwwff9wsrolvqzbzkxonjhpfsx56eqvxqoxlmi%25252F0er3fovrpufgji4ht8nni+sldweygjlv6sgfsbddmar1yrgkxxq%25253D&oid=&promo=&utm_campaign=cyber-monday&utm_content=active-live&utm_medium=email&utm_source=marketo&utm_term=&vid=701j0000001e4gRAAQ

This offer expires December 6th, so act quickly!!

Tuesday, December 1, 2015

Firefox Developer Edition

If you are looking for a 64-bit version of Firefox and are willing to try out experimental build versions of Mozilla Firefox, then you should try out Firefox Developer Edition: https://www.mozilla.org/en-US/firefox/developer/all/

Firefox Developer Edition offers regular build updates and provides both 32-bit and 64-bit versions of Mozilla Firefox for Windows!


Using Xml Comments for ASP.NET Web API Help Pages

I had recently installed the Help Page NuGet package for my ASP.NET Web API project (https://www.nuget.org/packages/Microsoft.AspNet.WebApi.HelpPage/) but I noticed that none of my Xml Comments were appearing in the Web API Help Pages!

Well, fortunately, I came across this article: http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/creating-api-help-pages

I discovered there was a line in HelpPageConfig.cs under the HelpPage Area (Areas/HelpPage/App_Start/HelpPageConfig.cs) that was preventing the Xml Comments from appearing in my Web API Help Pages!
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/XmlDocument.xml")));

I found this code on line 37 of my HelpPageConfig.cs file in the Register method.



I also discovered that the Xml Documentation file path could be either: App_Data/XmlDocument.xml or App_Data\XmlDocument.xml, though App_Data\XmlDocument.xml is the common document file path on Windows machines.

Once I followed the guidelines outlined in the article to use Xml Comments as well as ensuring that my project was generating and outputting Xml Comments to the correct location, I could view my Xml Comments in my Web API Help Pages!

Unfortunately, my C# Xml Comments only served to provide some partial documentation since it did not cover all of the other areas that were required in the Web API Help Pages, however, it was a good starting point to documenting my ASP.NET Web API methods!

Creating an external link in ASP.NET MVC

I have been using ASP.NET MVC for a very long time and have frequently used @Html.ActionLink throughout my code base, but I recently needed to create a static link to the Web API Help and I was wondering if there was a standard way of creating a hyperlink using an MVC Razor Html Helper that did not need to go through an MVC Controller.

Well, fortunately, there is!

Instead of using @Html.ActionLink, you simply use @Html.RouteLink as follows:

@Html.RouteLink("Help", new { }, new { href = "/help" })
That was all there is to it!!

Amazon EC2 vs Windows Azure

I have been using Windows Azure extensively for the last several years, so when I recently started working on a new project, using Amazon EC2 was relatively new to me.

In the time since I started working on my current project, we stood up numerous Windows Servers one after the other in order to meet our development needs.

However, when I recently attempted to start up our Continuous Integration Build Server running in the Amazon EC2 cloud, I was surprised to discover that I could not start up the virtual machine!

As it turns out, Amazon EC2 had reached capacity for one of their cloud servers and therefore were not able to provide sufficient resources to even start the virtual machine!

Based on my own experience with Windows Azure, I was completely surprised by this response, but it was indeed the reason for why the virtual machine could not be started.  Even after informing Amazon EC2 support about the issue, an entire day of productivity was ultimately lost because the issue was not rectified quickly. 

If you are a Windows .NET developer, choosing Windows Azure is common sense because of the tight integration between Visual Studio and Azure for development and deployment.  Also, since Microsoft knows Windows better than any other company in the world, they are the ideal candidate to host your Windows server virtual machines!!  Microsoft's Windows Azure Portal is also constantly being updated/refreshed with new features and functionality as well as updates to their PowerShell cmdlets to support various Windows Azure self-service operations.  Microsoft further sweetens the deal when it comes to hosting on Windows Azure by offering a credit of up to $150/month for existing MSDN subscribers! 

Therefore, when you are considering standing up your Windows environment on either Amazon EC2 or Windows Azure, I would definitely choose Windows Azure!

If you are an existing MSDN Subscriber, you can start using your benefits here:  https://azure.microsoft.com/en-us/pricing/member-offers/msdn-benefits/?WT.srch=1&WT.mc_ID=SEM_cuCfnmnZ

If you are not currently an MSDN Subscriber, but would like to try out Windows Azure for yourself, Microsoft offers a free 1-month trial as well as a $200 initial credit if you end up signing up for Windows Azure services.  https://azure.microsoft.com/en-us/pricing/free-trial/ 

Mozilla Firefox vs. Waterfox

I have been waiting for a very, very long time for Mozilla Firefox to release a 64-bit version that was originally promised several months ago so I consequently switched over to Waterfox--a 64-bit derivative version of Mozilla Firefox.

This was primarily due to the reason that opening a very large number of tabs in Mozilla Firefox was causing the browser to crash often and become very sluggish.

However, it seems that with the latest releases of Mozilla Firefox (v. 42.0 as of this writing), this problem has been resolved!

Instead, I am now finding that Waterfox by far is a much more sluggish browser when it comes to opening a large number of tabs (presumably because the community of developers working on Waterfox is considerably smaller than those working on Mozilla Firefox).

As you may have discovered if you install Waterfox and Mozilla Firefox on the same machine, because they both use the Mozilla engine, either Waterfox or Mozilla Firefox can be running at any given time--they can never be running at the same time.  However, this unique property also allows them to share the same settings including the tabs they open!

In a test that I did of opening 50+ tabs in Waterfox and Mozilla Firefox, opening the same exact same set of tabs caused Waterfox to become so sluggish that it could take a minute or more to load a single web page, while Mozilla Firefox handily managed loading a new web page very speedily in a matter of seconds!

While I would still like to see a 64-bit version of Mozilla Firefox be released in the near future, now that most of the performance issues have been resolved, I am going to revert to using the 32-bit version of Mozilla Firefox for the foreseeable future!