0
votes

We use visio in our asp.net project. I also use visio 2013 and visual studio 2012 in my computer. but in we.config we add assembly visio 2010 and in product inviroment office 2010 installed

<add assembly="Microsoft.Office.Interop.Visio, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C" />

but problem is every time i publish website in production server raise this error

Could not load file or assembly 'Microsoft.Office.Interop.Visio, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I check visio assembly version in bin folder of my project (it was 2010) and In web.config i clearly declare version of this assembly

Waht is the problem? why program seek for version 15?

Other team member dont have this problem when publish site (thay installed office 2010 and VS 2010)

1
Which assembly do you reference in you project file? I.e. not in the web.config but in the project (.csproj probably) file?Nikolay

1 Answers

0
votes

There seems to be a bug in installing Office 2013, where if you install any 2013 component you end up getting COM registration across multiple products (I haven't seen this with Visio, but have seen it a lot with Excel).

The only way I've fixed the problem is by finding and removing any registry keys with 'Microsoft.Office.Interop.Visio, Version=15.0.0.0' in the value. Once they are all gone, COM starts providing the correct reference.