SubPointSolutions / MetaPack

A NuGet platform for packaging, delivering and deploying SharePoint customization with PnP/SPMeta2 support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting MetaPack up an running

andreasblueher opened this issue · comments

commented

Hey guys,

I just forked MetaPack and tried to compile it on my dev machine. After upgrading and re-referencing some NuGet packages I'm down to one compile error. Using System.Reactive.Subjects didn't seem to work right away and NuGet complained about different packages which should be consolidated, but I don't think thats a breaking issue.

ShUserControlBase in namespace SubPointSolutions.Shelly.Desktop.Controls

protected virtual void ReceiveEvent(Action action)
{
Hub.GetEvent().Subscribe(action);
}

Fails with the following error message:
Severity Code Description Project File Line Suppression State
Error CS1503 Argument 1: cannot convert from 'System.Action' to 'System.IObserver' SubPointSolutions.Shelly.Desktop C:\Git\MetaPack\shelly\Shelly\SubPointSolutions.Shelly.Desktop\Controls\ShUserControlBase.cs 39 Active

Hey @andreasblueher, sorry for the late response.

Most likely, the issue has to do with the git repo structure. We use git submodules in this project to reference "shelly", the other project which is another git repo. In a nutshell, we have repo for the MetaPack, and then we've got a link to another repo "shelly" within metapack. You can see it as "shelly @ 411cd6d" on the main page.

Now, what's happening here. First of all, one you've got source, you need to check out repo recursively, as this:

git submodule update --init --recursive

That would fetch all submodules.

Next, we've got two solution files - for the main metapack proj and shelly, from the dubmoduke. Visual Studio does not work well in this case, NuGet restore fails while fetching deps for the git submodules. That's a known issue all over the internet, unfortionatly.

To resolve this, we need to manually build project. One it is built manually, VS would see NUGet packages and all be fine from the VS perspective. We use CakeBuild across all our projects, so the following will do:

 shelly\Shelly\Build\build.ps1 -Target "Default" 
 Build\build.ps1  -Target "Default" 

Once done, you would be able to compile everything from VS as usual.
Also, this workflow is under CI, under AppVeyor:
https://github.com/SubPointSolutions/MetaPack/blob/master/appveyor.yml

We also scratched our heads and coudn't come up with anything better that this.

commented

Thank you for the explanation, I couldn't find such detailled instructions anywhere in the solution. Please give me a few days, because I got a deadline ahead and a national holiday this week.

No worries.

We also pushed the current version to Chocolatey Gallery, but additional reword was required.
If you don't want to stuck with the source code, then all artifacts are avialable in the AppVeyour build:

There is a bunch of ZIP archives for both CLI/UI which are produced by CI build.

It's is still work in progress so that any feedback on what to fix or improve is highly appreciated.