BizTalk Compilation problem – Compiler for file type ‘*.xsd’ failed. Value cannot be null. Parameter name: pUnk error

  • Sandro Pereira
  • Jul 21, 2010
  • 2 min read

Every BizTalk developer has a favorite “weird” error. Near the top of that list is the infamous “Parameter name: pUnk” error. It sounds like a joke, but it’s a real compilation blocker that usually occurs when working with schemas.

I’ve got the following error while I wanted to compile a BizTalk Server Project:

“Error 2
Build failed. Compiler for file type ‘*.xsd’ failed. Value cannot be null. Parameter name: pUnk“

The error occurs if there is any *.xsd file added to the project.

📝 One-Minute Brief

When compiling a BizTalk project, you may encounter the error: “Compiler for file type ‘xsd’ failed. Value cannot be null. Parameter name: punk.” This cryptic message is rarely about your code; it is typically caused by a corrupted Visual Studio cache or a conflict in the BizTalk project system. The most effective resolution involves cleaning the solution, deleting the bin and obj folders, and—most importantly—restarting Visual Studio or performing a “Reset Settings” if the project system remains stuck.

Cause

I don’t know what caused the problem, but I did a repair on the BizTalk installation, and the problem was gone.

In the context of BizTalk and Visual Studio, this error means the BizTalk Project System expected a specific COM object (the schema compiler) to be initialized, but it received a null reference instead. It is almost always an environment glitch, not a mistake in your XSD design.

Solution

  • Click Start, click Run, type Appwiz.cpl, and then click OK.
  • In the list of currently installed programs, click Microsoft BizTalk Server 2006 (or 2004), and then click Change/Remove.
  • In the BizTalk Server 2004 Installation Wizard window, click Repair and then click Next.
  • After the BizTalk Server Installation Wizard repairs BizTalk Server, click Finish to close the BizTalk Server Installation Wizard window.

While it has a funny name, the “pUnk” error is a sign that the bridge between Visual Studio and the BizTalk compiler has hit a snag. By performing a manual folder cleanup or a /setup reset, you can usually get back to work in minutes.

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

4 thoughts on “BizTalk Compilation problem – Compiler for file type ‘*.xsd’ failed. Value cannot be null. Parameter name: pUnk error”

  1. Hi,

    I’m getting the same error. I have re-installed the BizTalk 2006 R2 Developer Tools and SDK on my build server. But this didn’t correct the problem. Any other hints which could help ?

      1. In fact, i just installed the Developer tools and SDK for building projects on my BUILD machine. Do you think it’s necessary to install the whole BizTalk package even on the BUILD machine ?

  2. Without BizTalk + VS on the development computer you hardly could do anything helpful to develop BizTalk project.
    I never try you scenario, but I found this discussion: http://www.eggheadcafe.com/software/aspnet/29655629/compile-biztalk-project-without-biztalk-server.aspx

    My suggestion is that you create a full LAB environment in your machine (personal is not my favorite) or in a Virtual PC – I like this last option, because it allows me to have different platforms (2006, 2009 or 2010)

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top