When creating the handle to the in progress sentinel, it was failing because the nuget cache folder did not exist yet. Which translated to us understanding that a first time experience was already running. Now, before creating the handle, we check if the nuget folder exists, if it doesn't, we create it, instead of waiting for nuget to do that during restore.

This commit is contained in:
Livar Cunha 2016-06-10 18:17:32 -07:00
parent 2b427bf7db
commit d8c590e4ce

View file

@ -74,6 +74,11 @@ namespace Microsoft.DotNet.Configurer
{
try
{
if(!Directory.Exists(NuGetCachePath))
{
Directory.CreateDirectory(NuGetCachePath);
}
// open an exclusive handle to the in-progress sentinel and mark it for delete on close.
// we open with exclusive FileShare.None access to indicate that the operation is in progress.
// buffer size is minimum since we won't be reading or writing from the file.