예제 #1
0
        public void Initalize(IConfiguration configuration)
        {
            _logger.LogInformation($"Initializing in {_environment.Path}");

            if (!bool.TryParse(configuration["enablePackageRestore"], out _enableRestorePackages))
            {
                _enableRestorePackages = false;
            }

            _logger.LogInformation($"Auto package restore: {_enableRestorePackages}");

            _workspaceContext = WorkspaceContext.CreateFrom(_environment.Path);
            if (_workspaceContext == null)
            {
                throw new NotImplementedException($"Failed to initialize {typeof(WorkspaceContext)} at {_environment.Path}.");
            }

            Update(allowRestore: true);
        }