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!

    PowerShell seperate Module/Script feeds with dependancies.

    Scheduled Pinned Locked Moved Support
    progetnugetpowershellscript-repository
    3 Posts 1 Posters 44 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.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I recently setup ProGet with two PowerShell (nuget) feeds, one for scripts and one for modules. then registered it as a PSRepository:


      Register-PSRepository -Name MyGallery -InstallationPolicy Trusted -PackageManagementProvider NuGet -SourceLocation https://proget/nuget/psmodules -PublishLocation https://proget/nuget/psmodules -ScriptSourceLocation https://proget/nuget/psscripts -ScriptPublishLocation https://proget/nuget/psscripts


      I am able to publish to both feeds no problem. I then created a script, with a #Requires statement that says it requires one of the modules I have published in the psmodules feed, here's where I run into problems.

      When I use Install-Script, it fails because it cannot find the required module. this happens whether I have the module installed on my box or not. if you go to the web page for the script, you can see the dependency, but if you hover over the link, it wants to look in the psscripts feed, which is obviously not where it resides.

      if I try to merge into one feed, I get an error on the powershell side when trying to register a PSRepository with the same URI for SourceLocation and ScriptSourceLocation:


      PackageManagement\Set-PackageSource : SourceLocation 'https://proget/nuget/powershell' and ScriptSourceLocation 'https://proget/nuget/powershell' should not be same for URI based repositories.


      I'm not sure what to do here, if you do Get-PSRepository -name PSGallery | Select * here is the output:


      Name : PSGallery
      SourceLocation : https://www.powershellgallery.com/api/v2/
      Trusted : True
      Registered : True
      InstallationPolicy : Trusted
      PackageManagementProvider : NuGet
      PublishLocation : https://www.powershellgallery.com/api/v2/package/
      ScriptSourceLocation : https://www.powershellgallery.com/api/v2/items/psscript/
      ScriptPublishLocation : https://www.powershellgallery.com/api/v2/package/
      ProviderOptions : {}


      But I'm not sure how to replicate this kind of structure in ProGet, it doesn't seem like the URL of feeds can be messed with.

      Thanks for any help.

      Product: ProGet
      Version: 4.6.0

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        Hi Thomas,

        This is something you'll want to bring up with the PowerShellGallery team; we do not maintain the client, and are not familiar with this particular message/error.

        It's very possible that the particular command you're trying will only ever work with powershellgallery.com, which is not the PSG team's design intent... but sometimes happens. They generally are able to address issues like this in the client fairly quickly.

        If you hear a resolution, please share it here so anyone else searching for the problem can find it.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          https://github.com/PowerShell/PowerShellGet/issues/76

          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