This commit is contained in:
PitzM 2024-01-26 13:50:42 +01:00
commit 3a1678e742
3 changed files with 25 additions and 0 deletions

View File

@ -146,4 +146,7 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -command "&amp; { &amp;'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' }"</PostBuildEvent>
</PropertyGroup>
</Project>

11
README.md Normal file
View File

@ -0,0 +1,11 @@
# Modules
Diese Projektmappe enthält die Grundfunktionen für alle Produkte in Form von Modulen.
## Deploy Skript
Das Skript `copy-binary.ps1` liegt im Hauptverzeichnis und kann über den folgenden Befehl aufgerufen werden. Der Befehl wird pro Projekt in den Projekteinstellungen unter `Kompilieren > Buildereignisse > Postbuildereignis` eingetragen und sorgt dafür, dass die Assembly des Projekts in ein Deploy Verzeichnis kopiert wird.
```cmd
powershell.exe -command "& { &'$(SolutionDir)copy-binary.ps1' '$(TargetPath)' '$(TargetFileName)' '$(ConfigurationName)' }"
```

11
copy-binary.ps1 Normal file
View File

@ -0,0 +1,11 @@
param(
[String]$SourcePath,
[String]$FileName,
[String]$Configuration
)
if ($Configuration -eq "Release") {
$DestinationPath = "P:\Install .Net\0 DD - Bibliotheken\Modules\$FileName"
Copy-Item $SourcePath -Destination $DestinationPath
}