Build failure since latest VS update

Category: visual studio general

Question

ph.waeber on Tue, 08 May 2018 12:40:25


[Edit]: Followup discussin in https://developercommunity.visualstudio.com/content/problem/248887/build-failure-since-1570-vs-update.html

Hi,

For an older project, using .NET 3.5, I have to maintain, I am unable to build it anymore since I've updated VS today. As everything worked OK until now, I suspect the update to be at cause.
I've update Windows 10 to the latest version and got Version 1709 (OS Build 16299.402)

A colleague using VS 15.6.2 doesn't encounter this issue.

Error 1:
Error: <path>: error CS1752: Interop type 'Action' cannot be embedded. Use the applicable interface instead.
Source: using Action = CrystalDecisions.Enterprise.Action;
When removing the using and explicitly specifying the correct namespace in the call, the issue goes away and Error 2 occurs.

Error2:
Error:<path>: error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert'
Source (last line):
var excelApp = new ExcelInterop.Application();
var workBook = excelApp.Workbooks.Add();
var workSheet = (ExcelInterop.Worksheet) excelApp.ActiveSheet;

The Microsoft.Office.Interop.Excel.dll ius part of source control and hasn't changed. Runtime Version=v1.1.4322; Version=12.0.0.0

Visual Studio Info:

Microsoft Visual Studio Professional 2017 
Version 15.7.0
VisualStudio.15.Release/15.7.0+27703.1
Microsoft .NET Framework
Version 4.7.02556

Installed Version: Professional

Visual C++ 2017   00369-60000-00001-AA843
Microsoft Visual C++ 2017

Application Insights Tools for Visual Studio Package   8.12.10405.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.40501.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   15.7.31476
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017   5.2.60419.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.40424.0
Azure App Service Tools v3.0.0

C# Tools   2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Entity Framework 6 Power Tools   0.9.2
Preview of useful design-time DbContext features, added to the Visual Studio Solution Explorer context menu.

When right-clicking on a file containing a derived DbContext class, the following context menu functions are supported:
1) View Entity Data Model (Read-only) - Displays a read-only view of the Code First model in the Entity Model Designer.
2) View Entity Data Model XML - Displays the EDMX XML representing the underlying Code First model.
3) View Entity Data Model DDL SQL - Displays the DDL SQL corresponding to the SSDL in the underlying EDM Model.
4) Generate Views - Generates pre-compiled views used by the EF runtime to improve start-up performance. Adds the generated views file to the containing project.

When right-clicking on an Entity Data Model (*.edmx) file, the following context menu function is supported:
Generate Views - Generates pre-compiled views used by the EF runtime to improve start-up performance. Adds the generated views file to the containing project.

FormatDocumentOnSave   1.0
Enables auto formatting of the code when you save a file. Visual Studio supports auto formatting of the code with the CTRL+E,D or CTRL+E,F key shortcuts but with this extension the command 'Format Document' is executed on Save.

You can find the source here: https://github.com/Elders/VSE-FormatDocumentOnSave

GhostDoc   5.9.18070.0
Generate XML Comments from your code, maintain clean and up-to-date documentation, produce help documentation in multiple formats, use intelligent source code Spell Checker in Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

JetBrains ReSharper Ultimate 2017.3.5    Build 111.0.20180323.160610
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2018 JetBrains, Inc.

Markdown Editor   1.12.233
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.10420.2

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ReSharper.AutoFormatOnSave   1.0
Runs silent Reformat Code command upon file save.

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

SQL Server Data Tools   15.1.61804.210
Microsoft SQL Server Data Tools

TypeScript Tools   15.7.20419.2003
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.1 for F# 4.1   15.7.0.0.  Commit Hash: 16ecf5a30ad868d183c58e4a71a71c23d4ed3ba9.
Microsoft Visual F# Tools 10.1 for F# 4.1

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Universal Windows Apps   15.0.27703.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Windows Machine Learning Generator Extension   1.0
Windows Machine Learning Visual Studio Extension Detailed Info

Any idea what's going on here?


Replies

CephalopodDarius on Wed, 09 May 2018 21:28:04


I've been having the same issue ("error CS0656: Missing compiler required member" when building a .Net 3.5 project) since I updated to Visual Studio 2017 15.7.1.

I was able to work around this by editing the csproj file and setting EmbedInteropTypes from "True" to "False" for all my interop references.

<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
    <HintPath>..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
      <EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>


ph.waeber on Mon, 14 May 2018 07:26:57


Thanks! This workaround indeed fixes the build! I'll just have to check that this doesn't cause any other problems for the developrs using VS2015.