This happens when the names of a class and its namespace only differ in case (NS1 vs Ns1).
VB.Net input code
Imports NS1
Public Class TestNameSpaceSameNameAsClass
Public WithEvents ins As NS1.Ns1
End Class
Namespace Global.NS1
Public Class Ns1
End Class
End Namespace
Erroneous output
using System.Runtime.CompilerServices;
namespace NS1
{
public class NS1
{
}
}
public class TestNameSpaceSameNameAsClass
{
private NS1 _ins; //error: this class doesn't exist
public virtual NS1 ins
{
[MethodImpl(MethodImplOptions.Synchronized)]
get
{
return _ins;
}
[MethodImpl(MethodImplOptions.Synchronized)]
set
{
_ins = value;
}
}
}
Expected output
using System.Runtime.CompilerServices;
namespace NS1
{
public class NS1
{
}
}
public class TestNameSpaceSameNameAsClass
{
private NS1.Ns1 _ins;
public virtual NS1.Ns1 ins
{
[MethodImpl(MethodImplOptions.Synchronized)]
get
{
return _ins;
}
[MethodImpl(MethodImplOptions.Synchronized)]
set
{
_ins = value;
}
}
}
Details
Product in use: VS extension
Version in use: ae25cdc920df68755fb233934028091c97b42853
Did you see it working in a previous version, which? No
Any other relevant information to the issue, or your interest in contributing a fix.
This happens when the names of a class and its namespace only differ in case (
NS1
vsNs1
).VB.Net input code
Erroneous output
Expected output
Details