CompilerGeneratedAttribute in source code should cause compilation error - by Nicole Calinoiu

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 270857 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 4/14/2007 8:43:17 AM
Duplicates 270858 Access Restriction Public

Description

The presence of CompilerGeneratedAttribute in source code should cause a compilation error since the attribute is meant to identify elements that are generated by the compiler.
Sign in to post a comment.
Posted by Microsoft on 12/7/2007 at 2:20 AM
The GeneratedCode attribute is intended more for Visual Studio designers that generate C# code within an actual C# project. There are other full-blown languages, however, including some research languages here at Microsoft, that cross-compile to C#. You are really coding directly in this other language, not C#. These languages may wish to generate CompilerGenerated attributes on any internal infrastructure they generate.

Alex Turner
Program Manager
Visual C# Compiler
Posted by Nicole Calinoiu on 5/7/2007 at 12:47 PM
Is there some reason that GeneratedCodeAttribute wouldn't be an appropriate choice for these other compilers?
Posted by Microsoft on 5/7/2007 at 10:34 AM
NC -

Thanks for this suggestion. I understand the motivation for wanting to prevent users from CompilerGenerated in their source code - but unfortuantely I don't think we can make this a compiler error. Among other reasons, there are a number of exisitng compilers which actually target C# code as an intermediate step - and these compilers should be able to emit CompilerGenerated onto the C# source they emit.

Thanks,
Luke Hoban
Visual C# Compiler Program Manager
Posted by Microsoft on 4/16/2007 at 12:52 AM
Thanks for your feedback. We have reproduced this issue on Mar 2007 Orcas CTP, and we are sending this bug to the appropriate group within the VisualStudio Product Team for triage and resolution.

Thank you,
Visual Studio Product Team.
Posted by Microsoft on 4/14/2007 at 6:49 PM
Thank you for your feedback. We are currently investigating. If this issue is urgent, please call support directly (see http://support.microsoft.com).

Thank you,
Visual Studio Product Team