Jeff Sanders Technical Blog

I am a Microsoft employee that has worked on all aspects of the Web Stack for a long time. I hope these blogs are useful to you! Use this information at your own risk.


<< Go Back

Portable Class Library Error When Building A Windows Phone 8 Windows Store App Library

- 14 Dec 2012

I had a customer issue that I thought I would share in the event you run into this issue (it may save you some heartburn).

Here is the error:

The "Vbc" task failed unexpectedly.
System.Runtime.InteropServices.COMException (0x80004005): Unable to find required file ‘Microsoft.VisualBasic.dll’.

 

The repro of this is as follows:

With WP8 SDK and VS2012 Pro or above installed:

  1. Create a new Visual Basic Portable Class Library

  2. Choose .NET 4.5, Windows Phone 8, and Windows Store apps as the targets (or if you leave Windows Store apps unchecked)

  3. Build project

 

The solution is quite simple and should be in the next release of Visual Studio 2012

  1. Close Visual Studio

  2. Open the vbproj file with a text editor like notepad

  3. Find the first entry and after the closing tag add: Embed

Example: 

    {14182A97-F7F0-4C62-8B27-98AA8AE2109A};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
    Embed

4.  Rebuild the project

 

Let me know if this helped you!

Peace,

Jeff

<< Go Back