Search This Blog

Monday, 15 February 2016

Converting a Portable Class Library to a normal class library & Vice-versa - Without recreating the project

I happened to be experimenting with a portable class library in .net 4.5.
I had issues when I tried to connect to it through a normal Asp.net MVC project. Hence I wanted to re-convert it into a normal class library, but without deleting the project.
This is how I did it.

Step 1

Open your project file in notepad

Step 2

Locate the following
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
Replace it with
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Step 3
Locate the following and delete it
<ProjectTypeGuids>....</ProjectTypeGuids>
Now save your project file. To be safe, save it with a different name
Now try opening the newly saved .csproj file in Visual studio. You will be prompted to target a .net framework, select the framework you need to target and click ok.

The project will be loaded normally. Now right-click on the project in the solution explorer->Properties. It will show the Output type as Class Library.

Internet dongle damaged? - No issues - Put the sim into your mobile

I recently stumped into this issue with my Airtel 4g dongle device being damaged.
It was quite an emergency for me as I had couple of video conferences to host.

The Airtel officials kindly asked me to place a request to replace the device and the time to tend to this replacement request was based on the available stocks of the device.
Sorry I neither had the time nor wished to waste effort driving an hour to visit the showroom.
So this is what I tried.


  1. I detached the sim card from the data card. 
  2. Put it into the spare windows phone that I had. 
  3. You receive internet settings from your carrier, and would need to save it. That's it.


The nice part is you can enable a tethering hotspot on your mobile and your datacard sim can be connected by other devices.
I tried to connect it with my laptop, other mobiles and my Android TV.

So I do not think I would like to replace my dongle as of now ;)

Now-a-days mobile vendors who sell internet dongles charge you separately if you wish to convert your device into a wifi hotspot.

With the above mechanism, I could convert my existing data card sim into a wifi hotspot just by inserting the sim into the mobile.

Hope this helps you too.