Build/Test Issues

Problems with .slnx format on buildserver

Started by pgpacc on 870 views

Just migrated my solution to .slnx format

In Visual Studio ncrunch is happy.

But when building on the build server I get this:

[PID:338172 07.26.14.7233 InitialisationQueueTask-19] ERROR (Load): Error occurred during load of component at C:\Users\me\work\master.slnx: System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Build.Exceptions.InvalidProjectFileException: The project file could not be loaded. Unexpected end of file has occurred. The following elements are not closed: Folder, Solution. Line 138, position 11.  C:\Users\me\work\nCrunchTemp_836484fc-a87b-45b2-947f-a8f2bc5ea2f0.slnx ---> System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: Folder, Solution. Line 138, position 11.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)




And sure enough, the nCrunchTemp_836484fc-a87b-45b2-947f-a8f2bc5ea2f0.slnx is malformed.

It starts like this:


<Solution>
  <Folder Name="/Common/">
    <Project DefaultTargets="Build;NCrunchOutputDataQuery" Path="src/Common/CommonStandard.Tests/CommonStandard.Tests.csproj" />
    <Project Path="src/Common/CommonStandard/CommonStandard.csproj" />


and ends like this:

<Message Text="#38f850127f904b3a8ccef909ee92b8b0=$(OutputType)"/>
<Message Text="#Shadow=;@(Shadow)"/>
</Target>
</Project>


Clearly the last line should have to be </Solution>

To build, I run this command:
& "C:\Program Files (x86)\Remco Software\NCrunch Console Tool\NCrunch.exe" .\master.slnx


NCrunch Console Tool v5.20.0.2
Hi, thanks for sharing this issue.

v5.20 has a problem where the console tool is trying to load the .slnx file as if it's a .sln.

Would you be interested in trying the build below to see if this solves the problem for you?

NCrunch_Console_5.21.0.5.msi
NCrunch_Console_5.21.0.5.zip
NCrunch_GridNodeServer_5.21.0.5.msi
NCrunch_GridNodeServer_5.21.0.5.zip
NCrunch_LicenseServer_5.21.0.5.zip
NCrunch_Rider_5.21.0.5.7z
NCrunch_Rider_5.21.0.5.zip
NCrunch_VS2017_5.21.0.5.msi
NCrunch_VS2017_5.21.0.5.msi.7z
NCrunch_VS2017_5.21.0.5.zip
NCrunch_VS2019_5.21.0.5.msi
NCrunch_VS2019_5.21.0.5.msi.7z
NCrunch_VS2019_5.21.0.5.zip
NCrunch_VS2022_5.21.0.5.msi
NCrunch_VS2022_5.21.0.5.msi.7z
NCrunch_VS2022_5.21.0.5.zip
NCrunch_VS2026_5.21.0.5.msi
NCrunch_VS2026_5.21.0.5.msi.7z
NCrunch_VS2026_5.21.0.5.zip
I have installed 5.21.0.5 and now it does not generate an error.

But my build report is kind of empty :(

Tests passed: 0, failed: 0, not run 0


Compare to when I run it against the .sln

Tests passed: 8852, failed: 0, not run 0
Does NCrunch itself (i.e. the IDE plugin) work OK for this .slnx?

Is your .slnx something you're able to share with me? If so, could you submit it through the NCrunch contact form?
It is working fine in VS2026. Both NCrunch 5.20.0.2 and 5.21.0.5. I'll send my .slnx through the form.
Thanks for sending through the .slnx. It looks like I didn't add handling for the folders. Would you like to try the build below to see if this works for you?

NCrunch_Console_5.21.0.6.msi
NCrunch_Console_5.21.0.6.zip
NCrunch_GridNodeServer_5.21.0.6.msi
NCrunch_GridNodeServer_5.21.0.6.zip
NCrunch_LicenseServer_5.21.0.6.zip
NCrunch_Rider_5.21.0.6.7z
NCrunch_Rider_5.21.0.6.zip
NCrunch_VS2017_5.21.0.6.msi
NCrunch_VS2017_5.21.0.6.msi.7z
NCrunch_VS2017_5.21.0.6.zip
NCrunch_VS2019_5.21.0.6.msi
NCrunch_VS2019_5.21.0.6.msi.7z
NCrunch_VS2019_5.21.0.6.zip
NCrunch_VS2022_5.21.0.6.msi
NCrunch_VS2022_5.21.0.6.msi.7z
NCrunch_VS2022_5.21.0.6.zip
NCrunch_VS2026_5.21.0.6.msi
NCrunch_VS2026_5.21.0.6.msi.7z
NCrunch_VS2026_5.21.0.6.zip
Much better 😊

It seems to be working now. Thank you very much 👍

Post a reply

Log in to reply.