Managed Package Framework for Visual Studio 2017
Asked Answered
W

1

7

I'm following this tutorial on how to create a new Visual Studio Project type. In there, it says to "Import the source-code files for the Managed Package Framework". Google led me to this link that has a link to MPF 2013 package. In the first link they say to look for a file ProjectBase.files which does not exist in the second link download.

Questions:

  1. Where is the correct MPF download for Visual Studio 2017.
  2. In the future when we move on to Visual Studio 2019, will I need to download a new MPF for 2019?
Witting answered 21/12, 2018 at 1:2 Comment(4)
does it need the Visual Studio Extension option to be installed? (in the Visual Studio Installer.Hanako
@JohnB I already have that installed in Visual Studio. The Managed Package Framework seems to be a separate package that I have to download and point to.Witting
MPF is obsolete (IMHO it was a crappy piece of code, but back then, it was the only one). As said in the documentation you should use "Visual Studio project system (VSPS) which has a number of advantages over building a project system from scratch", unless you want to target versions of Visual Studio older than 2013.Saltire
But VSPS only works with VS2017 and VS2019 support is still not available. Does it mean that "VSIX Project" template supplied with VS2019 and VS2022 is just not operational? Is there a way to extend VS project system on newer VS versions, so I get access to ProjectNode, Hierarchy, etc. like with MPF?Defoe
V
3

I had the same problem, but it seems that I alreasy solved it. It seems that MPF is not needed anymore to do these steps and the tutorial is a bit outdated:

How to do it now:

Instead of loading the "Managed Package Framework code", skip this whole step in the tutorial and go to the next chaprer. In the next chapter skip everything until step 3 and register

this.RegisterProjectFactory(new SimpleProjectFactory(this));

in the InitializeAsync Task of the SimpleProjectPackage.cs

At step 6 implement FlavoredProjectFactory instead of ProjectFactory

Continue the tutorial and it should work fine now. In the end it should look like this:

class SimpleProjectFactory : FlavoredProjectFactory
{
    private SimpleProjectPackage simpleProjectPackage;

    public SimpleProjectFactory(SimpleProjectPackage simpleProjectPackage)
    {
        this.simpleProjectPackage = simpleProjectPackage;
    }

    protected override object PreCreateForOuter(object outerProject)
    {
        return null;
    }



}
Vlada answered 20/10, 2020 at 9:20 Comment(1)
I get Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))Christan

© 2022 - 2024 — McMap. All rights reserved.