0

I have developed a office application using interop assemblies for Office 2010 in Visual studio 2010.The PIA referred in this is 14.All works fine here. Now I have changed the office 2010 to 2013,so referred PIA 15 in VS 2010.The project builds successfully.When I run the application,the word document launches but Ms office configuration setup also start and after completing the setup it prompt to close the launched office component.It start happening after changing office 2010 to 2013. I have tried removing old references from project and adding again for Office 15 library.But still the same. After a lot search,i found something in my .vbproj file

<Reference Include="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <EmbedInteropTypes>True</EmbedInteropTypes>
  <HintPath>C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Word\15.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Word.dll</HintPath>
</Reference>

Is anything need to change here ? Also I have done the development for office 2010 in VS 2010 ultimate.Now I have started to work in VS 2010 professional for development of office 2013 application.Does this caused any problem.

Please guide.

  • Microsoft does not publish a PIA for Office 2013. Looks like you used a sledgehammer on your GAC to work around that problem. Bad idea. Restore the damage, recreate the project and rely on the Embed Interop Types feature. – Hans Passant Sep 24 '15 at 12:09
  • so you mean I can not develop anything for Office 2013 using Vs 2010. Because VS 2010 contains PIA only 12 and 14. – Reena Sharma Sep 25 '15 at 08:59
  • or does PIA 14 will work for Office 2013.I have created a fresh project and used Embed Interop feature but still same happening. – Reena Sharma Sep 25 '15 at 09:06

1 Answers1

0

Solutions to solve this issue : Solution 1 : Uninstall MS office 2013 and then Visual Studio .Fix registry.Reboot machine.Install MS Office and then visual studio.Refer the PIA given with VS and build project and see if works.

Solution 2: Format the machine,it worked for me.