title: Redeploying SSIS packages - Cache?
body: <p>We have noticed an issue recently that redeployed SSIS packages sometime don't seem to include the latest changes... When I search the dtsx using notepad I see the amended script in the code so the changes are definitely there. </p>
  
  <p>My assumption was that script components of SSIS packages are eventually compiled into an assembly somewhere in the process - this is quite likely since I would imagine C# code cannot run without something compiling it first. So in theory if these assemblies would then end up being cached and not immediately overwritten (for some reason) that would explain this issue. </p>
  
  <p>The only "evidence" that makes me think that my theory is correct is if I keep running the package at some point it suddenly shifts to the new code.</p>
  
  <p>However, so far I haven't found why and how this is happening, if is... Can anybody help?</p>
  
  <p><strong>UPDATE:</strong> 
  MSDN says: "Unlike earlier versions where you could indicate whether the scripts were precompiled, all scripts are precompiled in SQL Server 2008 Integration Services (SSIS) and later versions." - If by <em>pre-compiled</em> they mean that instead of the actual package a pre-compiled version runs (I think this because the package itself does not seem to be compiled since the code is visible in Notepad) there must be a way to force the engine to overwrite the pre-compiled assembly... but how?</p>
  
  <p><strong>UPDATE:</strong>
  One of the four core components of SSIS is the <em>SQL ServerIntegration Services service</em>, which is a windows service. Apparently this service will cache component/task metadata so that the SSIS runtime engine can poll the cache to see what is installed, which may help speed up package load times. However, if the packages are stored in the file system (not in SQL Integration Services) and executed by Agent Jobs, the agent job will use the 64 bit version of DTEXEC to execute the packages. I haven't yet found evidence that any caching would be involved there, but there are certainly options to check a number of parameters in the validation phase of the execution, such as version numbers - may be for a reason.</p>