How can a C# program use a C++ dll of any version? -
we're creating dll, written in c++, providing access hardware. have c# program uses dll.
we're having issue versions. indeed, when running c# program, absolutely wants use exact c++ dll version used when compiling. i.e. if c# program compiled using c++ dll 1.2.3.4, program refuse run c++ dll 1.2.3.5.
i'd instruct c# program use c++ dll version 1.2.anything.
where can configure in c# project?
this question has been superseded that one, more related com.
nothing fancy exists in c++. using side-by-side manifest technically permits have known since have typed version number in manifest of c# program.
the far more explanation created c++/cli assembly. many programmers confuse c++/cli c++. easy mistake since language permits using native c++ code. gets compiled mixed-mode assembly, assembly contains both il , native code. normal clr version checking occurs such assembly when clr loads it, happy exact version match. strong dll hell counter-measure.
and normal clr version wrangling option available bypass check, <bindingredirect>
element in app.exe.config file. controlling assembly version number way c# code isn't necessary.
the easiest way check if guess accurate using project + add reference , select dll. if doesn't draw complaint , assembly gets added references node of c# project know normal .net assembly. don't forget take advantage of that, no pinvoke required.
Comments
Post a Comment