locked
Basic Project System Walkthrough not working on VS2010 RRS feed

  • Question

  • Hello,

    I have been working through the walkthrough to create a Basic Project System found here:

    http://msdn.microsoft.com/en-us/library/vstudio/cc512961.aspx

    I am working on Win7 with VS2010 Ultimate

    Everything has  gone well until the section Initializing the Project Factory. At step 8 of this section it states to add some references. The following code changes in steps 9 and 10 then cause problems since VS indicates that it can'd find ProjectPackage, ProjectFactory or ProjectNode.

    The current references are:

    EnvDTE
    EnvDTE100
    EnvDTE80
    EnvDTE90
    Microsoft.Build
    Microsoft.Build.Framework
    Microsoft.Build.Utilities.v4.0
    Microsoft.CSharp
    Microsoft.VisualStudio.CommandBars
    Microsoft.VisualSutio.CommonIDE
    Microsoft.VisualStudio.Designer.Interfaces
    Microsoft.VisualStudio.OLE.Interop
    Microsoft.VisualStudio.Package.LanguageService.10.0
    Microsoft.VisualStudio.ProjectAggregator
    Microsoft.VisualStudio.Shell.10.0
    Microsoft.VisualStudio.Shell.Design
    Microsoft.VisualStudio.Shell.Immutable.10.0
    Microsoft.VisualStudio.Shell.Interop
    Microsoft.VisualStudio.Shell.Interop.10.0
    Microsoft.VisualStudio.Shell.Interop.8.0
    Microsoft.VisualStudio.Shell.Interop.9.0
    Microsoft.VisualStudio.TextManager.Interop
    Microsoft.VisualStudio.VSHelp
    stdole
    System
    System.Core
    System.Data
    System.Design
    System.Drawing
    System.Windows.Forms
    System.Xml
    VsLangProj
    VSLangProj80
    WindowsBase

    Does anyone have advice as to which reference is needed to include the types ProjectPackage, ProjectFactory, ProjectNode?

    If the Walkthrough is out of date could it be updated so future users don't get stuck on the same issue?

    Wednesday, February 13, 2013 11:30 AM

Answers

  • Thank you for your response. I do have the source for the Microsoft.VisualStudio.Package as per the instructions.

    One difference in my setup from the Walkthrough was that for step 4 of "To Initialize The Project Factory" I had to set

      <PropertyGroup>
        <UseCodebase>true</UseCodebase>
        <ProjectBasePath>C:\MyLocalFolder\Project\Dev10\Src\CSharp</ProjectBasePath>
      </PropertyGroup>

     since my project does not have a RegisterWithCodebase item. I assumed that in VS2010 RegisterWithCodebase is now UseCodebase.

    to get it to load the project. So I do see all the source for Microsoft.VisualStudio.Package.

    My problem was a typo on the using statement in the walkthrough.

    The walkthrough asks to add 

    using Microsoft.VisualStudio.Package;
    to the files but the correct namespace is:

    using Microsoft.VisualStudio.Project;




    • Edited by PCavaco Wednesday, February 13, 2013 5:10 PM
    • Marked as answer by PCavaco Wednesday, February 13, 2013 5:10 PM
    Wednesday, February 13, 2013 4:54 PM

All replies

  • Did you miss this step:

    To the solution, add links to the source-code files for theMicrosoft.VisualStudio.Package Project framework. This framework is an extension of the Managed Package Framework (MPF). The Project framework is provided only as source code.

    Or perhaps you need to add usings to tell the C# compiler where these types are located (as they are likely in a different namespace from your main project files).

    MPF is a source only distribution, there are no dlls that contain the types. You can get MPF from here: http://mpfproj10.codeplex.com/

    • Marked as answer by PCavaco Wednesday, February 13, 2013 5:05 PM
    • Unmarked as answer by PCavaco Wednesday, February 13, 2013 5:10 PM
    Wednesday, February 13, 2013 3:50 PM
  • Thank you for your response. I do have the source for the Microsoft.VisualStudio.Package as per the instructions.

    One difference in my setup from the Walkthrough was that for step 4 of "To Initialize The Project Factory" I had to set

      <PropertyGroup>
        <UseCodebase>true</UseCodebase>
        <ProjectBasePath>C:\MyLocalFolder\Project\Dev10\Src\CSharp</ProjectBasePath>
      </PropertyGroup>

     since my project does not have a RegisterWithCodebase item. I assumed that in VS2010 RegisterWithCodebase is now UseCodebase.

    to get it to load the project. So I do see all the source for Microsoft.VisualStudio.Package.

    My problem was a typo on the using statement in the walkthrough.

    The walkthrough asks to add 

    using Microsoft.VisualStudio.Package;
    to the files but the correct namespace is:

    using Microsoft.VisualStudio.Project;




    • Edited by PCavaco Wednesday, February 13, 2013 5:10 PM
    • Marked as answer by PCavaco Wednesday, February 13, 2013 5:10 PM
    Wednesday, February 13, 2013 4:54 PM