Bug 11505 - When creating a new Web Project the templates doesn't put the using in the top of the file
Summary: When creating a new Web Project the templates doesn't put the using in the to...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 4.0.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-04-01 13:35 UTC by Ricardo
Modified: 2013-04-02 05:09 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Ricardo 2013-04-01 13:35:57 UTC
1.Create de new Asp.Net C# project.
All code behind putting in the project doesn't have the section of the using. 
those files: 
*.aspx
*.asax 

2. Create a new file web form with code behind.
The behave is just like previous. 


always you do it, the behave will be the same.
Comment 1 Mikayla Hutchinson [MSFT] 2013-04-01 14:39:28 UTC
I tried to repro this on master but I got an error from the C# parser:

System.NotSupportedException: Operation is not supported.
  at ICSharpCode.NRefactory.CSharp.CodeDomConvertVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<System.CodeDom.CodeObject>.VisitNewLine (ICSharpCode.NRefactory.CSharp.NewLineNode newLineNode) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs:1344 
  at ICSharpCode.NRefactory.CSharp.NewLineNode.AcceptVisitor[CodeObject] (IAstVisitor`1 visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NewLineNode.cs:54 
  at ICSharpCode.NRefactory.CSharp.CodeDomConvertVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<System.CodeDom.CodeObject>.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00027] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs:1248 
  at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor[CodeObject] (IAstVisitor`1 visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs:145 
  at ICSharpCode.NRefactory.CSharp.CodeDomConvertVisitor.Convert (ICSharpCode.NRefactory.CSharp.AstNode node, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver) [0x0002b] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs:101 
  at ICSharpCode.NRefactory.CSharp.CodeDomConvertVisitor.Convert (ICompilation compilation, ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree, ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpUnresolvedFile unresolvedFile) [0x0002c] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs:81 
  at MonoDevelop.CSharp.CSharpEnhancedCodeProvider.ParseInternal (System.IO.TextReader codeStream) [0x00040] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpEnhancedCodeProvider.cs:87 
  at MonoDevelop.CSharp.CSharpEnhancedCodeProvider.Parse (System.IO.TextReader codeStream) [0x00001] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpEnhancedCodeProvider.cs:59 
  at MonoDevelop.Ide.Templates.CodeTranslationFileDescriptionTemplate.CreateContent (MonoDevelop.Projects.Project project, System.Collections.Generic.Dictionary`2 tags, System.String language) [0x0004e] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs:98 
ERROR [2013-04-01 14:38:26Z]: File Default.aspx.${LanguageExtension} could not be written.
System.NotSupportedException: Operation is not supported.
  at ICSharpCode.NRefactory.CSharp.CodeDomConvertVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<System.CodeDom.CodeObject>.VisitNewLine (ICSharpCode.NRefactory.CSharp.NewLineNode newLineNode) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs:1344 
  at ICSharpCode.NRefactory.CSharp.NewLineNode.AcceptVisitor[CodeObject] (IAstVisitor`1 visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NewLineNode.cs:54 
  at ICSharpCode.NRefactory.CSharp.CodeDomConvertVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<System.CodeDom.CodeObject>.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00027] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs:1248 
  at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor[CodeObject] (IAstVisitor`1 visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs:145 
  at ICSharpCode.NRefactory.CSharp.CodeDomConvertVisitor.Convert (ICSharpCode.NRefactory.CSharp.AstNode node, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver) [0x0002b] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs:101 
  at ICSharpCode.NRefactory.CSharp.CodeDomConvertVisitor.Convert (ICompilation compilation, ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree, ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpUnresolvedFile unresolvedFile) [0x0002c] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs:81 
  at MonoDevelop.CSharp.CSharpEnhancedCodeProvider.ParseInternal (System.IO.TextReader codeStream) [0x00040] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpEnhancedCodeProvider.cs:87 
  at MonoDevelop.CSharp.CSharpEnhancedCodeProvider.Parse (System.IO.TextReader codeStream) [0x00001] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpEnhancedCodeProvider.cs:59 
  at MonoDevelop.Ide.Templates.CodeTranslationFileDescriptionTemplate.CreateContent (MonoDevelop.Projects.Project project, System.Collections.Generic.Dictionary`2 tags, System.String language) [0x0004e] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/CodeTranslationFileDescriptionTemplate.cs:98
Comment 2 Ricardo 2013-04-01 15:55:46 UTC
I'm putting the using by hand for while. 

Some idea when it will be fix?

thanks!
Comment 3 Mike Krüger 2013-04-02 05:09:42 UTC
fixed