How do i check whether IBM MQ client is installed in the client computer via vb.net winform application?
I have added amqmdnet.dll to my project and imported IBM.WMQ namespace.
However i don't know how to check IBM MQ client installed in the target computer? (like for example, if you want to check a windows service, you can loop through all the available services, then check for that particular windows service)
Any inputs will be highly helpful?
The dspmqver command will let you know what is installed.
From the Microsoft KB:
CAUTION: Do not use these APIs in your application to perform assembly
binds or to test for the presence of assemblies or other run time,
development, or design-time operations. Only administrative tools and
setup programs must use these APIs. If you use the GAC, this directly
exposes your application to assembly binding fragility or may cause
your application to work improperly on future versions of the .NET
Framework.
There is no native MQ API to check the GAC. (Shashi, please correct me if I've overlooked something here. I know you are watching. :-) )
Related
The Issue:
Our application is a .NET 5 Windows Desktop application. The licensing capability requires the application to use the System.Management component from NuGet to create a unique device ID from the system processor ID, MAC Address and BIOS serial number.
This all worked great when testing it from Visual Studio debugger. However, when adding System.Management.dll to the application installer (InstallShield installer) I naturally selected the version of System.Management.dll that was in the app's build target folder. It turns out that the version of the DLL that ends up in that folder is a no-op version that throws not supported exceptions saying "System.Management is supported on Windows Desktop Apps only".
The Solution:
I found the correct version of System.Management.dll in the build TargetFolder\runtimes\win\lib\netcoreappX.x folder. In my case, since I'm using System.Management version 6.0, it is in the "netcoreapp3.1" folder.
Conclusion
There are many cases where Microsoft doesn't do the right thing. In this case, my application was specifically a .NET 5 Windows Desktop application, so we would all think that msbuild could figure out the correct thing to do. Not so. In such a case, I would have at least hoped that .NET Foundation would have provided information on this. Well, now you all know now, as well!
Cheers
Context
For a bit more context, the company I work for made an Access vb.net application that runs inside MS Access. They wanted to upgrade and create a C# WPF frontend for it. This works great except for the fact that when I installed the application and downloaded the [dummyDB].accdb (32-bits 2016) the application immediatly broke with the error :
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
I then installed the 2010 AccessDataBaseEngine from Microsoft and a new error apeared:
This Database file requires a newer version of Access
Naturally I went back to Microsoft, downloaded and installed the 2016 x64 (my system is 64-bits) and tried again.
Sadly we we're back to the first error. So i tried to install the 2016 32-bits AccessDataBaseEngine but ran into the problem that I had already installed 64-bits office products. (I also uninstalled all the previous 32-bit AccessDataseEngines)
We of course don't want users to reinstall all their Office products just to use our application.
Question
Is there a NugetPackage of somesort that we could use so the customer can interact with the AccessDatabase out of the box?
If not, is there anyway to make it so they wouldn't have to reinstall all of their Office products?
ps. Different DataBase files 32-bit and 64-bit for users is also not an option because different users with most likely different systems will have to access the same database file.
I don't know if I'm being completely oblivious here, but any help would be greatly appreciated
Application info:
WPF application (.Net Framework 4.7.2)
Build Target : anyCPU
Is there a NugetPackage of somesort that we could use so the customer can interact with the AccessDatabase out of the box
No, not as far as I know.
If not, is there anyway to make it so they wouldn't have to reinstall all of their Office products?
You could write an wrapper that handles both 32 and 64 bit versions of the access driver. I.e. if the installed driver is the same platform as your program you can just continue as usual. If it is another platform you need to start a new process with the correct platform, and delegate all the database work to this process. If your process is anyCPU and is run on 64-bit windows the actual platform will depend on the "prefer 32-bit" flag.
Another alternative is to build both 32 and 64 bit versions of your entire application and run the one matching the office installation. This might be easier, but might not work if you have other platform specific dependencies.
This all assumes that office is already installed, if it is not you can just deploy the stand alone ace driver (i.e. AccessDataBaseEngine) with the correct bittness. The database file itself is platform agnostic and can be accessed by either 32 or 64 bit processes. It is the driver that needs to be of the correct version.
Note that Access is kind of difficult to work with and rather error prone. If this product is intended to be long lived I would suggest migrating to something better sooner rather than later. SqlLite is a popular embedded database engine that could be an alternative.
I am writing an ASP.Net application which uses the Lync client API to get user availability state from Lync.
Now I get a strange error when calling the Lync api methods:
"The file or assembly 'Microsoft.Lync.Model [...] not found".
But I have referenced the Lync client api in the correct version.
What do I have to change to make this working?
The Lync client api may not be an ideal fit for an ASP .Net application but that depends which of the 2 you are using.
There is one for desktop applications and one for Silverlight applications, see https://msdn.microsoft.com/en-us/library/office/jj933180.aspx for more details.
Regardless of which version you are using you will need the Lync client installed on that machine. To be explicit if you are using the api on the server as I suspect then the server will need the Lync Client installed there.
It's also worth noting that there is a web api for lync https://msdn.microsoft.com/en-us/library/office/dn962133(v=office.16).aspx
You can find here exact instruction
https://msdn.microsoft.com/en-us/library/office/hh378548%28v=office.14%29.aspx
Microsoft.Lync.Model.dll is not added to the global assembly cache on your computer during Microsoft Lync SDK installation. Instead, you must navigate to the install location of these files and select them for inclusion in your project references.
nothing more then this, if you sill have a problem maybe it's a good thing to create new application project in Visual Studio.
Hope it help.
Need Your Help..
I have developed one windows application in C#.Net (stand-alone application). It is basically a Image processing application.
While developing this application I have used Dev-Express controls for better performance. Now I have created the setup file of that application and tried to install it on few machines for testing purpose, while doing this I found that this application is getting install successfully on those machines which has Dev-Express installed on it, but getting failed to install on those machines which do not have Dev-Express setup.
So my question is- "How can I solve this problem..?". Because, as Dev-Express license copy is very costly, "I don't know whether my client will afford it or not". Please Help..!!
You do not need to a separate license for the distribution (see the Licensing FAQ for more information).
However, you need to distribute the corresponding DevExpress runtime assemblies, because they obviously are not installed on clients' machines. This approach is common for distributing 3-rd party products. Consult the DevExpress support for further clarification.
My client's PC runs Windows 7 Ultimate with .netframework 4 client profile. I am unable to install my application developed in VS2008. I tried uninstalling .NET Framework 4 From his PC and running the Clean up tool provided by Microsoft. But still I am unable to install it successfully. It provides Error 1001.
I tried running the program as administrator. I also tried to Turn on .net 3.5 feature from add or remove program.
Thanks in advance. :)
Edit:
The error what i get is shown here.
Furthermore,
I have confirmed that it is a 32bit processor and i run x86 release version of setup
The application is developed in a Windows 7 OS with .NET Framework 3.5
I have installed this application in 7 PCs which have .NET 3.5 installed in them and having OS Windows XP,Vista and Windows 7; and all are working fine.
In clients PC, when I try to install .NET 3.5 again, the installer starts but then it disappears suddenly without doing anything
I have tried turning on .NET 3.5 framework feature from control panel> Program and Features.
I have tried running the program as Administrator
I have tried setting the application setup in Windows XP and Vista compatible mode.
But still the issue persists.
Thanks :)
#Niraj.. hope you recognize me.. :)
Well, I think the issue is with your installer. Something in your package settings is conflicting with the environment at your client's computer. With the error message that you posted, it looks like there is some dependency on some assembly which isnt available to the installer, and hence its failing. This might include version number mismatches too.
You should also look at this question, which talks about an issue similar to yours.
or try using FusLogvw.exe to check which assemblies fail to load at runtime.
As you said you have only .net framework 4 client profile which is a subset of the .NET Framework 4 and is optimized for client applications. Please make sure that everything needed for your new application is included in client profile version. Also it is possible that your application installer requires .NET Frw 3.5 as a dependency. Anyway as already said by Henk no need to do anything with .NET Frw 4 just install 3.5.
There is an exception raised during the installation, and you should as it wished to collect MSI debug log and other necessary information to troubleshoot.
I don't think .NET 4 is the root cause. Otherwise, you should already install this app after uninstallation of .NET 4.
in my opinion
be sure that you not run X64 application in X86 based computer
trying to run them in compatibility mode for OS depend on which OS you used in client system
check the prerequested component are installed or not in client system.
you show the problem 1001 in snapshot so you can Read the log for more information about the setup you trying to install on client side.
your setup forced client system to load a specific type during the installation and type not exactly load as setup want so they give you a exception called "LoaderException"
for more information start googling may be it solved your problem
http://www.google.co.in/search?sourceid=chrome&ie=UTF-8&q=loaderexception+in+.net&qscrl=1
I got it finally...nothing was stopping my application but Crystal Reports.
We forgot to include Crystal Reports Basic as a prerequisite.
Thank you guys for the efforts taken. :)
Niraj