TFS 2015 ‘Json limit exceeded’ Error - json

I have configured a windows 10 machine to run XML build definition on TFS 2015. When it is running (None interactive mode) we get ‘Json limit exceeded’ error in the middle of the build. it's failing randomly different places of the build. what could be the reason for this?

Related

TFS build and manifest file : the value of attribute version is invalid

I have a TFS 2012 build that (successfully) generates a WPF client application with a manifest file that looks like :
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<asmv1:assemblyIdentity name="MyApp.exe" version="1.0.70109.2" publicKeyToken="0000000000000000" language="fr" processorArchitecture="msil" type="win32" />
<!-- ... -->
</asmv1:assembly>
When I try to launch the application, I have this error :
The application has failed to start because its side-by-side
configuration is incorrect...
In the event log, the error is :
Activation context generation failed for "C:\Dev\MyApp.exe.Manifest".
Error in manifest or policy file "C:\Dev\MyApp.exe.Manifest" on line
3. The value "1.0.70109.2" of attribute "version" in element "assemblyIdentity" is invalid.
What I can tell so far :
It appears that each part of version number is limited to 0-65535 inclusive : Application Manifests on MSDN. Ok, good to know.
I can change the version value by setting 1.0.1.2 and it "fix" the problem (no more errors, the application launches).
When I build it form Visual Studio (Debug and Release), the version value is always 1.1.0.0.
I also noticed that the version was around 60000 until recently where it jumped to around 70000. Can it possibly be dued to the year change : 2016 -> 2017?!
My questions are :
how the TFS build is generating this number?
how can I change it?
FWIW, I also recently upgraded from Visual Studio 2012 to Visual Studio 2015.
Having upgraded from Visual Studio 2012 to Visual Studio 2015, your first step should be to install Visual Studio 2015 on the build server (or else Microsoft Build Tools 2015). Until then, your work will be needlessly hampered by the different logic that currently underlies your local builds versus those performed on your server by the MSBuild TFS workflow activity. Then examine what versioning logic your build definition's selected build process template may be performing outside of MSBuild, and finally choose and implement an approach for versioning that fits your needs.

Cannot run ASP.net 5 projects on VS 2015, both IIS Express and web

I just installed VS 2015 Community without any errors.
When I create any of the ASP.net 5 web templates, the references node has the warning icon on it, and so do its child nodes DNX 4.5.1 and DNX Core 5.0. The app won't build.
I saw somewhere that running dnu restore on the Package Manager Console will do the trick. Well, the warning icons go away and the app will build. However, when I run it, I get 'Could not load file or assembly 'dnx.clr.managed' or one of its dependencies.' on IIS Express and 'An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll' on web.
I tried repairing the VS 2015 installation, rebooted, and I still have the same problem.
Something might be incorrectly set up in my machine or installation. I don't think I should be running dnu restore every time I create a new project off a template (which won't actually run anyway).
I also have VS 2013 Community installed, but I don't think that should matter.
The error regarding dnx.clr.managed in IIS Express may be caused by an obsolete HTTP handler registration - see this answer.

TFS Build partially succeeded when LINQ to SQL is added

VS2008 / TFS Build 3.5 / Ent Lib 4.1
I have a rather large solution that contains several apps. They are all currently using Enterprise Library (v.4.1) for their data access layer.
I added and locally tested a new data access layer that uses LINQ to SQL- it was fast and easy to add and the test went fine. But...
When I checked in the project, it would not complete the build - I get a "Partially Succeeded". There are some warnings, but those exact same warnings were there prior to the build failing.
I took the data access class back out (along with the code that calls it) and rebuilt and it builds fine.
I then added an empty new class and put a single variable in it and referenced it from the code. That built. I then created a new LINQ to SQL class in that new project and did not even reference it. When I checked that in, the build failed again with the "Partially Succeeded" message. No extra errors or warnings.
I love LINQ to SQL, I have used it in a few projects outside of this system, but I now have many hours into attempting to get this to build with no success.
Are all the same tools/libraries installed on the build server as on your desktop - Perhaps the server doesn't have the same vs or .net service pack level? Try running the build "manually" on the build server - load up the solution in Visual Studio on the server and execute the build within the IDE rather than under the TFS build system - this may report problems that you don't see so easily in the automated build.
Check the build log. Visual Studio often reports errors in the output pane text or build-server log text that are not picked up by the GUI error windows. So you will think a build succeeded but an output file has "quietly" not been generated. TFS build logs are usually huge so they are a pain to work through, so start by searching for keywords like "error" or the name of the project that fails rather than trying to read through line by line.
OK, we found it. The issue is on stack overflow elsewhere at
Visual Studio Setup and Deployment build fails with no errors
The issue is a bug in MS setup and deploy that breaks when it hits a line in the project that uses Linq. You have to comment out a line in the project to get it to work. Amazing, ridiculous, and no surprise.
Thanks for the input, it was that input that helped us get to the eventual answer (already on StackOverflow, but didn't have Linq in the title).

MSBuild opens a new instance of Visual Studio

We have been using Visual studio 2010 - 2013 on the build server using the following MSBuild command so far:
Set msBuilder=%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
However recently we moved to VS 2015, and had to uninstall all other VS versions (for saving space), and used the following build location (partially also to cater compilation of C# 6.0 features):
Set msBuilder =%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
This seems to work for most of the VS Solutions we have,however for one particular VS solution, when we execute this line:
Set doSolutionBuild=%msBuilder% MySolution.sln /t:clean;Build /p:Configuration=Release;Architecture=x86;Platform=x86 /v:n
it opens and instance of VS 2015 of the same project on the build server and the build process just hangs there in the command prompt.
Can anyone explain how we could resolve this?

TFS Build Server - Not running tests after upgrade

After upgrading to TFS 2017 (from 2015), our unit tests have stopped working. It does not throw an error, it simply doesn't find any tests even though they are in in the project. This use to work fine before the upgrade.
The screenshot shows all the steps in our process, everything passes. The only problem is it doesn't pick up the existing tests.
Extract from the log:
2017-08-17T15:40:04.2990543Z ##[warning]No results found to publish.
2017-08-17T15:40:04.3070586Z ##[section]Finishing: Test Assemblies \Release*test*.dll;-:\obj**
Have you updated the build agent correspondingly? If not, please update the agent version to match TFS 2017, then try it again.
You can also try below items to narrow down the issue:
Try to run the test locally in command line to check if the test
results exist there.
If you use runsettings file, In your runsettings file, comment out
the ResultsDirectory tag under the RunConfiguration section.
Manually select the Test platform version, eg: select Visual Studio
2015 instead of the Latest
Manually specify the vs test location, Path to vstest.console.exe
Try to use MSTEST step instead of VStest
If that still not work, please share the entire test log here for further troubleshoot.

Resources