Managed Package Framework for Visual Studio 2017

579 Views Asked by At

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?
1

There are 1 best solutions below

1
On

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;
    }



}