Closed daz10000 closed 8 months ago
I closed my running dotnet process, restarted the build and it is upgrading to 2.1.3 successfully now, suggest catching that System.UnauthorizedAccessException exception and emitting an error about closing running dotnet processes before building again.
I suppose the easiest workaround is just not to (re)install dotnet on every build. i.e. ignore the target
Target "InstallDotNetCore" (fun _ ->
dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion
)
into
Target "InstallDotNetCore" DoNothing
// or
Target "InstallDotNetCore" (fun _ -> ())
I did this before because it takes too much time to install. Shouldn't the build script check whether or not the latest dotnet is installed and then decide to download the latest version of not?
FAKE had a bug which caused it to reinstall dotnet in every build. Upgrading FAKE to the latest version should fix this behaviour
A clean build of a fresh pull of safe-bookstore fails when it tries to reinstall the dotnetskd
I did a fresh pull of the repo and a ./build.sh and at some point the process tried to reinstall the dotnetsdk (this seems a little aggressive for a build script BTW). As I am using dotnet for other projects right now on the machine this failed.
Repro steps
Clone the repo (win10)
Use dotnet to run a different program
Perform ./build.sh
Expected behavior
I would expect the build to succeed or if an SDK upgrade is absolutely necessary and impossible, to provide a clean error message on exit,
Actual behavior
Known workarounds
I presume closing all my running dotnetcore binaries and restarting the build will work
Related information
Product Information: Version: 2.1.2 Commit SHA-1 hash: 5695315371
Runtime Environment: OS Name: Windows OS Version: 10.0.16299 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.2\
Microsoft .NET Core Shared Framework Host
Version : 2.0.3 Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df output.txt