Issues when generating source packages with Windows 8 XAML control


With Visual Studio 2012 to target the Windows Store, building assemblies that contain XAML elements creates a "hidden" file named XamlTypeInfo.g.cs that is stored in the ProjectName/obj/Release folder (for release builds). This file is included in the project and the debug symbols (.pdb) file, however is not part of the project structure.

If you try to create a package using NuGet with the -Symbols argument then the generated MyProject.symbols.nuget file does not include the XamlTypeInfo.g.cs file. Since this is referenced in the .pdb file the upload to the symbol server fails with the following error,

The remote server returned an error: (506) Package submission failed: Source file c:\Users\Andrew\Documents\Visual Studio 2012\Projects\Okra\Okra.Core\obj\Release\XamlTypeInfo.g.cs not found in package. Source file is declared in Okra.Core.pdb.

Steps to reproduce project structure,
  1. Create a new Visual Studio 2012 Windows Store Class Library project (C#)
  2. Add a new UserControl to the project
  3. Build the project.
If you inspect the generated MyProject.pdb file (open in WordPad works!) then you see references to the XamlTypeInfo.g.cs file. Generating a NuGet package with symbols does not include this file.


AndyWilkinson wrote Nov 4, 2012 at 11:50 AM

NB: If I open up the package as a zip file and add the missing XamlTypeInfo.g.cs file then the push to the source server works fine.


dcazzulino wrote Nov 19, 2012 at 6:21 AM

Currently suffering this too. Any known workarounds??

dotnetjunky wrote Jan 22, 2013 at 5:39 PM

The workaround is to manually include the file into your package after it's created. We will accept pull request for the proper fix.