Latest ILSpy produce dup names
I update ILSpy from .NET 4.7.2 to .NET 6
Workbook workbook = new Workbook(string_0);
Worksheet worksheet = null; // 1. worksheet
string text = "保温规格代号";
foreach (Worksheet worksheet in workbook.Worksheets) // 2. worksheet
{
if (worksheet.Cells[0, 0].StringValue == text)
{
worksheet = worksheet;
break;
}
}
Old ILSpy doesn't have such issue
Seems produced in the latest commit : https://github.com/icsharpcode/ILSpy/commit/6584a2f5763256e2298dd9b5d859d7bb95ac4193
Can you provide us with a sample that produces this?
Build following code and delete .pdb file
internal class Program
{
static void Main(string[] args)
{
Product product = null;
foreach (var pro in Products)
{
if (pro != null)
{
product = pro;
break;
}
}
Test(product);
}
public static IList<Product> Products { get; set; }
public static void Test(Product product)
{
}
}
class Product
{
}
@christophwille ILSpy already revert that commit, does it mean your team already can reproduce it? If you want to test, reset to that commit.
I think this can be closed as I can no longer reproduce the problem using the above snippet and we've rolled back the initial change that triggered this bug.