Building codes have strict guidelines with respect to diagonal bracing. The code almost always dictates the type of nail, length, shape of the head, special coatings and so forth. The reason is simple: Diagonal bracing is critical to the structural stability of a building.
I’ve always found it best to install diagonal bracing for walls while the wall is built flat on a floor surface. With the wall on the ground, it’s easy to square it up. With the wall square on the ground, you can temporarily toenail the bottom and top plate so the wall doesn’t move while you nail on the plywood or oriented strand board at the corners.