I just added a new agent and new release environment to a release definition that works in another environment. However, my new environment fails simply initializing the environment:

14:32:29.379545 Sending trace output to log files: C:\agent_vsts_20160524\_diag
14:32:29.379545 vsoWorker.exe was run with the following command line:
"C:\agent_vsts_20160524\agent\worker\vsoWorker.exe" /name:Worker-6162aacc-e311-42ac-8fc2-a78c29cfd308 /id:6162aacc-e311-42ac-8fc2-a78c29cfd308 /rootFolder:"C:\agent_vsts_20160524" /logger:Forwarding,1.0.0;Verbosity=Verbose,Name=Agent4-dc5f27cd7c63cac725fb0b98dc4ec04a;JobId=6162aacc-e311-42ac-8fc2-a78c29cfd308
14:32:29.379545 VsoWorker.Main(): Create AgentLogger
14:32:29.379545 VsoWorker.Main(): Parse command line
14:32:29.379545 VsoWorker.Main(): Setup Agent
14:32:29.379545 VsoWorker.LoadSettings()
14:32:29.473285 SettingsFileHelper.Load - settings[AutoUpdate]=True
14:32:29.473285 SettingsFileHelper.Load - settings[RootFolder]=C:\agent_vsts_20160524
14:32:29.473285 SettingsFileHelper.Load - settings[WorkFolder]=C:\agent_vsts_20160524\_work
14:32:29.473285 SettingsFileHelper.Load - settings[ServerUrl]=https://########.visualstudio.com
14:32:29.473285 SettingsFileHelper.Load - settings[AgentName]=########
14:32:29.473285 SettingsFileHelper.Load - settings[PoolId]=3
14:32:29.473285 SettingsFileHelper.Load - settings[PoolName]=##########
14:32:29.473285 SettingsFileHelper.Load - settings[AgentId]=4
14:32:29.473285 SettingsFileHelper.Load - settings[RunAsWindowsService]=True
14:32:29.473285 SettingsFileHelper.Load - settings[WindowsServiceName]=vsoagent.#####.#####
14:32:29.473285 SettingsFileHelper.Load - settings[WindowsServiceDisplayName]=VSO Agent (#####.#####)
14:32:29.473285 AgentWorkerIPCListener(jobId = 6162aacc-e311-42ac-8fc2-a78c29cfd308)
14:32:29.473285 AgentWorkerIPCListener.Pipename = net.pipe://localhost/6162aacc-e311-42ac-8fc2-a78c29cfd308
14:32:29.488910 VsoWorker.Main(): Run Agent
14:32:29.520161 AgentWorkerIPCListener.Listen() - opening host
14:32:29.537025 AgentWorkerIPCListener.Listen() - waiting for shutdown
14:32:29.692524 AgentWorkerIPCService.Connect
14:32:29.692524 AgentWorkerIPCService.StartJob - firing StartJob event
14:32:29.692524 AgentWorkerIPCService.Disconnect
14:32:30.207695 ForwardingWriter.Initialize(6)
14:32:30.207695 ForwardingWriter.Initialize() - namedpipe = net.pipe://localhost/Agent4-dc5f27cd7c63cac725fb0b98dc4ec04a
14:32:30.223323 BaseLogger.RegisterWriter(name=Forwarding, writer, verbosity=Verbose
14:32:30.223323 BaseLogger.RegisterWriter: writer type Microsoft.TeamFoundation.DistributedTask.Agent.Logger.ForwardingWriter
14:32:30.238944 JobExtensionManager.LoadExtensions(pluginPath=)
14:32:30.363949 JobExtensionManager.OnBeforePrepareEnvironment
14:32:30.363949 JobExtensionManager.OnPrepareEnvironment
14:32:30.363949 ---------------------------------------------------------------------------
14:32:30.363949 System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.
14:32:30.363949 at Microsoft.TeamFoundation.DistributedTask.Plugin.Release.ReleaseJobExtension.OnPrepareEnvironment(IJobContext context, IDictionary`2 savedSettings, IJobRequest job, CancellationToken cancellationToken)
14:32:30.363949 at Microsoft.TeamFoundation.DistributedTask.Worker.JobExtensionManager.<>c__DisplayClass10_0.<OnPrepareEnvironment>b__0()
14:32:30.363949 at Microsoft.TeamFoundation.DistributedTask.Worker.JobExtensionManager.TryAction(String method, Action action, Boolean throwOnError)
14:32:30.363949 at Microsoft.TeamFoundation.DistributedTask.Plugin.Release.ReleaseJobExtension.OnPrepareEnvironment(IJobContext context, IDictionary`2 savedSettings, IJobRequest job, CancellationToken cancellationToken)
14:32:30.363949 at Microsoft.TeamFoundation.DistributedTask.Worker.JobExtensionManager.<>c__DisplayClass10_0.<OnPrepareEnvironment>b__0()
14:32:30.363949 at Microsoft.TeamFoundation.DistributedTask.Worker.JobExtensionManager.TryAction(String method, Action action, Boolean throwOnError)
14:32:30.363949 ---------------------------------------------------------------------------
14:32:30.363949 JobExtensionManager.OnBeforeFinalizeJob
14:32:30.363949 JobExtensionManager.OnFinalizeJob
14:32:30.363949 JobExtensionManager.OnAfterFinalizeJob
14:32:30.395219 BaseLogger.LogStatus(scope.JobId = 6162aacc-e311-42ac-8fc2-a78c29cfd308, scope.TimelineRecordId = 386c08fb-bd0d-4455-b26a-66514d2a4f0a, record.Name = Release)
14:32:30.457701 Process logging event with context handler.
14:32:30.473511 BaseLogger.LogConsoleMessage(scope.JobId = 6162aacc-e311-42ac-8fc2-a78c29cfd308, message = ##[error]Method not found: '!!0[] System.Array.Empty()'.)
14:32:30.473511 AgentWorkerIPCListener.Listen() - closing
14:32:30.473511 AgentWorkerIPCListener.Listen() - closed
14:32:30.488952 BaseLogger.LogAttachment(scope.JobId = 6162aacc-e311-42ac-8fc2-a78c29cfd308, type = DistributedTask.Core.Log, name = Release, path = C:\agent_vsts_20160524\_diag\w6162aacc-e311-42ac-8fc2-a78c29cfd308.log)
14:32:30.504577 BaseLogger.Dispose()
14:32:30.504577 BaseLogger.Dispose(): disposing writer Forwarding
14:32:30.504577 ForwardingWriter.Dispose()
14:32:30.504577 ForwardingWriter.Dispose() - disconnecting proxy logger
I'm on agent version 1.100
@peder Try install .net 4.6 on the agent box. I am trying to fix this issue.
@Ting, that issue isn't with the agent that's in this repo, correct?
@bryanmacfarlane It not the new agent, i didn't pay attention to the log.
Sorry, is this not the correct place to report the issue?
Installing .NET 4.6 worked. Thanks.
This repo is for the next releases build agent which combined our closed source windows agent and our open source node agent into one xplat agent written for .net core. I see from the log you're using the closed source existing windows agent (which isn't this one :)). But @ting said this could also happen with this one so we're tracking here.
had the same issue, installing .Net 4.6 just solved it. Thanks guys and good luck patching
RM guys had already made PR to remove .net 4.6 dependency.