1

I have a Command line console app that references a dll 'VMware.Vim.dll', but this has other referenced dll's like VimService41.dll, VimService20.dll etc saved off in the GAC on my local machine. I want to deploy this exe to any computer and be able to run it by passing arguments. When I copy over the exe and VMware.Vim.dll, it complains about the other missing dll's although they are not part of the release folder.

I tried the Publish option and created a ClickOnce Application to deploy it to the machine I want to execute the exe from. This created a setup.exe and a manifest file. When I run it, it complains that the external dlls have not been added to the GAC.

How do I run this clickonce console app by passing arguments?

Jai
  • 319
  • 2
  • 9
  • 30

4 Answers4

6

First, you don't run a ClickOnce application by running the EXE. If you're going to do that, just xcopy the bin folder from your build over to the machine. You're wasting your life using ClickOnce if you don't need to do automatic updates.

Second, you can try tracking down all of the dll's that you need and including them in the project. This includes all of the secondary or tertiary dependencies. Add them to your project, set the build action to "content", and set "copy to output directory" to "copy always". Then they will be included in the output directory when you build.

Some applications' dll's will work when deployed locally (like DirectX) and some won't (SQLServer Express). You'll just have to try it and see if these do.

I would say, however, that using VMWare assemblies probably is against the EULA. That's like trying to include Office assemblies in order to run Excel on a machine w/o it installed.

blackgreen
  • 34,072
  • 23
  • 111
  • 129
RobinDotNet
  • 11,723
  • 3
  • 30
  • 33
1

I don't think this scenario is an appropriate for click once. If you need to install things which modifying the gac is then you need to use an installer.

rerun
  • 25,014
  • 6
  • 48
  • 78
1

If you can find all the dependencies you can include them (by setting them to copy local in VS) with the release and then you shouldn't have a problem.

m4tt1mus
  • 1,642
  • 14
  • 24
1

If you want to use ClickOnce, what you need is to add a custom pre-requisite so that the application installs it's dependencies in the GAC.

Look at: http://msdn.microsoft.com/en-us/library/ms165429(v=VS.100).aspx

Xint0
  • 5,221
  • 2
  • 27
  • 29