Skip to content
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

Projects should not end up with reference to adapter DLL #5

Closed
idg10 opened this issue Nov 24, 2016 · 0 comments
Closed

Projects should not end up with reference to adapter DLL #5

idg10 opened this issue Nov 24, 2016 · 0 comments
Assignees
Milestone

Comments

@idg10
Copy link
Contributor

idg10 commented Nov 24, 2016

Adding the adapter as a NuGet package shouldn't cause the library to appear in the project's list of references.

So instead of putting our DLLs in the lib\net45 folder, they should go in a tools folder. That way, VS will copy them to the LOCALAPPDATA\Temp\VisualStudioTestExplorerExtensions\ folder but won't add them to the project.

Unfortunately, this adds considerable complication because it essentially makes it impossible to share types across AppDomain boundaries. If our adapter is in the test project, this just works, because we can use normal name-based assembly resolution, which resolves the assembly as having the same identity in all AppDomains. We have to move to providing a path to the assembly when instantiating types in the temporary appdomain, which seems to partially break this. (We need to load the test project DLL into an AppDomain so that we can unload it once we're done. Otherwise, you end up locking files.)

The weird thing is that we can still instantiate a custom type across the AppDomain boundary, but it breaks if we attempt to pass it any constructor arguments which are also of a custom type.

This means we end up needing to ensure that the only things we pass across the AppDomain boundary as constructor arguments are types already known to the .NET Framework.

@idg10 idg10 changed the title Projects should end up with reference to adapter DLL Projects should not end up with reference to adapter DLL Nov 24, 2016
@idg10 idg10 added this to the v1.0.4 milestone Nov 24, 2016
@idg10 idg10 self-assigned this Nov 24, 2016
idg10 added a commit that referenced this issue Nov 24, 2016
Prevent adapter from adding its DLLs to project

Related issues: #4 #5
@idg10 idg10 closed this as completed Nov 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant