News

VS 2013 and PCL issues

2013-09-20 15:51:56 by Kjell-Åke Gafvelin

The other day I installed Windows 8.1 RTM and VS 2013 RC to try it out and use it as my main development platform for my Windows 8 apps. I then booted up VS 2013 and was going to continue development on podstaX to make it use a Portable Class library for the shared code and separate projects for the Windows 8 and Windows Phone 8 UI. But when I tried to compile i got the following errors (as of now I didn’t re-target the Windows 8 project to a Windows 8.1 project).

The type or namespace name 'WindowsAzure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
The type or namespace name 'MobileServiceClient' could not be found (are you missing a using directive or an assembly reference?)
The primary reference "Microsoft.WindowsAzure.Mobile" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "Microsoft.WindowsAzure.Mobile" or retarget your application to a framework version which contains "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "System.Net.Http.Extensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "System.Net.Http.Extensions" or retarget your application to a framework version which contains "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "Microsoft.Threading.Tasks" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "Microsoft.Threading.Tasks" or retarget your application to a framework version which contains "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "Microsoft.Threading.Tasks.Extensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "Microsoft.Threading.Tasks.Extensions" or retarget your application to a framework version which contains "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "System.Net.Http" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "System.Net.Http" or retarget your application to a framework version which contains "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "Microsoft.WindowsAzure.Mobile" could not be resolved because it has an indirect dependency on the framework assembly "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "Microsoft.WindowsAzure.Mobile" or retarget your application to a framework version which contains "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "System.Net.Http.Extensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "System.Net.Http.Extensions" or retarget your application to a framework version which contains "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "Microsoft.Threading.Tasks" could not be resolved because it has an indirect dependency on the framework assembly "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "Microsoft.Threading.Tasks" or retarget your application to a framework version which contains "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "Microsoft.Threading.Tasks.Extensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "Microsoft.Threading.Tasks.Extensions" or retarget your application to a framework version which contains "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "System.Net.Http" could not be resolved because it has an indirect dependency on the framework assembly "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile158". To resolve this problem, either remove the reference "System.Net.Http" or retarget your application to a framework version which contains "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

I took a while until I realized how to resolve the issue. The main problem was the targeting of the PCL project! I use the Azure Mobile Services SDK loaded via NuGet in that project and for some reason VS 2013 cannot handle a PCL with the AMS SDK and Silverlight 5(Windows Phone 7.8) targets.

So to resolve this I did the following:

  1. Un-installed the Azure Mobile Services SDK via Nuget Package Manager.

    image 
  2. Change the target framework for the PCL project to

    image
  3. And then install the Azure Mobile Services SDK again.

    image
  4. Compile and enjoy!


|

VS2010 Certificate error when installing extension updates

2012-06-27 13:17:12 by Kjell-Åke Gafvelin

If you have been hit by the “certificate mismatch error” when you install updates to extensions in VS 2010 there is a fix now for that. You can download that fix at http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=38654.

|

Switching to FeedBurner

2012-05-31 09:18:48 by Kjell-Åke Gafvelin

In the coming weeks I will switch over the feed for this blog to be delivered by FeedBurner. So to prepare yourself I recommend that you update the URL to the feed in your feedreader now.

http://feeds.feedburner.com/geekprojectcom

|

AssemblyAttribute explained–Part 2

2012-05-29 10:25:55 by Kjell-Åke Gafvelin

There has been some interest in my blog post AssemblyAttribute explained regarding how build numbers are calculated from the date when the application was compiled. So I thought I could also make a post on how to calculate the date from the build number.

So if you have set the AssemblyVersionAttribute in your application to the following:

   1:  [assembly: AssemblyVersion("1.0.*")]

you could calculate the date from the build number using the following code snippet:

   1:              Version version = Assembly.GetExecutingAssembly().GetName().Version;
   2:   
   3:              DateTime date = new DateTime(2000, 1, 1);
   4:   
   5:              date = date.AddDays(version.Build);
   6:   
   7:              date = date.AddSeconds(version.Revision * 2);
   8:   
   9:              if (date.IsDaylightSavingTime())
  10:                  date = date.Add(TimeZone.CurrentTimeZone.GetDaylightChanges(date.Year).Delta);
  11:   
  12:              Console.WriteLine(version.ToString() + " => " + date.ToString());

