MarcChu;15560 wrote:I'm having this same problem. However, I'm having it in VS2022 preview (it seems that others are having it in VS2019), and I'm not having the problem locally. Rather, I'm having the problem on 2 out of 3 of my distributed nodes (the other one builds just fine). When I first ran into this problem, I thought it might be because I did not have VS2022 Build Tools installed on the nodes, so I went ahead and installed it on all 3 machines. The 3 distributed nodes are virtual machines, and they may each have different environments, e.g. OS version.
Can you check for me which versions of DotNet are installed on your grid nodes? Usually these install to C:\Program Files\dotnet\sdk. I'm curious as to whether the preview of NET6 was rolled out onto them.
MarcChu;15560 wrote:
I'd rather not uninstall my VS2022 preview, but the global.json solution doesn't seem to have any effect, and neither does the custom environment variable solution. Is there something about the fact that these are distributed nodes affect the way these solutions are supposed to work?
In theory, the custom environment variables fix should also work for the grid nodes. However, it's quite possible that the nodes have slightly different versions of DotNet installed. If the environment variables point to versions of DotNet on the nodes that aren't installed, they may be disregarded. We use a grid here internally and I've noticed our minor versions of DotNet often don't seem to be aligned between the machines.
MarcChu;15560 wrote:
As an aside, I'd really like to see a feature that allows me to control the UI for when 1 or more distributed nodes fail to build. I think my biggest annoyance with this problem is that even though my projects all successfully build locally and on one other distributed node, each affected project is displayed as a build failure, and the NCrunch icon in the VS status bar reflects the number of failed builds, rather than the number of successful/failed tests. My feeling on this matter is that this should only be the case when every node fails to build, as I'm much more interested in a syntax/compilation error that would prevent any build and any tests from being run on a project, rather than something like this, which is due only to environment issues.
It's possible to do this using the
required capabilities setting on the projects involved. Basically, you use the capabilities to tell the system which nodes are expected to build which projects. If you have a node where you expect a failure, you use the capabilities to exclude it from building the project. There are no plans to prevent reporting of redundant build failures, as these are actually still problems that users should be made aware of. If a node can't build a particular project, it also can't run any tests that require this project. Such a situation can have a significant impact on the performance of the grid and the usefulness of the node.