diff --git a/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs b/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs index 1a8a5e1..296bb48 100644 --- a/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs +++ b/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs @@ -91,9 +91,9 @@ namespace Microsoft.AspNetCore.NodeServices var nodePathValue = existingNodePath + Path.Combine(_projectPath, "node_modules"); #if NET451 - startInfo.EnvironmentVariables.Add("NODE_PATH", nodePathValue); + startInfo.EnvironmentVariables["NODE_PATH"] = nodePathValue; #else - startInfo.Environment.Add("NODE_PATH", nodePathValue); + startInfo.Environment["NODE_PATH"] = nodePathValue; #endif _nodeProcess = Process.Start(startInfo);