Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 85eadef

Browse files
committed
Merge pull request #315 from erwinvanhunen/dev
Updated postbuild and fixed incorrect references
2 parents 0220ca6 + 8994cac commit 85eadef

File tree

2 files changed

+46
-31
lines changed

2 files changed

+46
-31
lines changed

Commands/SharePointPnP.PowerShell.Commands.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<ProjectGuid>{1DDE6F0A-CA49-419A-9CE8-A6CA02F43CE0}</ProjectGuid>
88
<OutputType>Library</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>OfficeDevPnP.PowerShell.Commands</RootNamespace>
11-
<AssemblyName>OfficeDevPnP.PowerShell.Online.Commands</AssemblyName>
10+
<RootNamespace>SharePointPnP.PowerShell.Commands</RootNamespace>
11+
<AssemblyName>SharePointPnP.PowerShell.Online.Commands</AssemblyName>
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<SccProjectName>
@@ -26,8 +26,8 @@
2626
<ProjectGuid>{1DDE6F0A-CA49-419A-9CE8-A6CA02F43CE0}</ProjectGuid>
2727
<OutputType>Library</OutputType>
2828
<AppDesignerFolder>Properties</AppDesignerFolder>
29-
<RootNamespace>OfficeDevPnP.PowerShell.Commands</RootNamespace>
30-
<AssemblyName>OfficeDevPnP.PowerShell.SP2013.Commands</AssemblyName>
29+
<RootNamespace>SharePointPnP.PowerShell.Commands</RootNamespace>
30+
<AssemblyName>SharePointPnP.PowerShell.SP2013.Commands</AssemblyName>
3131
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
3232
<FileAlignment>512</FileAlignment>
3333
<SccProjectName>
@@ -45,8 +45,8 @@
4545
<ProjectGuid>{1DDE6F0A-CA49-419A-9CE8-A6CA02F43CE0}</ProjectGuid>
4646
<OutputType>Library</OutputType>
4747
<AppDesignerFolder>Properties</AppDesignerFolder>
48-
<RootNamespace>OfficeDevPnP.PowerShell.Commands</RootNamespace>
49-
<AssemblyName>OfficeDevPnP.PowerShell.SP2016.Commands</AssemblyName>
48+
<RootNamespace>SharePointPnP.PowerShell.Commands</RootNamespace>
49+
<AssemblyName>SharePointPnP.PowerShell.SP2016.Commands</AssemblyName>
5050
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
5151
<FileAlignment>512</FileAlignment>
5252
<SccProjectName>

PostBuild.ps1

+40-25
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,40 @@ if($ConfigurationName -like "Debug*")
2727
Write-Host "Copying files from $TargetDir to $DestinationFolder"
2828
Copy-Item "$TargetDir\*.dll" -Destination "$DestinationFolder"
2929
Copy-Item "$TargetDir\*help.xml" -Destination "$DestinationFolder"
30-
if($ConfigurationName -like "Debug15")
31-
{
32-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellSP2013.psd1" -Destination "$DestinationFolder"
33-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.SP2013.Commands.Format.ps1xml" -Destination "$DestinationFolder"
34-
} elseif($ConfigurationName -like "Debug16")
30+
switch($ConfigurationName)
3531
{
36-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPSPowerShellP2016.psd1" -Destination "$DestinationFolder"
37-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.SP2016.Commands.Format.ps1xml" -Destination "$DestinationFolder"
38-
} else {
39-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellOnline.psd1" -Destination "$DestinationFolder"
40-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.Online.Commands.Format.ps1xml" -Destination "$DestinationFolder"
32+
"Debug15" {
33+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellSP2013.psd1" -Destination "$DestinationFolder"
34+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.SP2013.Commands.Format.ps1xml" -Destination "$DestinationFolder"
35+
}
36+
"Debug16" {
37+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellSP2016.psd1" -Destination "$DestinationFolder"
38+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.SP2016.Commands.Format.ps1xml" -Destination "$DestinationFolder"
39+
}
40+
"Debug" {
41+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellOnline.psd1" -Destination "$DestinationFolder"
42+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.Online.Commands.Format.ps1xml" -Destination "$DestinationFolder"
43+
}
4144
}
4245
} elseif ($ConfigurationName -like "Release*")
4346
{
4447
$documentsFolder = [environment]::getfolderpath("mydocuments");
45-
46-
if($ConfigurationName -like "Release15")
48+
switch($ConfigurationName)
4749
{
48-
$DestinationFolder = "$documentsFolder\WindowsPowerShell\Modules\SharePointPnP.PowerShell.V15.Commands"
49-
} else {
50-
$DestinationFolder = "$documentsFolder\WindowsPowerShell\Modules\SharePointPnP.PowerShell.V16.Commands"
50+
"Release15"
51+
{
52+
$DestinationFolder = "$documentsFolder\WindowsPowerShell\Modules\SharePointPnPPowerShellSP2013"
53+
}
54+
"Release16"
55+
{
56+
$DestinationFolder = "$documentsFolder\WindowsPowerShell\Modules\SharePointPnPPowerShellSP2016"
57+
}
58+
"Release"
59+
{
60+
$DestinationFolder = "$documentsFolder\WindowsPowerShell\Modules\SharePointPnPPowerShellOnline"
61+
}
5162
}
63+
5264
# Module folder there?
5365
if(Test-Path $DestinationFolder)
5466
{
@@ -63,17 +75,20 @@ if($ConfigurationName -like "Debug*")
6375
Write-Host "Copying files from $TargetDir to $DestinationFolder"
6476
Copy-Item "$TargetDir\*.dll" -Destination "$DestinationFolder"
6577
Copy-Item "$TargetDir\*help.xml" -Destination "$DestinationFolder"
66-
if($ConfigurationName -like "Release15")
78+
switch($ConfigurationName)
6779
{
68-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellSP2013.psd1" -Destination "$DestinationFolder"
69-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.SP2013.Commands.Format.ps1xml" -Destination "$DestinationFolder"
70-
} elseif($ConfigurationName -like "Release16")
71-
{
72-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellSP2016.psd1" -Destination "$DestinationFolder"
73-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.SP2016.Commands.Format.ps1xml" -Destination "$DestinationFolder"
74-
} else {
75-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellOnline.psd1" -Destination "$DestinationFolder"
76-
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.Online.Commands.Format.ps1xml" -Destination "$DestinationFolder"
80+
"Release15" {
81+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellSP2013.psd1" -Destination "$DestinationFolder"
82+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.SP2013.Commands.Format.ps1xml" -Destination "$DestinationFolder"
83+
}
84+
"Release16" {
85+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellSP2016.psd1" -Destination "$DestinationFolder"
86+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.SP2016.Commands.Format.ps1xml" -Destination "$DestinationFolder"
87+
}
88+
"Release" {
89+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnPPowerShellOnline.psd1" -Destination "$DestinationFolder"
90+
Copy-Item "$TargetDir\ModuleFiles\SharePointPnP.PowerShell.Online.Commands.Format.ps1xml" -Destination "$DestinationFolder"
91+
}
7792
}
7893
}
7994

0 commit comments

Comments
 (0)