Powershell

jochem4207jochem4207 Posts: 47
edited December 19, 2013 11:22AM in Deployment Manager
Hello,

I've a powershell script and variables.
I tried to place it in:
- the source folder of the project (include it in project, deploy via visual studio)
- i've added it in:
C:\ProgramData\Red Gate\DeploymentManager\Data\PackageCache\PackageName.1.0.6
- i've used it capitalized names like PostDeploy.ps1 and also deploy.ps1
- i've set variables on the variable page.
- i've published the project multiple times e.g. 1.0.4, 1.0.5, 1.0.6

And it still doesn't get processed when I deploy.
I've read some documentation but didn't helped me.

Where do I need to add this so it actually gets in the deployment?

Thanks for any help :)

Edit
When using publishing via RgPublish.exe the PS file gets included. Now i've some errors to fix.

Comments

  • Thanks for your post.

    When you added the script to the project, did you set the build action to : Content?

    Also, it might be worth checking C:\ProgramData\RedGate\DeploymentManager\Data\feed
    as the cache folder might be out of date.

    I hope this helps.
    Chris
  • Hey Chris,

    Thanks for the answer. And sorry for the late response. In the meanwhile I fixed it using RgPublish to upload the whole directory instead of using visual studio extension.
  • Thanks for your reply.

    That sounds like a sensible workaround. However, you should still get the file using the extension, so let me know if you need any further help with this.
    Chris
  • Thanks for your reply.

    That sounds like a sensible workaround. However, you should still get the file using the extension, so let me know if you need any further help with this.

    Hey Chris,

    When I use the the visual studio right click upload functionlity it only takes the bin folder and some other configs. It ignores a folder I called redgate with stuff in it and a powershell in the main map.

    I think this is probably proper behaviour but for me isn't it a problem because I wont deploy from visual studio. The RGpublish does what I want. But i'm curious why the vs plugin only thanks a few selected files.

    Greetings and thanks for the awesome forum support. Defenitly one of the best free supports.
  • The Visual Studio plugin publishes everything marked as output in the project. This includes items that are copied to the output directory (normally the bin directory in webapps), and anything with a build action of 'Content'. To check/edit the build action for a file, right-click on it Solution Explorer and select 'Properties...' (or press Alt+Enter). You should change the build action for the additional files you want included to 'Content' instead of 'None'.
    Technical Lead
    Redgate Software
Sign In or Register to comment.