I have a C# WPF project that refers to a VB.NET WPF project. Certain windows in the C# project use UserControls defined in the VB.NET project. Recently I have been unable to build the C# project because of these UserControls. The build output shows the following for each window that uses the VB.NET UserControl:
error MC1000: Unknown build error, 'Could not find assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly. Line 37 Position 134.'
The build error is resolved if I add a Microsoft.VisualBasic reference to the C# project's dependencies. However, this wasn't required until recently. I first noticed it with Visual Studio Preview 16.4 then changed back to Enterprise with 16.3. I'm currently using VS Enterprise 16.3.9 and now have the same issue there (even though it worked for this version before).
My question is, is it really necessary to add a Microsoft.VisualBasic reference to my C# project or is this something else?