title: Error "Invalid at the top level of the document" creating a Visual Studio 2012 Wizard
body: <p>I am trying to create a New Item Wizard for Visual Studio 2012. This would be a wizard to create several C++ files and add them to the project. I have created a similar wizard for VS 2005. I'm trying to create this using the IDTWizard interface. I followed this walkthrough: <a href="http://msdn.microsoft.com/en-us/library/7k3w6w59%28v=vs.110%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/7k3w6w59(v=vs.110).aspx</a></p>
  
  <p>When i try to use the wizard, I get an error message that says "invalid at the top level of the document". My dll shows up as a registered COM object when I look through the data displayed by oleview.exe. What am I doing wrong? Should I be doign this the same way I created my VS2005 wizard, using html/javascript? My code is below:</p>
  
  <p>Wizard.cs:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using EnvDTE;
  using EnvDTE80;
  using System.Runtime.InteropServices;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace SystemsModuleWizard
  {
      [ComVisible(true)]
      [Guid("FE7DC545-30DC-445B-8130-897C5F3114EC"), ProgId("SystemsModuleWizard.WizardClass")]
  
      public class WizardClass : IDTWizard
      {
          public void Execute(object Application,
              int hwndOwner, ref object[] contextParams,
              ref object[] customParams,
              ref EnvDTE.wizardResult retval) 
          {
              MessageBox.Show("The wizard is running");
  
          }
      }
  }
  </code></pre>
  
  <p>AssemblyInfo.cs:</p>
  
  <pre><code>using System.Reflection;
  using System.Runtime.CompilerServices;
  using System.Runtime.InteropServices;
  
  // General Information about an assembly is controlled through the following 
  // set of attributes. Change these attribute values to modify the information
  // associated with an assembly.
  [assembly: AssemblyTitle("SystemsModuleWizard")]
  [assembly: AssemblyDescription("")]
  [assembly: AssemblyConfiguration("")]
  [assembly: AssemblyCompany("")]
  [assembly: AssemblyProduct("SystemsModuleWizard")]
  [assembly: AssemblyCopyright("Copyright ©  2014")]
  [assembly: AssemblyTrademark("")]
  [assembly: AssemblyCulture("")]
  
  // Setting ComVisible to false makes the types in this assembly not visible 
  // to COM components.  If you need to access a type in this assembly from 
  // COM, set the ComVisible attribute to true on that type.
  [assembly: ComVisible(true)]
  
  // The following GUID is for the ID of the typelib if this project is exposed to COM
  [assembly: Guid("ab29b7df-32c4-4dca-ade4-a31f687b9331")]
  
  // Version information for an assembly consists of the following four values:
  //
  //      Major Version
  //      Minor Version 
  //      Build Number
  //      Revision
  //
  // You can specify all the values or you can default the Build and Revision Numbers 
  // by using the '*' as shown below:
  // [assembly: AssemblyVersion("1.0.*")]
  [assembly: AssemblyVersion("1.0.0.0")]
  [assembly: AssemblyFileVersion("1.0.0.0")]
  </code></pre>