Why does the Azure Devops extension show all code as Not My Code? - ndepend

When running the NDepend Azure Devops extension for my main build solution, the lines of code show no lines of code for my code and show everything as NotMyCode and I can not determine why. The JustMyCode Code Elements query from the desktop version indicates hundreds of thousands of elements that are my code. I'm not sure where to start looking or what could cause this.

In this case, a release build was being generated rather than a debug build, so PDBs were missing.

Related

Getting started with Azure Spatial Anchors: CreateAzureAnchor() crash or taking a long time to load

I have been following this tutorial:
https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/tutorials/mr-learning-asa-02
there were some necessary configurations and steps not included in the tutorial like:
it needed an ARCameraManager error log
it needed an ARSession error log
it needed an ARAnchorManager error log
which I configured as I keep getting errors and fixing it along the way
and was able to deploy, test and follow the in-device tutorial:
Move the cube to a different location
Start Azure Session
Create Azure Anchor (creates an anchor at the location of the cube).
......
but I got stuck in #3
when I tap for create Azure button, it just crash but when I check the Debug version, it didn't actually crash cause there were no actual errors, I think it just keeps loading and/or working on the current main thread because everything disappeared when I tap the create Azure Button.
I check the codes of its corresponding function and this is it:
as you may notice it has an error, this is the actual script from the package I download, but all I had to do to fix this is add ".Result" after ".GetPointer()"
I divided the script and added logs so I can see which part is the problem:
the very last to log is: "tastInpt" which means getting the result is the problem.
is this fixable? can anyone help me get through this?
Could you provide little more info about your environment? For example, Unity version, Azure Spatial Anchors (ASA) SDK version and OS version of your HoloLens 2 device.
Are you using the matching ASA SDK for your Unity? In the tutorial you mentioned above has a link to this page: https://learn.microsoft.com/en-us/azure/spatial-anchors/how-tos/setup-unity-project?tabs=unity-package-web-ui
Some common mistakes includes the version mismatch - Unity 2019 requires ASA SDK 2.7 or above and below 2.9, and Unity 2020 requires min version of 2.9.
Was able to fix this on my own by using this:
a github repository of Azure samples. I actually don't know why this worked but the samples from Microsoft didn't. but here you go:
https://github.com/Azure/azure-spatial-anchors-samples
I just realize my fix for that error:
gameObject.GetComponent<UnityEngine.XR.WSA.WorldAnchor>().SetNativeSpatialAnchorPtr(currentCloudAnchor.LocalAnchor);
is just to comment it out since I thought this won't be necessary, because I was yet to start development and as I understand (from reading the code) that this is just for loading the anchor not creating it, but I might be wrong. but anyway It's one of the things we must fix also in order to load. or create(if this does indeed help with the create anchor feature)
again this script is from:
MRTK.HoloLens2.Unity.Tutorials.Assets.AzureSpatialAnchors.2.5.3.unitypackage

How to name a pipeline?

When I create build pipeline they all have the same name in the builds sections of AP but with a number in parenthesis after.
How can I give it a custom name?
I googled it and the answer was to use visual designer but for me there is no longer an option to switch to visual designer. I tried adding a name property to pipeline but this just name the build that is run, not the build configuration.
I would like to be able to see which of my builds I am running before running it.
Yeah that feature is pretty hidden at the moment. I suppose it'll move to the settings panel soon, but now, depending on the pipeline features you've opted-in to, this is how to find the place to rename:
: in the upper right corner next to run
âš¡Triggers
YAML

Adding Bugs with Repro Steps directly from Test Results

I've written some test scripts & run them using the test runner. This has worked great, but unfortunately I didn't record the bugs at the time, via the test runner (just failed the steps and added comments).
When I review the Test Run Results I can create a bug for the Dev Team, but the Repro Steps box doesn't get populated with anything meaningful (see image1). I've spotted that the DevTeam can get to the test results via the 'Links' tab on the Bug, but it's a bit clunky:
However if I'd created a bug direct from the test runner, the bugs Repro Steps box gets populated with exactly what the DevTeam needs:
Does anyone know how/if I can generate the same nicely formatted test runner Repro Steps if I create a bug from the Test Results after testing? (I've got a few to do, so would prefer not to re-run the tests....)
You can write some code that will read test run content and copy paste this in bugs because this is just html in content of bug.
The best approach would be to create bug, and later on link test run to created bug.

When using Ember-cli-blanket for coverage data includes files from Ember itself instead of only files I created

I added ember-cli-blanket into my project and managed to get it working fine. localhost:4200/tests?coverage would show the coverage data. However it included files such as 'project/components/modal-dialog' or 'project/components/modal-dialog-overlay' in the results, which are not files in the project, but are included by Ember since the project uses a modal dialog in one of the template files. These extra test files don't give me anything new since I'm not testing the ember codebase and actually muddle the results by mixing in my tests with other ones. The project is still small, and with ~11 actual files needing testing, there were around 12 files I had to add to the loaderExclusions in blanket-options.js. Some could be gotten rid of with an exclusion like:
loaderExclusions: ['project/initializers'],
But for the ones under project/components, I do want to test the components that are part of the project, so I had to exclude each one individually. And there's no guarantee that excluding all initializers files won't come back to bite me if I actually end up with any files in there I want to test. Considering how small the project is so far, and the fact that there are more exclusions than actual files, this doesn't seem like a sustainable solution.
Am I doing something wrong in my set-up? Is this something I can solve with my filter which is currently on a default of:
filter: '/.*project/.*/',
Any help would be appreciated.
As a sidenote, I've been looking into testem with Istanbul as well as Karma as other options for coverage data in Ember but have been unable to get anywhere with them. If you have suggestions on the setup for those that would also be fine.
It doesn't look like there's anything wrong with your setup. What you're seeing is apparently due to how blanket.js works. See this issue for more information: https://github.com/sglanzer/ember-cli-blanket/issues/17
I was using ember-cli-blanket then found ember-cli-code-coverage. As of this writing, the sandersky fork, at 9f1dd33f, works great for me to solve the type of problem you're describing.
https://github.com/kategengler/ember-cli-code-coverage/pull/11
It solves it not using blanket, but using istanbul.

CruiseControl.NET - how to trigger build upon project failure

I have some internal errors coming up from 3rd party libraries during the build of a complex solution in VS2010 and sometime also errors accessing time servers on the net.
I can detect these particular build errors by parsing the build log file.
my normal trigger is:
<intervalTrigger
name="Build Upon Check-In Modifications"
seconds="300"
buildCondition="IfModificationExists"
initialSeconds="300"/>
how do I add a trigger that triggers the build again if the project build failed due to above mentioned errors? Normally repeating the build gets rid of the errors...(also, my parsing of build log file is in C# and is under my control)
The only thing I can think of right away is having another project, pointing to the same sources, but triggered by the project trigger, which in its turn it tied to the first project. The project trigger can be configured to start the build only in case of master build failure.
That's answer to the technical side, but semantically it looks quite weird to work it around this way. The better way would be to spend some time and find out the exact problems and handle appropriately. For instance, if you depend on the web services, which are unavailable, you can create a loop of tries and have the number of attempts configurable, and so on.
Hope you get the idea.