Adding .exe Reference in WCF Dynamically - wcf

Let's say I have a WCF web service which uses some 3rd party .exe file for some calculations.
Basically, when I am developing the service in Visual Studio, I would go to add reference and select that exe and build it and copy the dll's to prod environment.
But the 3rd party component which I am using needs to be installed before using it. So I would install in some folder on prod. But now since my code is already compiled, I cannot add reference to this exe.
Is there a way to add reference to an exe dynamically?
If not, do I have the only option of installing Visual Studio on Prod server, add reference and compile again?
Thank you,

Related

How to publish a web application project with third party DLL (zkemkeeper.dll) that causes an error?

I have .net core web application project which using a third party DLL (zkemkeeper.dll a C++ DLL). Adding this library to my VS project is fine.
I can add it as a reference and everything works fine when I tried to run it. However, VS didn't recognize the library of this DLL as you can see on the below image.
So due to this issue I can't publish the project? Any tricks on this?
Just do the following steps,
1. Register zkemkeeper.dll in server (where your side is hosted)
2. Also register above dll on the computer where you are developing it.
Note: best way to register dll of zkemkeeper
download sdk of 32/64 bit from http://www.zkteco.eu/index.php/downloads/software-downloads
run Auto-install_sdk file as a administrator or system.
it will automatically register required dll into your system
Thanks
Just sharing, I've already fixed the issue by using the DLL generated in my bin folder (Interop.zkemkeeper.dll). Now my only problem is this one.

Deploying an application on a non-dev machine, having issue with a dll

I'm not very experienced with deploying applications and i'm having an issue with my very small screen scrape application.
I use a project that handles all screen scrapes and i just call the functions from the dll(on dev machines at least). When i reference that dll from the directory, it works fine on my machine but installing and launching on another machine without the project crashes it immediately when it tries to access the class to instantiate the screen scrape object.
Perhaps my assumption of dll is incorrect but doesn't having the dll mean it incapsulates all the classes/references/etc in that project so it can be used elswhere without having to lug the whole project with it?
What could be going on with this dll?
The dll assembly encapsulates the project, but not its references. Anything that the project needs to reference must be available in the new environment as well, whether in the GAC (global assembly cache), the local directory, in a reference path, or wherever.
If you are using Visual Studio 2010 or earlier, you can use Setup Projects to nicely gather all necessary references and package them into an install package for you. There may still be complications that you will need to troubleshoot sometimes, but it simplifies your deployment effort. In Visual Studio 2012 and later, Setup Projects were dropped, but there are other options, like WIX and Install Shield. And that is a whole other topic with plenty of Q&A on this site.

Using DLL for web project

I am a little new to VB.NET but I have downloaded and installed VS Express 2012 for web. I created a web application that is fairly simple. One page. mypage.aspx It runs perfect in studio and responses how I would expect.
What I want to do is make it run from the dll. Not from the mypage.aspx.vb. I see the dll for the project in the bin folder.
But when I move mypage.aspx and web.config, and bin with dll to the server it simply says its missing the code behind page. Do I just need to change the reference to the VB file?
If you want to use dll, Go to Build menu in your Visual Studio and click on Publish Web Site
Set Target Location, there your whole project will be get created with dll and without code behind files.
Use this project to deploy on your server.

Making a Stand-Alone EXE File

I'm currently using Visual Studio 2010 to make a Visual Basic project. I'm trying to make a standard .EXE file for distribution but everytime I go to publish, I keep seeing it make a Click Once application.
Is there a way to complete and build a project in VStudio 2010 without making it as a Click-Once application?
Don't Publish it; that is what is making it a clickonce application. Just Build Solution; this will create the exe in the specified output directory (usually debug or release depending on your current Configuration.

building a windows service using msbuild

Can someone point out any tutorials that help build windows services using msbuild.
Requirements :
- Should not use the csproj file
- Output should be the same as the publish option in Visual Studio
Updated question:
We have a project of type windows service in our solution. In this windows service, we are referencing a couple of libraries that reside on a different system (one of them is not strongly named). This solution also contains other class libraries and websites/web-apps.
I am trying to write a custom build that outputs a xcopy deployable version of the website, and a deployable version of the windows service. When I say windows service, it shows up on the Control Panel -> Services MMC.
The website build was easy via msbuild...however I am struggling with the windows service build. Until now, my fellow developers were using the right-click on the project file ,and click publish to publish the windows service. This generates a setup.exe file that helps the admins to deploy the service.
So, now here is my question:
I want to use msbuild to build my windows service.
I do not want to directly use the .csproj file in conjunction with msbuild to build the service.
The output my build file generates should match the output from the "publish" option (*the publish option generates a setup.exe file*)
In general, "the publish option" under the covers just runs a build with /t:Publish, i.e., it triggers a different target to the normal default 'Build' one.
Can you tell us more of what you are looking for, as opposed to not looking for?
Are you looking to generate an MSI? (If so, you definitely won't be using MSBuild if you're using the built-in .vdproj system - but be careful - this means having to put VS on a build server)