www.davidarodriguez.com

I drink coffee and program. Meh.

Navigation Menu

Cool libraries found by watching Scott Hanselman’s presentation at Xamarin’s Evolve conference

Posted by on May 16, 2013 in Blog | 0 comments

Cool libraries I found out about watching +Scott Hanselman presentation at+Xamarin Evolve conference:

http://xamarin.com/evolve/2013#session-umfpnw90c9

MVVM

  • MVVM Light Toolkit (portable fork)
  • MvvmCross
  • UpdateControls

IoC

  • Autofac
  • Ninject (portable fork)
  • PortableIoC
  • XPlatUtils (IoC and Messenger)

Other

  • Json.Net
  • MetroLog
  • Simple.Odata
  • OxyPlot
  • PushSharp
  • ZXing Barcode
  • MonoCross
Read More

Unable to run Window Store applications after compilation in Visual Studio | The package repository is corrupted

Posted by on Apr 25, 2013 in Blog, Visual Studio 2012, Windows 8 | 0 comments

I recently have been trying to work on GoGetter for Windows 8 and came across a problem after compiling my code. The issue was that the solution compiled correctly, but after a build I was unable to run the application by going to Debug->Start without debugging.

I tried cleaning the solution, yet that didn’t work either. So I tried running a new Windows Store application. Again, it compiled correctly but did not run. This ended being a conundrum. The error that always kept popping up was ”DEP0600 : The following unexpected error occurred during deployment: The package repository is corrupted. (Exception from HRESULT: 0x80073CFE)”.

DEP0600-0X80073CFE-ERROR

I searched and searched the web for a solution, but it really didn’t lead me anywhere. I found this thread that someone else was having the same issue:

http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/c8da65fe-dcf0-4a9f-9642-d340675b437f?utm_source=twitterfeed&utm_medium=twitter

I keep that thread in mind for reference and to contribute if i found a solution.

My friend David Garbacz, @garbaczd, pointed a couple of sites for me to look at. The first was a list of exceptions documented by Microsoft in regards to “Troubleshooting packaging, deployment, and query of Windows Store apps”.

http://msdn.microsoft.com/en-us/library/windows/desktop/hh973484(v=vs.85).aspx

The error was documented as:
ERROR_PACKAGE_REPOSITORY_CORRUPTED
0x80073CFE
The package repository is corrupted.
You may get this error if the folder referenced by this registry key doesn’t exist or is corrupted: HKLM\Software\Microsoft\Windows\CurrentVersion\Appx\PackageRepositoryRoot. To recover from this state, refresh your PC.

At first I disregarded the error. I didn’t want to refresh my PC. All of the currently installed apps would be wiped from my system. The files, however, would not be affected. So, I took a look at the second site he mentioned and this fix could be easy, but it didn’t work.

http://blogs.msdn.com/b/zxue/archive/2012/03/14/windows-8-developer-how-to-quick-fix-for-visual-studio-11-beta-deploypackagename-error.aspx

I did not have the “Create GUID” option in Visual Studio available. Not sure why. However, a few friends pointed me into the right direction on creating a GUID so I could try to fix it with the second link’s suggestion on fixing my issue.

Create new guid recommendations by friends from Twitter

I had to go to the “Developers Command Prompt for Visual Studio 2012″ command prompt rather than the regular command prompt and by typing “guidgen.exe”. This then displayed the “Create Guid” window I needed. I then tried the second link suggestion, but again this did not work for me.

Well, as the exception stated:
You may get this error if the folder referenced by this registry key doesn’t exist or is corrupted:
HKLM\Software\Microsoft\Windows\CurrentVersion\Appx\PackageRepositoryRoot.
To recover from this state, refresh your PC.

I checked the registry key and all looked good. So the only available choice I did have was to refresh my PC. I performed a system refresh by going to PC Settings->General->Refresh your PC without affecting your files.

The refresh took a while to do. I let it do its thing, while I worked on other things. After the refresh, first thing I installed was VS 2012 with Update 2. After that, I loaded my solution and compiled and ran. It worked. The refresh makes a list of all of the apps you had installed, now uninstalled, and saves it as a html document to your desktop. I ended having to re-install all of my apps, since most were uninstalled by the refresh. I am not necessarily thrilled about that.  Oh well, that is life. Hope this helps.

Read More

Tracking document views such as pdfs, spreadsheets, and presentations, using Google Analytic’s trackPageView

Posted by on Mar 22, 2013 in Blog, SEO | 0 comments

Sometimes, we like to measure the number of downloads of downloadable documents such as PDFs, spreadsheets, and presentations, measuring visitor access to this requires the use of virtual page views in the ga.js of Google Analytics. For instance, in my case I would like to track the number of clicks to the button that promotes the sell of my app GoGetter. Originally, I used simple HTML as the following:

<a id=”buyNowBreadCrumb” href=”http://www.windowsphone.com/en-US/apps/3c3f7634-0307-e011-9264-00237de2db9e”>Buy now for $2.99</a>

This hyperlink would navigate to the app in the MarketPlace. To make a click on this link trackable as virtual page view I would add an onclick attribute that would call trackPageview. One thing to consider is that trackPageview takes some time to complete, very little time. So, make sure you have target=”_blank” attribute on the link so the processing can be processed in the background of the new window that opened. If the processing is interrupted by the user navigating to the new page, you may lose that virtual page view.

<a id=”buyNowBreadCrumb” href=”http://www.windowsphone.com/en-US/apps/3c3f7634-0307-e011-9264-00237de2db9e” target=”_blank” onclick=”_gaq.push(['_trackPageview', '/buynow']);”>Buy now for $2.99</a>

As you can see from the screenshot below, Google Analytics was able to capture this click. In the case of downloadable documents and media you would track them such as:

_gaq.push(['_trackPageview', '/index/how-to-get-sales.pdf']);

_gaq.push(['_trackPageview', '/index/how-to-get-sales.docx']);

_gaq.push(['_trackPageview', '/index/how-to-get-sales.xls']);

You can practically using any string to identify the media being downloaded. But those were some basic examples.

 

Tracking document views such as pdfs, spreadsheets, and presentations, using Google Analytic's trackPageView

 

Read More