interop.adodb update in VB.net to Version 6.0 - vb.net

I am trying to build an old VB.net that was last built in VS2008. When I do it errors with
Error 33 Reference required to assembly 'Interop.ADODB, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'ADODB.ConnectModeEnum'. Add one to your project.
When I try to add V6.0 I get ambiguous references apparently because Interop.ADODB is still in the solution, and I can see it in the Object Browser. I do not know how to replace the old version or exactly where to add the Version 6.0.
I also have both an Interop.ADODB and a ADODB in the Object Browser and do not understand the difference.
Any suggestions?

Related

Type 'ClientAssertionCertificate' exists in both '...ActiveDirectory.Platform' & '....ActiveDirectory'

I have a cproj which uses the method ClientAssertionCertificate from Microsoft.IdentityModel.Clients.ActiveDirectory. When I do a msbuild at the project level, I'm seeing this strange error.
error CS0433: The type 'ClientAssertionCertificate' exists in both 'Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.12.0.827, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e3`
I'm sure that I'm referring only the PackageReference Microsoft.IdentityModel.Clients.ActiveDirectory and no references to any other package/assembly which has Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll.
Please let me know if any of you are aware of this and can guide me on where in the code should I do the troubleshoot.
I could figure out the issue. A project reference within my project was using a PackageReference to 'IpamAsrExports-master'. This package has the assembly "Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll" included within. After I upgraded the package 'IpamAsrExports-master' to a newer version, it resolved the issue.

Building VSIX project in Release does not create a VSIX file anymore, just a DLL

I think the title is pretty clear. I always build in Release mode and upload the created VSIX file to the VS Marketplace.
Since today, it just creates a .dll file when I build in Release mode, no VSIX is generated. Also,in Debug I cannot set break points anymore, symbols won't load.
After reverting the commit (5 lines of code) to the previous version the problem still occurs.
I have no idea what could have caused this. Anyone experienced this before and what can I try to resolve this?
Edit:
This shows up in the build log, can this be the cause?
warning CS1762: A reference was created to embedded interop assembly 'EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because of an indirect reference to that assembly created by assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Consider changing the 'Embed Interop Types' property on either assembly
When I set the Embed Interop Types property to true on the EnvDTE assembly I get service can not be embedded errors throughout the package code.
I tried creating new VSIX projects or opening older ones, no issues there, it creates a .VSIX file when building in release mode. Comparing the CSPROJ files and configuration shows no difference.

How can I correct this ADODB missing reference error in VB .NET that I'm getting after upgrading to Windows 10?

After upgrading to Windows 10, I got a lot of errors relating to a broken ADODB reference in my VB .NET application. I performed the steps described in the answer from this topic and that seemed to fix the broken reference errors. That solution actually got the application working for some of my colleagues on their Windows 10 systems. Unfortunately, anywhere in the application where I'm using a Recordset, I'm still getting this error:
"Reference required to assembly 'ADODB, Version=2.5.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'ADODB.Recordset'. Add one to your project."
When I investigated some more, I found that the reference's location was "C:\Program Files (x86)\Common Files\System\ado\msado25.tlb". With this path, I tried to register msado25.tlb type library using Tlbimp.exe but it didn't seem to help any.
I have a feeling that I'm missing something stupid but I have no idea what it is. Any help would be greatly appreciated. Thank you.
Here are some additional related screenshots that may help:
ADODB Reference Properties
Registry
I had this issue after the Windows 10 Anniversary update and I solved it by using tlbimp.exe. tlbimp generates a new adodb.dll and you can reference this in your project.
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\tlbimp.exe" "C:\Program Files (x86)\Common Files\System\ado\msado21.tlb"
The Type Library Importer converts the type definitions found within a COM type library into equivalent definitions in a common language runtime assembly.

system.design reference issue of WixSharp on .net 4

I'm trying to use WixSharp with .net 4, but I got this warning:
Warning The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "WixSharp, Version=1.0.39.0, Culture=neutral, PublicKeyToken=3775edd25acc43c2, processorArchitecture=MSIL" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project.
I checked that System.Design is not referenced. When I tried to add reference to it, it's actually grayed out in add reference dialog.
As a result, just as the warning says, WixSharp is not resolved, and all namespaces in WixSharp has a missing of reference error.
How should I fix this? compile WixSharp from source?
Fei

SharpSVN error in VS2010

I'm trying to get SharpSVN to work with a VB.NET project I'm working on in VS2010. I've added SharpSVN.dll to my project references but the following error appears when I try to load the site:
Could not load file or assembly 'SharpSvn' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'SharpSvn' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
My machine is 64-bit, and I've set the Configuration Manager to build to x64 as well as copied the 64-bit version of SharpSVN.dll into my project's bin directory. Additionally, I've also tried setting build to x86 and using the x86 version of SharpSVN.dll and the same error appears (so I suspect the error may not be directly related to instruction set family).
In my config file, I've tried adding the following to the assemblies attribute:
<add assembly="SharpSvn, Version=1.6016.1637.10768, Culture=neutral, PublicKeyToken=d729672594885a28"/>
Any ideas?
I have the same error and can't explain what's going on. However, with the 32bit version, the error is more descriptive:
Unhandled Exception: System.IO.FileLoadException: Mixed mode assembly is built against
version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without
additional configuration information.
Which you can fix by adding the following snippet to your app.config
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
Not sure what's wrong with the 64bit version, but you can always build it from source.
Despite thinking that <add assembly> was enough, I actually solved this issue by adding SharpSvn to GAC (in case anybody is running into this problem as well).
I am not sure why adding to the GAC worked for you, this is not the correct behavior for the assembly loader.
The error refers to the bitness of an assembly. SharpSVN is a mixed mode assembly, ie: it contains both managed and unmanaged code. You must specifically target x86 (with the x86 SharpSVN Assembly) or x64 (again with appropriate assembly). You must further set all your assemblies to be explicitly x86 or x64. Targeting Any CPU will allow the runtime to make this decision for you, and it will fail to load SharpSvn.dll if it picks a word length that does not match the SharpSvn DLL.