I am creating .dtsx packages with Script Components on a development (DEV) machine using VS2019. DEV is Windows 11 Enterprise 64 Bit and I have local administrator rights.
Because it seems like Visual Studio Tools for Applications (VSTA) does not save assemblies that are added when you save the Script and Script Component, I have registered those assemblies manually using GACUtil.exe on DEV. I have successfully tested the packages on DEV in VS2019.
On my production (PROD) machine, I am executing the packages using DTExec.exe. PROD is also Windows 11 Enterprise 64 bit. I have several other packages (that do not have script components) that have been working via DTExec on PROD method for more than a year.
As I expected, when I tried to run my package on PROD, I received the following error:
Error: 2024-07-25 06:17:34.19
Code: 0xC0047062
Source: Data Flow Task Data Flow Task (SC Source [155])
Description: CS0234 - The type or namespace name 'Json' does not exist in the namespace 'System.Text' (are you missing an assembly reference?), main.cs, 17, 19
End Error
So I proceeded to attempt to register the assemblies as I did on DEV (using the gacutil.exe command from a terminal window opened as Administrator) but then received the following alert:
Followed by this message in the terminal:
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools>gacutil.exe /if R:\shrdata\VICUSTSV\Inventory Management\Code\System.Text.Json.dll
Access is denied.
What I have attempted so far:
Other research:
So my question is: How can I get gacutil to register assemblies on PROD?
So it turns out that I had 2 Windows SDKs installed: \NETFX 4.7.2 Tools and \NETFX 4.8 Tools. The environmental variables paths must have been wrong or pointing to the wrong folder, because when I navigated to the NETFX 4.7.2 folder in the terminal (with Admin privileges) to run gacutil.exe, it worked just fine.