我们使用它App Buddy作为我们的 CI/CD 系统。今天我们将项目从 迁移ASP.NET Core 3.1到NET 5. 在 dotnet 构建开始消耗大量 RAM(分配大约 10-12GB)之后,我们的服务器上没有那么多内存。
dotnet build在我们的 CI/CD 服务器上Microsoft.CSharp.Core.targets(71,5): error : Process terminated. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
我尝试过使用-maxCpuCount:1但不起作用。是否有可能限制dotnet build可以使用的内存?
我在带有 C# 的 Unity 中有这个脚本,协程的时间不工作,第二行forwardForce = 10f没有被调用:
using UnityEngine;
using System.Collections;
public class SlowPickup : MonoBehaviour
{
public float waitTime = 2f;
private IEnumerator DecreaseSpeed ()
{
GameObject.Find("Player").GetComponent<PlayerMovement>().forwardForce = 1f;
yield return new WaitForSeconds(waitTime);
GameObject.Find("Player").GetComponent<PlayerMovement>().forwardForce = 10f;
}
void OnTriggerEnter ()
{
Destroy(gameObject);
StartCoroutine(DecreaseSpeed());
}
}
Run Code Online (Sandbox Code Playgroud)