Why is [AssemblyInitialize] and [AssemblyCleanup] being called twice in same test project assembly?

后端 未结 3 2147
长发绾君心
长发绾君心 2021-02-15 02:27

I thought the whole purpose of these attributes was to run them only once per assembly. I have a simple class as follows:

[TestClass]
public class AssemblyIntegr         


        
3条回答
  •  无人共我
    2021-02-15 02:44

    In my case, it was a misbehavior of QTAgent32.exe process that was causing [AssemblyInitialize] to be executed twice. Restarting the host machine where my code was built and executed solved the issue for me.

提交回复
热议问题