Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacing Microsoft.VisualBasic.CompilerServices.DesignerGenerated()

Tags:

c#

I am converting a VB.NET project over to C#. After the conversion I still have some outstanding issues to deal with. One is the left over DesignerGenerated() attribute.

[Microsoft.VisualBasic.CompilerServices.DesignerGenerated()]

internal partial class Tags : ServiceBase {

...

I do not want to just reference the VisualBasic assembly to make this code happy. I don't want any remenence of VB period. So I don't know how to replace this attribute with an equivilant C# attribute here. It looks like this DesignerGenerated() is only used in VB.NET so not sure how to resolve this and convert it to some C# equivalent.

like image 773
PositiveGuy Avatar asked Jul 07 '11 02:07

PositiveGuy


1 Answers

Only the VB.NET compiler ever checks for this attribute. See this answer for the reason it exists.

You can safely remove it.

like image 122
Hans Passant Avatar answered Oct 05 '22 23:10

Hans Passant