Question How to resolve Dependency Version Issues

wzorn

New member
Joined
Mar 13, 2023
Messages
2
Programming Experience
5-10
I have c# code that is being run in a script component in SSIS. The code makes a connection to SharePoint Online.

I am using Visual Studio 2019. While writing the code, I used NuGet to bring in several reference packages. Working through SSIS causes some craziness because the C# solution is in a temporary space that disappears when the Visual Studio window closes. SSIS does not know to incorporate the references and they disappear too causing packages to fail. To get around this, I load the .dll files for the references into the GAC and point my reference links to those copies (which do not disappear).

Now, I'm getting an error that seems to indicate that there are dependency version issues. I'm not sure which dependencies are the cause of the problem or how to match versions. Can you tell me how to determine what version of .NET is being used and how to find the versions of each of the dependencies? What exactly am I looking for to make sure I have the correct versions?

Thank you.


These are the errors I get, in case you're interested:

Exception thrown: 'System.IO.FileNotFoundException' in ST_995fe3e1c3fea450e9991bab583ffcbb4
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
An exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll but was not handled in user code
Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=basdff5f7f22350a3a' or one of its dependencies. The system cannot find the file specified.


=== Pre-bind state information ===
LOG: DisplayName = System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b031632f11d50a3a (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/SSIS/150/Binn/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.IdentityModel.Tokens, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31b128536ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\\Users\\140613\\AppData\\Local\\Microsoft\\Microsoft SQL Server\\150\\SSIS\\ApplocalConfigs\\16.11.32428.217_b7f0c05f\\DtsDebugHost.exe.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\config\\machine.config.
LOG: Post-policy reference: System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f234d50a3a
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/SSIS/150/Binn/System.Runtime.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/SSIS/150/Binn/System.Runtime/System.Runtime.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/SSIS/150/Binn/System.Runtime.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/SSIS/150/Binn/System.Runtime/System.Runtime.EXE.
 
Microsoft.IdentityModel.Tokens, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31b128536ad364e35 has a dependency on System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b031632f11d50a3a. The latter looks to be from .NET 6.0.
 
Microsoft.IdentityModel.Tokens, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31b128536ad364e35 has a dependency on System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b031632f11d50a3a. The latter looks to be from .NET 6.0.

I did notice that, but that has me confused. I have the Target framework set at .NET Framework 4.7. Why would I have a System.Runtime for .NET 6.0?
 

Latest posts

Back
Top Bottom