Friday, December 13, 2019

Sample SQL script to delete messages in Service Broker Queue manually

SQL Script:

declare @ch uniqueidentifier
while(1=1)
begin
    select top 1 @ch = conversation_handle from [dbo].[YourQueueName]
    if (@@ROWCOUNT = 0)
    break
    end conversation @ch with cleanup
end

[Solved] AxoCover code coverage fails after upgrading the Visual Studio


Error Message:

No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters.
2) the profiler may not be registered correctly, please refer to the Usage
guide and the -register switch.
Test execution finished.

Solution:
  1. Go to the directory where AxoCover is installed. You can locate this by running a long test (e.g. thread sleep, and open the file location of the AxoCover.Host-*.exe from the task manager. For example for me it is: C:\Users\venkat\AppData\Local\Microsoft\VisualStudio\15.0_6d93d79f\Extensions\pfu3q5ow.kny\
  2. Then navigate to OpenCover\x86 or x64 depending on what platform your tests are running
  3. Open CMD with admin right
  4. Enter: regsvr32 /i OpenCover.Profiler.dll
  5. You will get a dialog that DLL is registered.

Now your coverage will run again.