VSTAScriptingLib for SQL Server 2012 - dll

I'm attempting to build the 2012 version of EzAPI for SSIS. I'm getting an assembly dependency error during the build:
Error 1 Assembly 'Microsoft.SqlServer.TxScript, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' uses 'Microsoft.SqlServer.VSTAScriptingLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' which has a higher version than referenced assembly 'Microsoft.SqlServer.VSTAScriptingLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' c:\Program Files\Microsoft SQL Server\110\DTS\PipelineComponents\Microsoft.SqlServer.TxScript.dll EzAPI
Basically, I need the 11.0.0.0 version of VSTAScriptingLib, but it's not included in the SQL Server 2012 distribution (as far as I can tell).
Ideas?

In the EzAPI project, remove the existing reference to Microsoft.SqlServer.VSTAScriptingLib
Then add it back in but you'll have to navigate to the actual location in the GAC to find it. C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SqlServer.VSTAScriptingLib\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.VSTAScriptingLib.dll
I'll see if that's something that should have been put "elsewhere" during the SQL Server install.

Related

Autofac and Microsoft.Bcl.AsyncInterfaces

Visual Studio 2019 provides an unannounced 4.700.19.56404 version of Microsoft.Bcl.AsyncInterfaces here:
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Bcl.AsyncInterfaces
Autofac accepts 1.1.0 or greater of this package. However, if I try to update the Microsoft.Bcl.AsyncInterfaces Nuget package to the latest version (5.0.0), I start running into problems where the package gets resolved to the 4.700.19.56404 version because:
21> Dependency "Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".
21> Resolved file path is "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Bcl.AsyncInterfaces.dll".
21> Considered "C:\<repo-location>\bin\Debug\Microsoft.Bcl.AsyncInterfaces.dll",
21> but its name "Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"
21> didn't match the expected name "Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".
And of course when trying to run, I get a runtime error because Microsoft.Bcl.AsyncInterfaces cannot be loaded.
I guess the most obvious question is if there's a way around this via msbuild, e.g., some target that would resolve the dependency at build time to 5.0.0, not 4.700.19.56404.
Otherwise, I think this could be solved by having Autofac updating its Microsoft.Bcl.AsyncInterfaces dependency to 5.0.0 over 1.1.0. Not sure if this is feasible or not.

Could not load wrong version of SQL Server assembly

I get the following error:
'Could not load file or assembly 'Microsoft.SqlServer.Types,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or
one of its dependencies '
And I have a reference to
Microsoft.SqlServer.Types version 15
but have checked all the files in the project, deleted the Debug and Release directories and rebuilt both. And there is no reference to Version 10 in any file and all the sqlserver DLL's referenced are copying to the Debug directory.
I can't understand where and why a reference to version 10 would exist. Any advice wold be welcome.

Could not load file or assembly 'Mono.Posix'

I'm attempting to run an exe on RHEL 6 using Mono. I've compiled Mono 4.0.2.4 and when I try to run my exe it crashes.
My Command:
/opt/mono/bin/mono /opt/mono/lib/mono/4.5/mono-service.exe -l:plexos.lock ./DALicenseServer.exe
The Error.
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
I think I have the Mono.Posix.dll file:
ls /opt/mono/lib/mono/4.0/Mono.Posix.dll
/opt/mono/lib/mono/4.0/Mono.Posix.dll
This is a bug (Bug 56787) currently tracked by the Xamarin team. You must download and paste the missing dll in your environment then restart visual studio.
for vs 2015 paste here the dll:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Xamarin\Xamarin\
for vs 2017 paste here the dll:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Xamarin.VisualStudio
check this link for step by step: https://releases.xamarin.com/common-issues-in-the-xamarin-15-2-2-release-being-tracked-by-the-xamarin-team/
1) Try running mono with trace mode to see if it really is Mono.Posix.dll or a native shared library (.so) that is not being found.
mono --trace /opt/mono/lib/mono/4.5/mono-service.exe -l:plexos.lock ./DALicenseServer.exe
2) Check to see if the assembly has been installed properly in the GAC:
gacutil -l Mono.Posix
The following assemblies are installed into the GAC:
Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756
Number of items = 1
3) If the assembly is not found in the GAC, something went wrong during the install (make install) as this assembly is part of the framework install. You can manually assign the MONO_PATH to tell mono where it should find assemblies that are not in the current directory ($PWD) and/or not in the GAC:
export MONO_PATH=/path/to/assemblies:/another/path/to/assemblies:$PATH

Interop.Office error after converting project to VS 2010 from VS 2008

We have a VB.net project of VS 2008. Now i have converted it to VS 2010. After conversion I have added reference to 2010 excela and word dlls. But now i am able to build the project but while running code i get error like
Could not load file or assembly 'Interop.Office, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
So how it can be solved ?What i am missing ?

Assembly in host store has a different signature than assembly in GAC

I have added a third party dll (Extreme.Numerics.Net20.dll to my sql server assemblies). I then opened by VS 2008 project and added that assembly as a reference. Then I built and released my project and it created a PowerstatRegression.dll. Then I add that assembly to SQL Server as well. But when I run my code, I still get this:
Error message: System.IO.FileLoadException: Could not load file or assembly
'Extreme.Numerics.Net20, Version=3.6.10055.0, Culture=neutral,
PublicKeyToken=9e513770f58567b2' or one of its dependencies. Assembly in host store has a
different signature than assembly in GAC. (Exception from HRESULT: 0x80131050) File name:
'Extreme.Numerics.Net20, Version=3.6.10055.0, Culture=neutral,
PublicKeyToken=9e513770f58567b2' at
PowerStatRegression.matrix.MatrixHandler.MultiplyMatrixByArray(Double[][] a, Double[] b) at
Why is this happening? Everything builds correctly with no errors.
Change your CREATE ASSEMBLY to ALTER ASSEMBLY and rerun that on the server, that will update the GAC.