-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile test dll which is loaded in TestCentric - Cannot compile because it's being used by another process #1186
Comments
I made a few attempts to find out something about this problem, but I guess I need some guidance here. At least to tackle down this problem and to provide some hints about the root cause. For example I debugged into the TestCentric.Agent.Core process to find out which component is responsible for the assembly loading. I finally came accross the |
And I don't really understand at all, how the 'Testcentric Runner' process is blocking the test assembly. I didn't spot any assembly loading code there and also debugging + listing all loaded assemblies (AppDomain.GetAssemblies()) didn't show up the test assembly. |
Over the last few days, I have looked at this assembly loading stuff, compared with TestCentric 1.X, tried out a few things and overall learned a lot. Therefore I can state now, that it's a TestCentric.Agent issue. Maybe it's best to move this issue to the TestCentric.Agent project? And yes of course, it's specific to .NET Framework 4.8 The crucial part is in the class I spotted in the history this commit Changes to NUnit3Driver which introduced this Assembly.LoadFrom() statement. That would be a solution, but we would certainly get other problems again, because this change was also made with a purpose, wasn't it? I made one attempt to solve this issue by keeping the current implementation and only restoring the crucial parts from the previous version. That worked - which is fine. But it's important to decide which code part to keep and which part is OK to restore. I think I need some guidance here. For now I thought that I need to remove the Assembly.LoadForm() and need to restore the _testDomain.CreateInstanceAndUnwrap() statement. But one idea might be that I create a PR for this proposal and we discuss it on the concrete code level. @CharliePoole: Thanks for your input how to proceed best! |
I hadn't noticed this issue before this morning. I'll take a look at it sometime today. |
Describe the bug
While developing some NUnit tests in Visual Studio, I already opened the test dll in TestCentric and ran the tests to confirm that the tests are working as expected.
However when editing and compiling the NUnit tests again, Visual Studio complains that the dll cannot be generated because the dll is used by another process. Visual Studio even provides a list of processes: it's the Net462 Pluggable Agent process and sometimes in addition also the TestCentric Runner process.
This happens very frequently or almost all the time. However the TestCentric Runner process is only listed sometimes, I didn't figure out yet when it happens. In that case it's not sufficient to close the test project in TestCentric, but I must close TestCentric completly.
ShadowCopy is enabled - here's a screenshot from the settings:

To Reproduce
Steps to reproduce the behavior:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: