HomeSeer / Plugin-SDK

Plugin development kit for the 4th major edition of the HomeSeer platform.
https://www.nuget.org/packages/HomeSeer-PluginSDK/
GNU Affero General Public License v3.0
21 stars 5 forks source link

Unsatisfied references in PluginSDK #29

Closed mcsSolutions closed 5 years ago

mcsSolutions commented 5 years ago

Following https://docs.homeseer.com/display/HSPI/Creating+a+Plugin

1a. Add PluginSDK NuGet package step 3 received error Unable to retrieve results... HomeSeer-PluginSDK [error occurrerd] Use Restore button at top in NuGet indicates that Newtonsoft.Json 12.0.1 is not found on source C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: https://github.com/HomeSeer/Plugin-SDK: Failed to fetch results from V2 feed at https://github.com/HomeSeer/Plugin-SDK 404 (Not Found).

1b. Creating a Plugin contains link to Starter Plugin Sample. This link just returns back to same page. I was expecting a bare-bones project to be downloaded when link is clicked.

  1. The downloaded SDK contains a Readme.md file that indicates "we recommend you add the [NuGet package][nuget-package-url] to your project" This same text is on the github project where it is a hyperlink to the SDK release history. Neither provides direction on how to add the SDK to project. Google search https://docs.microsoft.com/en-us/azure/devops/artifacts/nuget/consume?view=azure-devops implies this is done by adding a source. Guess is that https://github.com/HomeSeer/Plugin-SDK is the source, but should not need to do Google or guess on what to add.

  2. When using Install-Package HomeSeer-PluginSDK -Version 1.0.6 received error Install-Package: Some NuGet packages are missing from the solution.... At line:1 char:1 Install-Package HomeSeer-PluginSDK -Version 1.0.6

  3. Package downloaded as zip from github. When opened with VS2017 there were unsatisfied references to HSCF and NewtonsoftJson Capture

jldubz commented 5 years ago

Please add the nuget package to your plugin project using the nuget package manager and not by downloding the zip file and adding it directly. You can find good reference documentation on that here: https://docs.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio

I have tested this process with both C# and VB projects in two different IDEs and have not encountered this issue; so I am not sure what the issue is that you are encountering. Including the Plugin SDK NuGet package automatically includes the necessary Newtonsoft reference. Current testing shows that there is nothing wrong with the NuGet servers or the packages that I can see. Can you please retry the process, and if you still cannot get it to work, please post a copy of your solution.

jldubz commented 5 years ago

@mcsSolutions

I have fixed up the starter plugin as a VB "Hello World" project for you to quickly start from and published it to github here: https://github.com/HomeSeer/Hello-World-Plugin-VB

mcsSolutions commented 5 years ago

I download the zip. Expanded it into a folder. Dbl-clicked on the .sln file. Did Build Hello... Received the following errors.

From: "Jon-Luke West" notifications@github.com To: "HomeSeer/Plugin-SDK" Plugin-SDK@noreply.github.com Cc: "mcsSolutions" mcsSolutions@centuryTel.net, "Mention" mention@noreply.github.com Sent: Friday, November 1, 2019 12:32:57 PM Subject: Re: [HomeSeer/Plugin-SDK] Unsatisfied references in PluginSDK (#29)

[ https://github.com/mcsSolutions | @mcsSolutions ]

I have fixed up the starter plugin as a VB "Hello World" project for you to quickly start from and published it to github here: [ https://github.com/HomeSeer/Hello-World-Plugin-VB | https://github.com/HomeSeer/Hello-World-Plugin-VB ]

— You are receiving this because you were mentioned. Reply to this email directly, [ https://github.com/HomeSeer/Plugin-SDK/issues/29?email_source=notifications&email_token=AALJP66N6RUBI3TBIV6M6LTQRR76TA5CNFSM4JEZQFMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC36INQ#issuecomment-548922422 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AALJP666232UZQW27ZTQWOTQRR76TANCNFSM4JEZQFMA | unsubscribe ] .

jldubz commented 5 years ago

I'm not sure what error you received as I cannot follow your response. I can tell you though that it sounds like you might need to restore the NuGet packages before building because those files are not included in the source. You can find information on that here https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore

I highly recommend you familiarize yourself with the NuGet package management system https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio

mcsSolutions commented 5 years ago

My default install of VS2017 had only offline packages as the source. I added an online package based upon example at [ https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior | https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior ] . I was then able to build. This implies to me that there may be some configuration of NuGet which may be dependent on what has been installed on the computer previously. I do have VS2008 Pro, VS2013 Pro, and VS2017 Community installed.

From: "Jon-Luke West" notifications@github.com To: "HomeSeer/Plugin-SDK" Plugin-SDK@noreply.github.com Cc: "mcsSolutions" mcsSolutions@centuryTel.net, "Mention" mention@noreply.github.com Sent: Friday, November 1, 2019 6:55:17 PM Subject: Re: [HomeSeer/Plugin-SDK] Unsatisfied references in PluginSDK (#29)

I'm not sure what error you received as I cannot follow your response. I can tell you though that it sounds like you might need to restore the NuGet packages before building because those files are not included in the source. You can find information on that here [ https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore | https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore ]

I highly recommend you familiarize yourself with the NuGet package management system [ https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio | https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio ]

— You are receiving this because you were mentioned. Reply to this email directly, [ https://github.com/HomeSeer/Plugin-SDK/issues/29?email_source=notifications&email_token=AALJP6Z2VHLCPLHI5Y5LEN3QRTMYLA5CNFSM4JEZQFMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC4RDHY#issuecomment-548999583 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AALJP63RKQEG66GPROLMJK3QRTMYLANCNFSM4JEZQFMA | unsubscribe ] .

jldubz commented 5 years ago

Ok. I can tell you that, here in HomeSeer, we have been using VS2019 lately with no problems, and had previously been using VS2017 with some quirky behaviors noted with NuGet. We have noted that they don't collide; so you can have them installed along side one another. I might recommend using VS2019 while working on HS4 plugins and see if that improves your experience.

I do vaguely remember having to add in the NuGet.org package source to one of my older versions of Visual Studio to get it to work as expected. I'll note that in the documentation just in case. This seems to have been fixed by default in VS2019.

You should also have the following options to help you manage wen NuGet packages are restored:

image


I updated the docs to reflect the possibility that you might be missing a link to the https://api.nuget.org/v3/index.json package source for NuGet packages and it should be added.