K2NE / K2NEServiceBroker

The k2NE Service Broker
12 stars 19 forks source link

Build Fails when running UpdateBuildNR.ps1 #122

Closed markman623 closed 4 years ago

markman623 commented 5 years ago

The following error occurs:

Severity Code Description Project File Line Suppression State Error The command "powershell.exe -file "C:\Users\Administrator\Desktop\K2NEServiceBroker-master\K2NEServiceBroker-master\Solution Files\UpdateBuildNr.ps1"" exited with code 1. K2Field.K2NE.ServiceBroker

This is on 8.1 Core Lite, VS 2017

Fails on line:

$AssemInfo = split-path -Path $PSScriptRoot -parent

Due to the following issues:

https://stackoverflow.com/questions/44474074/powershell-psscriptroot-is-null

I believe the line should be changed to:

$AssemInfo = if ($psISE) { Split-Path -Path $psISE.CurrentFile.FullPath -parent
} else { split-path -Path $PSScriptRoot -parent }

But have to test more.

cyclops1982 commented 5 years ago

Pull requests are welcome! :)

cyclops1982 commented 4 years ago

Can't reproduce this one on VS2017 to be honest. Did change something to the script, but that had nothing to do with $PSScriptROot.