Sound like you are adding a reference via COM (and may be wrong), try from Assemblies e.g.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Recently during a routine compile of our VB.NET application we ran into this warning:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(2729,5):
warning MSB3304: Could not determine the dependencies of the COM reference "Microsoft.Office.Interop.Outlook".
Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND))
[C:\<path-to>\Base.vbproj]
This appears to be related to this section in Base.vbproj:
<COMReference Include="Microsoft.Office.Interop.Outlook">
<Guid>{00062FFF-0000-0000-C000-000000000046}</Guid>
<VersionMajor>9</VersionMajor>
<VersionMinor>4</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
Any suggestions on how to resolve this or direction to take my research will be appreciated. I have build this application many times over the years and nothing in this area has changed recently.
Kind regards.
-Randy Galbraith
Sound like you are adding a reference via COM (and may be wrong), try from Assemblies e.g.
Hi Karen Payne.
Thank you so much for your response. Your suggestion does appear to work, however some questions remain. In Visual Studio 2017 I went into References and deleted Microsoft.Office.Interop.Outlook. I then added it back as you suggested. This resulted in the following update to my .vbproj file:
<Reference Include="Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\Bin\Microsoft.Office.Interop.Outlook.dll</HintPath>
</Reference>
Although MSB3304 no longer appears, what does replacing <COMReference> with <Reference> mean for our project? As far as I can determine the <COMReference> that currently exists works for others. Indeed a fellow release engineer at our company just compiled this project yesterday without this warning.
Although I seek answers to these questions I nonetheless want to thank you for your suggestion.
Kind regards,
-Randy Galbraith