jeudi 17 octobre 2019

Powershell: Get all Methods by Attribute from a .NET Core dll using Reflection

I want to get the names of the methods that have the [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute] assigned to them using Powershell. The methods are inside a dll which has been published by a .NET Core Project. I'm pretty sure this is possible somehow by reflection, but since I don't use Powershell I have no Idea whats the best way to achieve this.

I don't need to invoke any method, I just need to get all the names as string inside an array.





Aucun commentaire:

Enregistrer un commentaire