Hi there,
in the FB8 Action “AssemblyInfo Updater” we get an error when parsing the variable “Local.Year” in an attribute value. The variable “LocalYear” shows no problem.
Example:
In “AssemblyInfo Updater” we define an attribute “AssemblyCopyright” with the value “Copyright © %Local.Year% CP Corporate Planning AG, Hamburg, Germany”.
On running the script we get the error:
"Unable to Set Variable : Temp.AssemblyCopyright to : Copyright © %Local.Year% CP Corporate Planning AG, Hamburg, Germany
[Expression Error]: Variable\Object “Year” does not exist! [Copyright © %Local.Year?% CP Corporate Planning]
"
If we use variables without a point it is running. FB 7 works at this place.
One question is: Are there also similar problems in other actions because we have several variables following the pattern “Area.SubArea.Name”?
We use the actual Versions of FB7 and FB8.
Regards,
Thomas
Hi,
it might be that this error depends on the target where the variable is used. I will try to send an example for this error.
Thomas
Hi Thomas
I’m able to reproduce this here when using local variables (defined in a group). Looking into it.
Ok, the issue here has to do with how variable namespaces are resolved in FB8. Group Actions define a variable namespace with the name ‘Local’ - so that is resolving when trying to expand ‘Local.Year’ however the namespace doesn’t have a variable called Year, it’s ‘Local.Year’.
This is a change in how variable namespaces work in FB8, the whole variables architecture was redesigned (internally at least), and this is just something we didn’t anticipate. The work around is to change Local to something else. When the team returns from the xmas break I’ll discuss this with them to see if it is something we should change or not. At the very least we should document this if we don’t change the behavor.
Hi Vincent,
you are right. Renaming solved the problem.
Unfortunately here is the next bug. Variables used in value strings of “AssemblyInfo Updater” attributes are not renamed. You have to search and rename them directly.
Regards,
Thomas
Not so much a a bug as just not implemented. Variable renaming works by searching all string properties, for other property types we have to add explicit support for renaming (implement an interface), it’s a massive task so we implement them as we come across cases where it’s needed. I guess we missed this one.
I have added it for the next update.