c# - CSC : error CS7038: Failed to emit module

标签 c# .net visual-studio visual-studio-2015 roslyn

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

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

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

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

有人吗?

更新:看起来问题与 Red Gate Smart Assembly 以及具有默认值的方法参数有关。

更新:Smart Assembly 6.9 为我修复了错误。

最佳答案

原始片段:

    private void radButton1_Click(object sender, EventArgs e)
    {
        string perp = radTextBox1.Text;

        int i = 0;
        DataRow arp = ale.Rows[i];
        while (i <= ale.Rows.Count)
        {
            if (ale.Rows[i].Field<>("FullName") = perp)
            {
                arp = ale.Rows[i];
                ale.Rows.Remove(arp);
            }

        }

        i = ale.Rows.Count;
        radLabel1.Text = i.ToString();
    }

改变了这个:

    if (ale.Rows[i].Field<>("FullName") = perp)

为此:

    if (ale.Rows[i].Field<String>("FullName") == perp)

关于c# - CSC : error CS7038: Failed to emit module,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31692729/

相关文章:

c# - 在 Visual Studio 中禁用特定代码块的代码格式

c# - 如何让我们的窗体(应用程序)在Windows启动时在C#中开始运行?

.net - 为什么我不能在即时窗口中声明新变量?

c++ - 对 C++ 的良好重构支持

C# 列表框实时搜索

bash - 如何从 Visual Studio 2017(基于目录的项目)中的任意构建任务运行 bash?

c# - 从azure网站访问证书时 key 集不存在

c# - C# .NET 中的字符串替换

c# - 如何在 Winform 中使用多线程?

c# - 在c#中实现的数据库连接器接口(interface)