How to read value from proj.params in the Biml file

93 Views Asked by At

I'm developing a SSIS project, where I use global project params. Recently I linked values for these params with VS configurations:

enter image description here

Now, I would like to assign values of these params to variables in my Biml code, depending on the which configuration is active at the moment in VS. However, I do not know how to access these parameters using Biml class hierarchy:

<Biml xmlns="http://schemas.varigence.com/biml.xsd">

<# 
var s = Dts.Variables[$Project::strFolderPath];
#>

The above expression I tried is unfortunately not valid.

Any idea which expression should I use to access a value of parameter that is active at the moment?

1

There are 1 best solutions below

0
cdbullard On

When calling the Dts.Variables, you need to treat the parameter reference like a string:

var s = Dts.Variables["$Project::strFolderPath"];
                      ^                       ^