How To Upgrade To Version 1.4


Upgrading to Document Toolkit for LightSwitch 1.4 requires manual editing of your LightSwitch application config. When you upgrade to v1.4 and try to run your LightSwitch application you will see the following error: "Could not load file or assembly 'FirstFloor.Document.Pdf, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5aa7ab6a0e3ec07b".

A number of Document Toolkit dependencies have changed and the LightSwitch tooling is unable to automatically adjust these dependencies, you'll need to edit them manually. The following tutorial provides the required steps.

1) Open your LightSwitch project in Visual Studio.

2) Switch the Solution Explorer to 'File View'

ToFileView.png

3) Select the LightSwitch project and click the 'Show All Files' button in the toolbar. This will display the ClientGenerated project in the Solution Explorer.

ShowAllFiles.png


4) Expand the ClientGenerated project and open the Config.xml file. The Config.xml contains a list of ExtensionAssemblies being used by your application. Remove the following six ExtensionAssembly entries:

<ExtensionAssembly>DotNetZip, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</ExtensionAssembly>
<ExtensionAssembly>FirstFloor.Documents.IO, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null</ExtensionAssembly>
<ExtensionAssembly>FirstFloor.Documents.IO.DotNetZip, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null</ExtensionAssembly>
<ExtensionAssembly>FirstFloor.Documents.IO.LibTiff, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null</ExtensionAssembly>
<ExtensionAssembly>FirstFloor.Documents.Pdf, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5AA7AB6A0E3EC07B</ExtensionAssembly>
<ExtensionAssembly>ZLib, Version=1.9.1.9000, Culture=neutral, PublicKeyToken=5AA7AB6A0E3EC07B</ExtensionAssembly>

5) Replace the removed entries with the following extension assemblies:

<ExtensionAssembly>FirstFloor.Documents.IO, Version=2.1.1.0, Culture=neutral, PublicKeyToken=null</ExtensionAssembly>
<ExtensionAssembly>FirstFloor.Documents.IO.LibTiff, Version=2.1.1.0, Culture=neutral, PublicKeyToken=null</ExtensionAssembly>
<ExtensionAssembly>FirstFloor.Documents.Pdf, Version=2.1.1.0, Culture=neutral, PublicKeyToken=null</ExtensionAssembly>
<ExtensionAssembly>ZLib, Version=1.9.1.5, Culture=neutral, PublicKeyToken=5AA7AB6A0E3EC07B</ExtensionAssembly>

6) Save the Config.xml, switch the solution back to 'Logical View' and run the application.

Last edited Dec 7, 2011 at 3:21 PM by kozw, version 5

Comments

No comments yet.