CSC:错误 CS7038:无法发射模块 [英] CSC : error CS7038: Failed to emit module

查看:64
本文介绍了CSC:错误 CS7038:无法发射模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装 Visual Studio 2015 并构建我的项目后,我收到错误

After installing Visual Studio 2015 and building my project I receive the error

CSC:错误 CS7038:无法发射模块".

"CSC : error CS7038: Failed to emit module".

但是我的解决方案在 Visual Studio 2013 中构建良好.

However my solution is building fine in Visual Studio 2013.

这是一个 ASP.NET webforms 项目 .NET 4.0

It is an ASP.NET webforms project .NET 4.0

有人吗?

更新:问题似乎与 Red Gate Smart Assembly 以及具有默认值的方法参数有关.

UPDATE: it looks like the problem has to do with Red Gate Smart Assembly in combination with method parameters with default values.

更新:Smart Assembly 6.9 为我修复了这个错误.

UPDATE: Smart Assembly 6.9 fixes the error for me.

推荐答案

出现同样的错误(全新安装 VS2015 Enterprise、ASP.NET webforms 项目 .NET 4.0).

Got the same error (fresh installation of the VS2015 Enterprise, ASP.NET webforms project .NET 4.0).

经过一些调查,我发现引用中有两个 DLL 导致了这种情况.两者都是 .Net 2.0 程序集,并且都被 Red Gate Smart Assembly 6.5 混淆.真正的原因是...混淆.

After some investigation I've found that there are two DLLs in references which causes this. Both are .Net 2.0 assemblies and both of them obfuscated by Red Gate Smart Assembly 6.5. And the real reason is... obfuscation.

幸运的是,这些程序集是我的,所以我尝试在不使用 Smart Assembly 的情况下构建它们 - 错误消失了.

Luckily, these assemblies are mine, so I've tried to build them without using of Smart Assembly - error is gone.

有趣的是,在尝试构建项目之前,Visual Studio 没有显示任何错误或警告.

Interesting is that no any errors or warnings shown by Visual Studio before trying to build a project.

祝你好运!

编辑:将 Smart Assembly 更新到 6.9 版修复了一个问题.

EDIT: Updating Smart Assembly to version 6.9 fixed an issue.

这篇关于CSC:错误 CS7038:无法发射模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