This code snipped would output this:

1.0.4532.14997 => 2012-05-29 09:19:54

|

I’m still here!

2012-05-03 23:41:04 by Kjell-Åke Gafvelin

For a while now I haven’t spent any time on this blog even though I have been thinking on a regular basis “that was interesting and I need to blog about it”. But then there has always been something that has come in between and I forgot what it was that was so interesting…

Some weeks ago I finally made a push to get the release of MSMQ Studio out through the door and I was going to make a blog post about it just to realize that I was not able to post it! I had moved the blog to a new webhost about a year ago and now there was a problem with the login provider. So I went off to try to debug the code for the blog, but I couldn’t find it! After a while I managed to retrieve it from a really old backup thanks to my Windows Home Server! So now the code is up on TFS Preview so I have some control of it. Backups AND good source control is a god send sometimes!

So when I had this sorted out I added Google Analytics logging to the blog just to see how traffic was flowing from the blog to my company site (http://archonaut.com). This was really one of the best things I have done to get some inspiration to start blogging again! When I looked at the results from the first day and checked out the referrals I noticed that there are some old blog posts that people are still finding useful and are linking to those! This made me happy that they are still providing value to someone!

This blog has existed for almost 10 years now and I will do my best on keeping it up and running and adding more valuable content!

|

MSMQ Studio 1.0.1

2012-04-16 11:24:18 by Kjell-Åke Gafvelin

MSMQ Studio has now left the BETA stage and is now a released product with a proper license and support. This version includes only bugfixes on features that was released in the previous version. To download this version please visit http://www.archonaut.se.

|

MSMQ Studio 0.9.4 is released

2010-05-10 02:05:29 by Kjell-Åke Gafvelin

In this version I have added public queues support.

Download at http://www.archonaut.se.

|

Archonaut.se is moving

2010-04-17 19:16:52 by Kjell-Åke Gafvelin

I decided that I wanted to move http://www.archonaut.se to another hosting provider. The reason for this is that I am fed up with PHP at the moment. It’s not that I do not like it, but it is to much context switching for me when I need to fix something on the site. I mainly do development in C# and that’s what I am mostly comfortable with and when I have to do something in PHP I need to think for a while before I remember how to do it.

When I move the site to another hosting provider I will be able to use and learn development techniques that I can re-use in my day-job as a software architect and developer at Sogeti.

I will also be able to get a more streamlined release process for MSMQ Studio as well so I get less friction when I release a new version and it gets automatically published on the website. The current process requires to many manual steps for me at the moment. Although all this is also possible to do in PHP, but it will be easier for me to do it in .NET.

So if you experience any downtime at the http://www.archonaut.se it is due to the move and it will soon be online again.

|

Mix Session Viewer for Windows Phone 7

2010-03-31 00:54:50 by Kjell-Åke Gafvelin

I was at Microsoft TechDays in Sweden last week and got some inspiration to create an application for Windows Phone 7. The week before I found the oData API for accessing the session data for MIX 2010. And when Tim Heuer released the MIX10 Online Silverlight Viewer I got the idea that it would be really cool to the make the same but for WP7!

I started by using the Windows Phone List Application template in VS2010 where I populated the list of sessions using the oData SDK for Windows Phone 7.

image

When you select a session you will get to the details page where the video is displayed in a MediaElement, which can be controlled by a play and a pause button in the application bar.

image

You can download the sample code at MIXSessionViewer.zip.

|

MSMQ Studio 0.9.3.0

2010-03-08 23:14:40 by Kjell-Åke Gafvelin

This release contains new functionality for setting a filter on a queue to only display messages that was received within a certain date range. There is also a bug fix for a crash that happens when connecting to a remote computer and the user has insufficient access rights on the computer.

image

Download at http://www.archonaut.se

|