Side-by-side execution is the ability to run multiple versions of the same assembly simultaneously. The NGWS runtime provides the infrastructure to allow multiple versions of the same assembly to be run on the same machine, or even in the same process.
Code that is side-by-side compatible has more flexibility in terms of providing compatibility with previous versions. Components that can run side by side do not have to maintain strict backward compatibility. For example, consider a class MyClassX that supports side-by-side execution and an incompatibility is introduced between versions 1 and 2. Callers of MyClassX that express a dependency on version 1 will always get version 1 regardless of how many subsequent versions of MyClassX are installed on the machine. A caller would only get version 2 if it specifically “upgraded” its version policy.
Support for side-by-side storage and execution of different versions of the same assembly is clearly an integral part of the versioning story and is built into the infrastructure of the NGWS runtime. As has already been discussed, the assembly's version number is part of an assembly’s identity. As a result, the NGWS runtime can store multiple versions of the same assembly in the global assembly cache and load those assemblies at runtime.
There are two distinctions of side-by-side execution: running on the same machine and running in the same process. Side-by-side execution on the same machine involves multiple version of the same application running on the same machine at the same time without interfering with each other. An application that supports side-by-side execution on the same machine demands careful coding. For example, consider an application that uses a file at a specific location for a cache. The application must either handle multiple versions of the application accessing the file at the same time or the application must remove the dependency on the specific location and allow each version to have its own cache.
Side-by-side execution in the same process places even more requirements on the developer of an application. To successfully run side by side in the same process, multiple versions cannot have any strict dependencies on process-wide resources. The advantages to running side by side in the same process include single applications with multiple dependencies running multiple versions of the same component as well as web servers being capable of running applications with possible conflicting dependencies in the same process.