Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Cannot get Grid Node Server with VS 2019 Tools to build .NET Sdk Project
jaymclain
#1 Posted : Wednesday, July 10, 2019 1:19:54 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2016(UTC)
Posts: 4
Location: United States of America

Was thanked: 2 time(s) in 2 post(s)
Hi, I've been attempting to get a grid node server setup with VS 2019 tools to build a .NET Sdk project.

Everything seems to build and run locally fine, but when I enable the grid node in the "NCrunch Distributed Processing" panel, the build fails on the node server (see error below).

I created a sample project which demonstrates the issue I've encountered. It's a very simple project file:

Code:
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
  </PropertyGroup>

</Project>



With one file (Class1.cs):

Code:
namespace Infrastructure
{
    public class Class1
    {
    }
}


I receive the following output attempting to build the assembly:

Code:
NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/documentation/troubleshooting_project-build-issues
NCrunch: The build results for this project are not consistent across all computers within the grid.

This project was successfully built on computers: (local)
This project failed to build on computers: CAB3F10EDEC5

Associated tests will continue to run on computers that are able to build this project successfully.  Please ensure all computers within the grid are configured correctly with all required SDKs installed.

****************** BUILD OUTPUT FROM 'CAB3F10EDEC5' ******************

NCrunch was unable to parse this project file because of an unexpected error: Microsoft.Build.Exceptions.InvalidProjectFileException: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
   at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   at Microsoft.Build.Construction.ProjectParser.Parse()
   at Microsoft.Build.Construction.ProjectParser.Parse(XmlDocumentWithLocation document, ProjectRootElement projectRootElement)
   at Microsoft.Build.Evaluation.Project..ctor(XmlReader xmlReader, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
   at nCrunch.VSIntegration2010.MSBuildIntegration.BuildableProject2010.Initialise(BuildXml buildXml, FilePath projectFilePath, IDictionary`2 globalProperties)
   at nCrunch.Compiler.RemoteBuildRunner.(ComponentBuildParameters , BuildOutput )
   at nCrunch.Compiler.RemoteBuildRunner..()
   at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   at nCrunch.Compiler.RemoteBuildRunner.(ComponentBuildParameters )



I have validated the tools are installed to "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
and the .Net Sdk is installed to "C:\Program Files\dotnet\sdk"

And, I have attempted the suggestions in other articles I found in the forums, including:

1. Setting the environment variable:
NCrunchVSInstallPath.VS2019="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"

2. Setting the environment variable:
VSINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"

Any help would be appreciated.

jaymclain
#2 Posted : Wednesday, July 10, 2019 1:23:53 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2016(UTC)
Posts: 4
Location: United States of America

Was thanked: 2 time(s) in 2 post(s)
Sorry for the quick reply...but, I forgot to note that I have tried Grid Node Server 3.28 (downloaded from the website), and 3.29.0.3 which was referenced in another support issue to fix a project file parsing issue -- I receive the same error result from both versions.

- Jay
michaelkroes
#3 Posted : Thursday, July 11, 2019 8:51:53 AM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 134
Location: Netherlands

Thanks: 58 times
Was thanked: 26 time(s) in 24 post(s)
Hi thanks for posting.

I'm investigating this. I'll let you know what I find.
michaelkroes
#4 Posted : Thursday, July 11, 2019 12:50:24 PM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 134
Location: Netherlands

Thanks: 58 times
Was thanked: 26 time(s) in 24 post(s)
I've tried to reproduce this issue. I've setup a clean VM with just the VS2019 build tools and the latest grid node server and create a multitargetted project like you have. I couldn't get this to fail.

This leads me to believe that we are having some issues finding the version of VS.

Could you confirm that the version of VS you are using is VS2019?

Could you try and stop the gridnode service via services.msc and start the gridnode executable manually via the desktop and try again?
jaymclain
#5 Posted : Thursday, July 11, 2019 7:39:24 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2016(UTC)
Posts: 4
Location: United States of America

Was thanked: 2 time(s) in 2 post(s)
Weird, ya, it seemed to work just fine when running the console app...

This is what I did from a powershell:

stop-service NCrunchGridNode
get-service NCrunchGridNode
cd "C:\Program Files (x86)\Remco Software\NCrunch Grid Node Server"
.\NCrunch.GridNode.Console.exe

Then, restarted NCrunch engine in my solution.

That worked...so, then I killed that process and:

start-service NCrunchGridNode

Then, restarted NCrunch engine in my soluation.

That failed with the error I initially reported...

"NCrunch was unable to parse this project file because of an unexpected error: Microsoft.Build.Exceptions.InvalidProjectFileException"
1 user thanked jaymclain for this useful post.
michaelkroes on 7/12/2019(UTC)
jaymclain
#6 Posted : Thursday, July 11, 2019 9:09:20 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2016(UTC)
Posts: 4
Location: United States of America

Was thanked: 2 time(s) in 2 post(s)
I think I figured it out! Thanks for your tip on running the GridNode.Console. That pointed me towards the environment config -- which, it tuns out was correct for the local user, but not configured for the system-wide environment.

So, running:

SETX /M NCrunchVSInstallPath.VS2019 "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\"

allowed the service to correctly find the 2019 build tools.

I also set VSINSTALLDIR the same way -- but not sure that really helped anything...

Looks like I am up and running now.

-Jay
1 user thanked jaymclain for this useful post.
michaelkroes on 7/12/2019(UTC)
michaelkroes
#7 Posted : Friday, July 12, 2019 6:07:34 AM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 134
Location: Netherlands

Thanks: 58 times
Was thanked: 26 time(s) in 24 post(s)
Glad that worked!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.045 seconds.