tags:

views:

344

answers:

4

I develop some C# plug-in libraries in VS2008 that are deployed along with someone else's application. They use ClickOnce for their deployments and I'm trying to do something a bit non-standard, I suppose.

On one of the machines where the app and my DLLs are installed, I'd like to manually replace some of my DLLs to test a fix.

The app is in c:\Documents and Settings\testsystem\Local Settings\Apps\2.0\blahblahblah...long nasty path\

and my DLLs are located in a subdirectory under that path.

My tester took my DLLs and puts them in that subdirectory but it appears from the Trace output that he sends me that an older version of the DLL is actually running. I had the tester verify that the DLLs are in the subdirectory and the Trace log shows the correct path, indicating that the app is running from that location, but the Trace output is not from the DLL that I've sent him.

The ClickOnce deployment stuff is all elven magic to me at this point. It doesn't appear that it is overwriting my new DLL but it certainly isn't running the version I expect it to run. Anyone have any ideas?

Thanks, Matt

A: 

Would publishing an update to your clickonce app with the trace DLL be out of the question for you in this case? That would be the easiest way to do magic in clickonce.

Spence
Yes, unfortunately that isn't an option.
itsmatt
A: 

What about simply installing a version built locally (not clickonced). Obviously if your trying to troubleshoot a permissions error this won't help you :(.

But there is nothing that precludes you from running your code as an exe on the local system.

Spence
+2  A: 

Are you sure you have the correct directory? The click-once directory structure is a bit complicated and the DLLs can be duplicated multiple times. It does not always pull the DLLs from where you expect. Also it could be pulling the DLLs from the GAC if someone once put them there.

Try running up procexp, look for your app and examine the handles it holds. That will tell you the right path to the DLLs in question.

Robert Wagner
Good point, Robert. It was a frustrating day and I had used my brain (and procexp like I use quite often) rather than let the situation get the best of me... well, you know. Thanks.
itsmatt
A: 

With the weird-workaround hat on, you could:

  • Publish the app under a different name and have the tester install that version.

It is the namespace for the app that has to change, but please update the ClickOnce application name as well, otherwise you'll be in confusion heaven.

or

  • Publish the app with a lower version number

I have to say I am not 100% sure if this will work, but if you publish it with a lower number, your other clients shouldn't get an update but the tester would have to uninstall then install and get the old version. Beware though, you'd want to switch back to the real version after the tester has installed the test-version, and then the tester would have to say no to installing the update every time he starts the app.

I would definitely go for publishing under a different name, and you'll have a version for all testing purposes.

andyhammar