SSIS Script Task throwing exception: The type initializer for 'PerTypeValues'1'

James Clark 231 Reputation points
2021-06-07T16:04:57.323+00:00

I have a C# Script Task that's throwing an exception "The type initializer for 'PerTypeValues'1" running on the server. My package runs fine within Visual Studio. What the heck does this mean?

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
{count} votes

Accepted answer
  1. CarrinWu-MSFT 6,891 Reputation points
    2021-06-09T01:40:43.89+00:00

    Hi @James Clark , sorry about that I don't familiar with C#. But after researched, this error may occurred when the script have something wrong. Please refer to this thread:

    Check the InnerException property of the TypeInitializationException; it is likely to contain information about the underlying problem, and exactly where it occurred.

    1 person found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. James Clark 231 Reputation points
    2021-06-08T12:00:03.907+00:00

    This error occurs while running my package on the SSIS server and it runs fine on my development computer in Visual Studio. I'm not able to install Visual Studio on the SSIS server, it exists in a data center and I do not have administrative rights.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.