c# - 自定义工具错误 : Failed to generate file

标签 c# .net winforms

我正在开发一个在 VS 2012 (Framework 4.5) windows 窗体中创建的 windows 应用程序 (C#)。要求要求它用于旧版本的 Windows,因此我将目标框架设置为 .NET Framework 4 并将平台目标设置为 x86。一旦完成并尝试编译,我会收到以下错误:

Custom tool error: Failed to generate file: The service reference is not valid for the current .NET Framework version or project type. You can change the service reference configuration in the .svcmap

在切换到框架 4 之前,我尝试取消选中服务引用中的“Reuse types in referenced assemblies”框,但没有成功。

最佳答案

显然,有时这个错误可以简单地通过 re-adding the reference 来避免。 .你试过吗?

关于c# - 自定义工具错误 : Failed to generate file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20477019/

相关文章:

c# - MSBuild:将导入项目中的相对路径转换为绝对路径

c# - 我收到 COM 错误,我需要任何指导来解决这个问题

c# - 一般如何在 DateTimePicker-Control/Controls 中获取按钮的宽度?

c# - 没有选项卡的 WPF TabPanel?

c# - 从opc服务器同步读取

java - "Drawing"由控制台应用程序中的字符组成的填充椭圆

c# - 使用 fluentvalidation 检查另一条规则

.net - Visual Studio 属性面板

c# - 在类中打包事件参数,为什么?

c# - 从面板保存图像