A .Net jet peer written in C#
This project uses a Powershell script executed as Pre-bulid event in order to set the AssemblyInformationalVersion to GUID.
Running Powershell scripts seems a little tricky, some information to make it easier:
By default powershell ExecutionPolicy is set to Restriced
, then the Pre-build event throws an error message.
On german system:
"Die Datei "\SharpJet\scripts\version.ps1" kann nicht geladen werden, da die Ausführung von Skripts auf diesem System deaktiviert ist.")
Solution: Lower the restrictions in your Powershell. Unfortunately there are two Powershells on a x64-System:
- 64-Bit Version (default) in \System32\WindowsPowerShell\v1.0\PowerShell.exe
- 32-Bit-Version in \SysWOW64\WindowsPowerShell\v1.0
Yes, that's absolutely weird!!!
Inside the relevant Powershell just execute this command once:
SetExectuionPoliy RemoteSigned
or SetExectuionPoliy Unrestricted
Notice that this enables executing powershell scripts for your system until you reset it to SetExectuionPoliy Unrestricted
. Read the current setting via Get-ExectuionPolicy
.