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

Can't start process when using shadow copy #6

Open
juflo opened this issue Apr 7, 2015 · 1 comment
Open

Can't start process when using shadow copy #6

juflo opened this issue Apr 7, 2015 · 1 comment

Comments

@juflo
Copy link

juflo commented Apr 7, 2015

When starting the client process, Assembly.GetExecutingAssembly().Location in ProcessStarter constructor is used for getting directory of the assembly.
Problem is that when using shadow copy, assembly is cached and location is not the same.
Maybe it should be possible to override the directory in ChildProcessFactory ?

@nycdotnet
Copy link
Contributor

I'm having a similar problem, but I'm not using shadow copy. I'm working on an SSMS add-in using the RedGate SIP framework and trying to use RedGate.AppHost to launch the add-in in its own process at the suggestion of @mauvo . This should theoretically allow me to run T-SQL Flex in its own process that is .NET 4 but allow the add-in to work in SSMS 2008.

Say, for example, all of my add-in DLLs live in C:\Extension. In that folder, I have TSqlFlex.dll (.NET 2.0 "server"), TSqlFlex.Core.dll (.NET 4.0 "client"), and all the required references to get AppHost to work.

When I wire up an event handler in TSqlFlex.Core.dll, I get an exception within RedGate.AppHost that it can't find TSqlFlex.Core.dll, but when I use ProcessMonitor, it is looking for TSqlFlex.Core.dll in the same folder where SSMS lives - NOT where TSqlFlex.dll, TSqlFlex.Core.dll, and the RedGate client/server DLLs are.

This should be reproducible using https://github.com/nycdotnet/TSqlFlex branch reestablish-net-35. I also think if there were a way to override the directory for where to search for the DLLs, that would be very helpful. Thanks.

PS: I would just fix this myself, but of course AppHost isn't buildable without your encryption key. :-)

amaitland added a commit to amaitland/RedGate.AppHost that referenced this issue Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants