Upgrade from NetOffice to NetOfficeFw
mc0re opened this issue · comments
When upgrading, I faced the following issue:
PowerPointReference.vb(424,20): error BC30652: Reference required to assembly 'OfficeApi, Version=1.9.4.0, Culture=neutral, PublicKeyToken=297f57b43ae7c1de' containing the type 'MsoTriState'. Add one to your project.
PowerPointReference.vb(424,34): error BC30451: 'MsoTriState' is not declared. It may be inaccessible due to its protection level.
It's an old .NET Framework project. All references to NetOffice
were replaced with NetOfficeFw
, so now the project includes the following:
<Reference Include="NetOffice, Version=1.9.4.0, Culture=neutral, PublicKeyToken=297f57b43ae7c1de, processorArchitecture=MSIL">
<HintPath>..\packages\NetOfficeFw.Core.1.9.4\lib\net462\NetOffice.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="PowerPointApi, Version=1.9.4.0, Culture=neutral, PublicKeyToken=297f57b43ae7c1de, processorArchitecture=MSIL">
<HintPath>..\packages\NetOfficeFw.PowerPoint.1.9.4\lib\net462\PowerPointApi.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
There is no package named OfficeApi
. What am I missing?
Please post your whole project to troubleshoot the issue.
This one: https://github.com/mc0re/next-player (not yet upgraded on GitHub).
The project in question is PlayerActions
.
Thanks @mc0re, this was very helpful.
I see the project is using two nuget packages from the old NetOffice which actually bundle four different libraries.
The NetOfficeFw has a different structure of nuget packages.
I would suggest to use NuGet to first remove the NetOffice.PowerPoint and the NetOffice.Core packages. After that add the newest NetOfficeFw.PowerPoint using NuGet to correctly setup the project.
Here is a guide: https://netoffice.io/migrate-notice/
I did, and the result is posted as OP.
Okay, I did it again, and this time it worked. Probably, some caching issue in VS. Sorry for bothering.
You are welcome @mc0re. Happy coding.