开发者

NUnit locks my executable so that I can't recompile it

开发者 https://www.devze.com 2023-01-20 13:06 出处:网络
When I load my executable in NUnit, the application appears to be \"locked\". I run the tests but when I want to make some modifications to them, I have to close NUnit fi开发者_JAVA百科rst otherwise m

When I load my executable in NUnit, the application appears to be "locked". I run the tests but when I want to make some modifications to them, I have to close NUnit fi开发者_JAVA百科rst otherwise my compilation will fail.

Is there any workaround for this?

EDIT

According to Process Explorer, the only process accessing my executable right now are "nunit-agent.exe" and "nunit.exe"


Check that you have "Enable Shadow Copy" enabled in NUnit's options (Tools -> Settings -> Test Loader -> Advanced). With this option enabled, NUnit works with a copy of your assembly, not the original compiled version. This means that you can edit and recompile assemblies while NUnit is still running.

If you also enable "Reload when test assembly changes" (Tools -> Settings -> Test Loader -> Assembly Reload), NUnit will notice that you have recompiled and automatically reload your new assembly.


Move the test project to the folder or a relative folder to where you kept the executable files.

or Create new test project in the corresponding folder

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号