Question: How can I use any available version of an assembly on an ASP .NET page?

For example, I use this tag before adding a Crystal Reports control on a web page on my computer:

```
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

```

However, if I install this web page on a computer that has a different version of Crystal Reports, I would have to change the version part of the assembly attribute:

```
<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

```

Is there any way I can avoid this by instructing ASP .NET to use the newest available version or specify the minimum required version?

Answer: 
Just drop the `Version=` portion:

```
<%@ Register Assembly="CrystalDecisions.Web, , Culture=neutral, 
                       PublicKeyToken=692fbea5521e1304"
             Namespace="CrystalDecisions.Web" 
             TagPrefix="CR" %>

```

However this only works with `late binding`. If you actually compile any of your assemblies against a specific version of the assembly you will need an assembly binding redirect in your Web.config file.

```
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="CrystalDecisions.Web"
                  publicKeyToken="692fbea5521e1304"
                  />

        <bindingRedirect oldVersion="10.5.3700.0"
                 newVersion="13.0.2000.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

```
You could just do this:

```
<%@ Register Assembly="CrystalDecisions.Web, Culture=neutral,
PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

```

This will allow you load any version.