我正在开发一个在 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/