Visual Studio Team Services (was Visual Studio Online) TestResults - Open attachment in browser - visual-studio

We're using MSTest with Team Services (was Visual Studio Online) builds to run our Selenium Tests and, for the failed ones, I'm taking a screenshot in the TestCleanup that added to the Test Results by using TestContext.
Now, when I'm checking the test results for the failed tests, and want to open the attachment (a .png image), Team Services is always prompting for download instead of just displaying it in the browser, which could really become a pain when you have a new build of your app and a lot stuff was changed causing multiple tests to fail.
Is there any possibility to force Team Services or the browser to open the images in the browser?
I'm open to anything from changing the type of attachment, potential "hacks" that could determine Team Services to display the image in browser, browser extensions, etc.

There isn't any option to configure this at VSTS/VSO side for now, I have help you submit a feature request on VSTS User Voice, refer to this link for details: Open attachments of test result from web portal in browser.
However, if you are using Firefox, I know there is an Open in Browser add-on which allow you to open the document from browser directly.

Related

SharePoint remote event receiver debugging stuck at grant permissions page

I'm trying to create a remote event receiver for a SharePoint online dev site (referred guide - https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/handle-list-item-events-in-the-provider-hosted-add-in) using visual studio 2022 community edition.
It is intended to handle 'item being updated' event. I'm using azure service bus namespace to debug the solution. The same is added in the code. After pressing F5 to start debugging a blank screen opens within visual studio with the title Grant permissions to the Add-in (attached image).
It does not load even if I wait for an hour. If I close the window, the code will run into an exception on execute query call due to no permission.
Please note that the same code works perfectly fine if I publish it in an Azure app service and install the add-in package manually in the site.
Please share if you have any suggestions.
Thank you.
Expected action: Add-in will be temporarily installed to the site, a pop up will appear to trust the add-in and code will run fine.

How to prevent Visual Studio 2019 [16.10.3] from auto page refresh in browser when changing any .js file?

After upgrading to Visual Studio Community 2019 [16.10.3] from [16.9.x] Chrome gets updated every time I save any javascript file. In my workflow it is annoying and does not bring my work any benefits. How to disable this feature?
I spent couple hours on searching the internet for the answer, but failed. It may be related to Hot Reload feature, but I still did not find an answer
I also want to disable this and what I found is that a javascript file named aspnetcore-browser-refresh.js is injected into the rendered page. The code in that file sets up a web socket to your web server which then allows the web server to issue a remote refresh of the browser. The browser refresh is triggered by something called dotnet watch, which is a process watching all the files in your project to see if any have changed.
You can read about it here: https://learn.microsoft.com/en-us/aspnet/core/tutorials/dotnet-watch?view=aspnetcore-5.0#run-net-core-cli-commands-using-dotnet-watch
Apparently this is a new feature in VS2019 for ASP .NET Core apps and is enabled by default.
HOW TO DISABLE
Go to Tools > ⚙ Options > Projects and Solutions > ASP .NET Core
Select Auto build and refresh browser after saving changes in Auto build and refresh option

Enable extensions when debugging website in Chrome from Visual Studio 2017

Switching from Visual Studio 2015 to 2017 I find that launching a Web API project now starts a clean, separate Chrome window. For the most part I like that, and I certainly like the idea, however: this also means extensions are missing in Chrome.
Is there a way to start a Web API project from Visual Studio 2017 and have Chrome launch with extensions enabled?
Or, failing that, could I revert back to the old behavior where my project is opened as a fresh tab in my existing Chrome window?
I've tried Googling but found nothing. I checked the dropdown in Visual Studio with browsers (and checked the "Browse With..." dialog) but found no solution there either.
All you need to do is to sign-in to the instance of Chrome that VS2017 launches as the user you have all your usual extensions installed under (i.e. sign-in as the same user you usually sign-in as).
This sign-in "sticks", so extensions will load in the current - and all subsequent - debugging sessions.
You can revert back to the old behavior by
Debug > Options > Debugging > General > (uncheck) Enable JavaScript debugging for ASP.Net (Chrome and IE).
Is there a way to start a Web API project from Visual Studio 2017 and have Chrome launch with extensions enabled?
Yes, but it works for one project only, mean you need to re-install extensions when you launch a brand new project. I tried Sync in Chrome (not work).
In my opinion, there are something to do with Chrome remote debugging protocol profile. I hope someone knows about Chrome can give a final solution for this.
you can study more here: remote debugging protocol
There is a way that you no need to change anything. But it annoying.
Because Visual Studio 2017 use an instance of Chrome for debug mode when you hit F5, so you can leave that debug mode instance with remote debugging protocol open, and use your default Chrome instance with full extensions. Just copy and paste the link into your favorite Chrome instance.
Cheer! hope it help.

Outlook mail addin caches cant reload the debugging version

We are developing an Outlook Mail Addin for our product.
When i debug the solution in Visual Studio my Office365 Outlook account opens and i can see the plugin i developed in the list of outlook plugins and i can use it.
The problem is that even after stopping the solution in Visual Studio i can still use the plugin. And when i re-run the solution it displays the cached version of the addin not the current version that i have in visual studio.
Looks like the addin is cached somewhere. Can't seem to stop it.
How can i solve this problem?
The add-in doesn't get cached, it always loads from the source location set in your manifest. During testing, when you build the solution the app gets deployed to the Mailbox you specify. However, the app can only run while your local web server is running. The add-in's tab will continue to be displayed, but if your web server has stopped it will fail when it loads - it should never load a cached version. You'll have to manually uninstall the add-in from the add-in page if you don't want it to run while you're not debugging.
Your browser is caching the files used by your add-in. If you deploy an updated version your browser will rely on the old files it still got cached. Deleting your browser's cache should solve the problem.

In Visual Studio web performance test Recording is started but script is not generated? why?

I'm using visual studio 2010. i'm try to do web performance test. so i've done all settings correctly. click the start recording button. that time browser was automatically opened with that particular webpage. i do some actions. but that actions scripts are not generated in in my visual studio web test. last two months ago i worked this test successfully. but now i can't get it. so please help me...
I think it depends on what kinda of API requests you want to record. For HTTP request from Internet Explorer, you should be able to record everything with Visual Studio; but for HTTPS requests or requests from other browsers other than , Fiddler is a definitely better tool to record requests instead of using only Visual Studio. This doc may be helpful to you for using Fiddler:
http://www.alexandervanwynsberghe.be/creating-a-web-performance-test-using-fiddler/
and
http://docs.telerik.com/fiddler/configure-fiddler/tasks/configurefiddler

Resources