Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    PGSCAN Utility Questions

    Scheduled Pinned Locked Moved Support
    6 Posts 2 Posters 16 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      arozanski_1087
      last edited by

      I have several questions on how the PG Scan utility works that the documentation doesn't immediately answer for me.

      suppose I am calling the pgscan utility....

      & $pgscanDir\pgscan.exe Publish --type=$pkgType --input=$solutionName --package-feed=$feedName --proget-url=$progetURL --consumer-package-source=$sourceFeedName --consumer-package-name=$packageName --consumer-package-version=$releaseNumber --consumer-package-group=$devCodeName --api-key=$apiKey
      
      1. What actually belongs in the consumer-package-name and consumer-package-version fields? I had assumed that this was supposed to be the package that I was using, such as Newtonsoft.Json. Is it actually supposed to represent my application?
      2. How does pgscan handle subprojects and submodules when I call it from the .sln level? Say MyProject.sln has a subproject1.csproj, and uses submodule1.sln . How would pgscan report the nuget packages that are used?
      3. How do I remove dependencies from packages once I register them? I'm fairly certain that I did all of these wrong and need to wipe the entire slate clean.
      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @arozanski_1087
        last edited by

        Hi @arozanski_1087 , happy to help!

        Hopefully we can update the documentation with these improvements.

        What actually belongs in the consumer-package-name and consumer-package-version fields?

        This is supposed to represent your application. pgscan will detect the packages that your application uses, like Newtonsoft.JSON and the version of that package.

        How does pgscan handle subprojects and submodules when I call it from the .sln level?

        When you point pgscan to a .sln file, it will parse the file and look for projects. Under each project, the tool will look for packages.config (which is the older style project format) and then project.assets.json (which is the newer style).

        How do I remove dependencies from packages once I register them?

        This isn't currently supported it seems (I don't see a delete button in the UI), but if you don't mind going to the database, you can just do DELETE [PackageDependents] and then all the rows are cleared.

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          arozanski_1087 @atripp
          last edited by

          @atripp Thank you for getting back to me! This is incredibly helpful.

          When you point pgscan to a .sln file, it will parse the file and look for projects. Under each project, the tool will look for packages.config (which is the older style project format) and then project.assets.json (which is the newer style).

          Does this register submodules and subprojects individually under the group name? Using my previous example: would all the nuget dependencies get registered under MyProject1, or would I see Myproject1\submodule1 as how it's registered? If it doesn't do the latter, what would you recommend me do in order to achieve that state?

          This isn't currently supported it seems (I don't see a delete button in the UI), but if you don't mind going to the database, you can just do DELETE [PackageDependents] and then all the rows are cleared.

          I don't mind going into the DB to fix my massive mistake. Is there a place I can feature request this as a UI addition?

          1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer
            last edited by

            Hi @arozanski_1087,

            Whatever consumer-package-name and consumer-package-source you set as a parameter to pgscan is what the packages will be associated with.

            Basically, the utility has the effect of doing this...

            1. Reading the sln file you specify
            2. Finding all NuGet packages
            3. Locating those packages in ProGet
            4. Adding a "package consumer" to the NuGet package with the "consumer" information (MyProject?).

            To get the behavior you want, you may need to call pgscan multiple times with different "consumer" information, or even modify the tool / cusotmize something that calls the API directly.

            Good point about delete button; I added a change (PG-1957) where we'll get that as a UI Addition.

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              arozanski_1087 @atripp
              last edited by

              Thank you @atripp! Using the utility multiple times isn't an issue for us. I'll find some way of making that work.

              Thank you again for your assistance here.

              atrippA 1 Reply Last reply Reply Quote 0
              • atrippA Offline
                atripp inedo-engineer @arozanski_1087
                last edited by

                @arozanski_1087 no problem!

                And by the way, the pgscan tool is open source, so if you see opportunities to improve it, or want to devleop something on your own, please don't hesitate to use the sources - https://github.com/Inedo/pgscan

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post
                Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation