cancel
Showing results for 
Search instead for 
Did you mean: 

Modified Unity script availability

Mark_Rogers4
Champ in-the-making
Champ in-the-making

I am finally starting to get my feet wet with Unity scripting so this is a newbee question.

I created a simple script to write some keyword values to the Diagnostics Console and it's fine.  I made a slight change to the code, did a build and save and publish with the "Set the new project version as active?" box checked, but when I test it, the older version is still being used.  How do I get the new code to execute?  Is it being cached on the app server?  If so, how do I clear it?

8 REPLIES 8

Scott_McLean
Elite Collaborator
Elite Collaborator

There are two pieces to this answer.

1. If the script executes as a result of an ad-hoc task or other user interaction, you need to reset IIS (or at least your AppServer application pool).

2. If this is executed under the core workflow timer service, you need to restart the service, since it retains its own configuration, even if IIS has been reset.

I recommend resetting both, regardless of whether 1 or 2 is your scenario.

Thanks, Scott.  I recycled the app pool and that did the trick.

However, I could have sworn in the API class that I was told that wouldn't be necessary when I asked the question.  That's a problem in my environment because I don't have my own environment to work in so recycling the app pool needs to be coordinated with other developers.  Any suggestions?

John_Anderson4
Star Collaborator
Star Collaborator

Do you have multiple app servers? I think I noticed that you don't need to reset the app server that you were connected to when publishing the updated script, but your OTHER app servers would need to be reset.

Thanks, John.  That sounds reasonable. It would be nice if I could somehow choose an app server and use that one to publish and initially test.