As part of my package I need to add an xml file in a settings folder and name it {myrootnamespace}Settings.xml.
It this possible? I've been looking at the install.pss1 to achieve this but my powershell isn't up to much.
I've cracked it. I'm creating a file called settings.xml in the settings folder and renaming it accordingly.
param($installPath, $toolsPath, $package, $project)
$rootnamespace = $project.Properties.Item("RootNamespace").Value
$path = [System.IO.Path]
$settings = $path::Combine($path::GetDirectoryName($project.FileName), "Settings\settings.xml")
$settingsfile = $project.ProjectItems.Item("Settings").ProjectItems.Item("settings.xml")
$settingsfile.Name = ($rootnamespace + 'Settings.xml')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With