Issue Tracker

Syndicate content
sparkviewengine Issue Tracker Rss Description
Updated: 1 min 58 sec ago

Commented Issue: Force CompilerParameters.TreatWarningsAsErrors = false in BatchCompiler.Compile() [3873]

Tue, 08/31/2010 - 02:45
I don't think we need warnings in generated classes.
By default TreatWarningsAsErrors = (WarningLevel > 0).
I don't want to touch WarningLevel in my system.codedom section, and <providerOption name="WarnAsError" value="false" /> is taken into account only for Web Forms compilation.
So it will be nice to to set TreatWarningsAsErrors = false in code. Or at least read the provider <providerOption name="WarnAsError" value="false" /> (unfortunately it is internal so read is only possible via reflection).

Issue is actual only for later versions of Spark, in 1.0release compiler parameters were created via new CompilerParameters().
Comments: ** Comment from web user: tgmayfield **

Actually, depending on the warning you may have to drop it lower. Mea culpa.

Categories: Issue Tracker

Commented Issue: Force CompilerParameters.TreatWarningsAsErrors = false in BatchCompiler.Compile() [3873]

Tue, 08/31/2010 - 02:38
I don't think we need warnings in generated classes.
By default TreatWarningsAsErrors = (WarningLevel > 0).
I don't want to touch WarningLevel in my system.codedom section, and <providerOption name="WarnAsError" value="false" /> is taken into account only for Web Forms compilation.
So it will be nice to to set TreatWarningsAsErrors = false in code. Or at least read the provider <providerOption name="WarnAsError" value="false" /> (unfortunately it is internal so read is only possible via reflection).

Issue is actual only for later versions of Spark, in 1.0release compiler parameters were created via new CompilerParameters().
Comments: ** Comment from web user: tgmayfield **

Note to people getting these errors: Check your web.config system.codedom section for warningLevel="4", which equates to telling the compiler to treat all warnings as errors. Drop it down to 3.

Categories: Issue Tracker

Commented Issue: SparkSense throws an exception whenever it runs [6846]

Thu, 08/19/2010 - 16:03
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListener.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Comments: ** Comment from web user: alex_clark **

I had this problem - I fixed it by doing the following:

Go through each View folder in the solution and check that Studio hasn't added the same spark file twice to the solution. In my case, it had doubled up a file called details.spark. The solution would compile fine, but the sparksense threw the error.

Categories: Issue Tracker

Commented Issue: SparkSense throws an exception whenever it runs [6846]

Thu, 08/19/2010 - 14:09
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListener.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Comments: ** Comment from web user: Rohland **

I just realised that I attempted to use the plugin on a webforms project that was recently integrated with MVC. There was a 'Views' folder but I noticed that the folder name was all lowercase. I haven't re-attempted to use the plugin on this specific project, but that may be the issue.

Categories: Issue Tracker

Commented Issue: SparkSense throws an exception whenever it runs [6846]

Wed, 08/18/2010 - 21:08
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListener.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Comments: ** Comment from web user: RobertGreyling **

I've fixed the bug in my local build for the original issue. This will be released soon, but you can get it from source if you're desperate. @Rohland, I don't think yours is the same issue, it's happening in an entirely different area of the code and I think it might be because you don't have your views in a "Views" folder in the solution. Just guessing, but I'll look into it anyway, I don't want the exception thrown, I'd rather have the IntelliSense just *not* work.

Categories: Issue Tracker

Commented Issue: SparkSense throws an exception whenever it runs [6846]

Tue, 08/17/2010 - 18:27
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListener.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Comments: ** Comment from web user: Rohland **

I am getting a similar result. As soon as I open a spark file and attempt to invoke the intellisense the extension crashes. After reviewing the log file, I found the following exception:

System.ArgumentNullException: Value cannot be null.&#x000D;&#x000A;Parameter name: oldValue&#x000D;&#x000A; at System.String.Replace(String oldValue, String newValue)&#x000D;&#x000A; at SparkSense.Parsing.ProjectExplorer.GetCurrentViewPath()&#x000D;&#x000A; at SparkSense.Parsing.ViewExplorer.InitCurrentView()&#x000D;&#x000A; at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer)&#x000D;&#x000A; at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer)&#x000D;&#x000A; at SparkSense.StatementCompletion.CompletionListener.TryCreateCompletionSource(ITextBuffer textBuffer)&#x000D;&#x000A; at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.&lt;&gt;c__DisplayClass1.&lt;CreateSourcesForBuffer&gt;b__0(ICompletionSourceProvider provider)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource)

Categories: Issue Tracker

Created Issue: SparkSense throws an exception whenever it runs [6846]

Tue, 08/10/2010 - 22:50
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.ScanProjectItemForViews(ProjectItem projectItem) at SparkSense.Parsing.ProjectExplorer.BuildViewMapFromProjectEnvironment() at SparkSense.Parsing.ProjectExplorer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExplorer.GetViewFolder() at SparkSense.Parsing.ViewExplorer.InitCurrentView() at SparkSense.Parsing.ViewExplorer..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionSource..ctor(ITextBuffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion.CompletionListener.TryCreateCompletionSource(ITextBuffer textBuffer) at Microsoft.VisualStudio.Language.Intellisense.Implementation.CompletionBroker.<>c__DisplayClass1.<CreateSourcesForBuffer>b__0(ICompletionSourceProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource) Editor or Editor Extension 2010/08/10 15:49:12.712
Categories: Issue Tracker

Commented Issue: Content within HTML conditional comments is ignored [6373]

Thu, 07/29/2010 - 07:41
What happens: When content is placed within an HTML conditional comment, it is not evaluated by Spark and instead output as a literal string.
What's expected: Content within an HTML conditional comment should be evaluated by Spark.

Example code to reproduce:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="~/css/ie.6.css">
<![endif]-->

Expected Output:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="http://mysiteroot.com/css/ie.6.css">
<![endif]-->

Actual Output:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="~/css/ie.6.css">
<![endif]-->


I appreciate why this is happening - commented content should be ignored, but conditional comment should ideally be handled as a special case.


Further Information:
* Conditional Comments - http://en.wikipedia.org/wiki/Conditional_comment and http://www.quirksmode.org/css/condcom.html
Comments: ** Comment from web user: mattdotson **

You can work around this issue by putting the starting comment tag in a code block.

!{ "<!--[if IE 6]>" }

It would be nice if spark knew about this, but it's not that hard to work around.

Categories: Issue Tracker

Created Issue: JavaScriptView works slightly difference [6462]

Wed, 07/07/2010 - 19:50
I have a partial view. The view has a binding ${Product.Barcode} and the barcode is set to null. If the view is generated on the server side it works well. The result of the binding is empty string. But when I use generated JavaScript view code to build html tree it doesn't work, because the JavaScript code contains following line:

this.Write = function(arg) {this._parts.push(arg.toString());};

It seems the Writer is invoked with arg = ${Product.Barcode} (null) and null reference exception is thrown.
I would expect the both compiled views (C# and JavaScript) should accept the same parameters and produce the same results.
Categories: Issue Tracker

Created Issue: Content within HTML conditional comments is ignored [6373]

Wed, 06/30/2010 - 18:03
What happens: When content is placed within an HTML conditional comment, it is not evaluated by Spark and instead output as a literal string.
What's expected: Content within an HTML conditional comment should be evaluated by Spark.

Example code to reproduce:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="~/css/ie.6.css">
<![endif]-->

Expected Output:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="http://mysiteroot.com/css/ie.6.css">
<![endif]-->

Actual Output:
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" media="screen" href="~/css/ie.6.css">
<![endif]-->


I appreciate why this is happening - commented content should be ignored, but conditional comment should ideally be handled as a special case.


Further Information:
* Conditional Comments - http://en.wikipedia.org/wiki/Conditional_comment and http://www.quirksmode.org/css/condcom.html
Categories: Issue Tracker

Commented Issue: HTML 5 and Spark view engine - Naming conflict 'section' [5625]

Thu, 06/17/2010 - 12:37
I was just trying to create a html 5 page and added some <section> (http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-section-element) tags to separate content. When the spark compiler tried to compile this page I got:

[CompilerException: Section cannot be used at this location]
Spark.Compiler.NodeVisitors.ChunkBuilderVisitor.VisitSection(SpecialNode node, SpecialNodeInspector inspector) +800
Spark.Compiler.NodeVisitors.ChunkBuilderVisitor.Visit(SpecialNode specialNode) +132
Spark.Compiler.NodeVisitors.AbstractNodeVisitor.Accept(IList`1 nodes) +101
....

I'm not sure if there are any other naming conflicts between html 5 and spark but this is a serious one as section is an important new tag.
Comments: ** Comment from web user: DigiKev **

There is nothing elegant about this work around but it solves the problem for anyone who wishes to use the section tag now.

Categories: Issue Tracker

Commented Issue: HTML 5 and Spark view engine - Naming conflict 'section' [5625]

Thu, 06/17/2010 - 04:06
I was just trying to create a html 5 page and added some <section> (http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-section-element) tags to separate content. When the spark compiler tried to compile this page I got:

[CompilerException: Section cannot be used at this location]
Spark.Compiler.NodeVisitors.ChunkBuilderVisitor.VisitSection(SpecialNode node, SpecialNodeInspector inspector) +800
Spark.Compiler.NodeVisitors.ChunkBuilderVisitor.Visit(SpecialNode specialNode) +132
Spark.Compiler.NodeVisitors.AbstractNodeVisitor.Accept(IList`1 nodes) +101
....

I'm not sure if there are any other naming conflicts between html 5 and spark but this is a serious one as section is an important new tag.
Comments: ** Comment from web user: gatapia **

That is super ugly

Categories: Issue Tracker

Commented Issue: HTML 5 and Spark view engine - Naming conflict 'section' [5625]

Wed, 06/16/2010 - 19:01
I was just trying to create a html 5 page and added some <section> (http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-section-element) tags to separate content. When the spark compiler tried to compile this page I got:

[CompilerException: Section cannot be used at this location]
Spark.Compiler.NodeVisitors.ChunkBuilderVisitor.VisitSection(SpecialNode node, SpecialNodeInspector inspector) +800
Spark.Compiler.NodeVisitors.ChunkBuilderVisitor.Visit(SpecialNode specialNode) +132
Spark.Compiler.NodeVisitors.AbstractNodeVisitor.Accept(IList`1 nodes) +101
....

I'm not sure if there are any other naming conflicts between html 5 and spark but this is a serious one as section is an important new tag.
Comments: ** Comment from web user: DigiKev **

Where there is a will there is a way, just spit out the section tags as string literals like so:

!{"<section id='page-content'>"}

!{"</section>"}

Categories: Issue Tracker

Commented Issue: Spark generated .cs failes when the view is a generic class [6068]

Sun, 05/30/2010 - 15:46
I was working on running spark outside of mvc, and created a nested class which derived from AbstractSparkView.

This causes compilation errors because the reference to the generic class is not correct

extract:


public abstract class GenericView<T> : AbstractSparkView
where T : class
{
public class ViewDataContainer
{
private Dictionary<String, Object> store = new Dictionary<string, object>();
public object Eval(string expression)
{
return store[expression];
}
public void Add(string expression, object result)
{
store.Add(expression, result);
}
}
public GenericView()
{
ViewData = new ViewDataContainer();
}
public T Model { get; set; }
public ViewDataContainer ViewData { get; private set; }
}



Than using this like the following code:
var settings = new SparkSettings().SetPageBaseType(typeof(GenericView<T>));
var templates = new InMemoryViewFolder();
var engine = new SparkViewEngine(settings)
{
ViewFolder = templates
};
var templates.Add("template.spark", File.ReadAllText(sparkTemplate));
var descriptor = new SparkViewDescriptor().AddTemplate("template.spark");
var view = (GenericView<T>)engine.CreateInstance(descriptor); // exception here

causes exceptions due to the following file being generated:

public class View985cb5903412401d80854c30ff9b0761 : GeneratePDFFromTemplate.GenericView`1[[generic class description]

Just thought I should report the bug, although it is a very unusual usage.

keep up the good work :)
Comments: ** Comment from web user: DavyLandman **

Hi Matt,

Yes, dynamic could work, but does imply C# 4... while if the generator would recognize generic classes and rebuild them correctly this wouldn't be a problem.

Categories: Issue Tracker

Commented Issue: Spark generated .cs failes when the view is a generic class [6068]

Sun, 05/30/2010 - 14:27
I was working on running spark outside of mvc, and created a nested class which derived from AbstractSparkView.

This causes compilation errors because the reference to the generic class is not correct

extract:


public abstract class GenericView<T> : AbstractSparkView
where T : class
{
public class ViewDataContainer
{
private Dictionary<String, Object> store = new Dictionary<string, object>();
public object Eval(string expression)
{
return store[expression];
}
public void Add(string expression, object result)
{
store.Add(expression, result);
}
}
public GenericView()
{
ViewData = new ViewDataContainer();
}
public T Model { get; set; }
public ViewDataContainer ViewData { get; private set; }
}



Than using this like the following code:
var settings = new SparkSettings().SetPageBaseType(typeof(GenericView<T>));
var templates = new InMemoryViewFolder();
var engine = new SparkViewEngine(settings)
{
ViewFolder = templates
};
var templates.Add("template.spark", File.ReadAllText(sparkTemplate));
var descriptor = new SparkViewDescriptor().AddTemplate("template.spark");
var view = (GenericView<T>)engine.CreateInstance(descriptor); // exception here

causes exceptions due to the following file being generated:

public class View985cb5903412401d80854c30ff9b0761 : GeneratePDFFromTemplate.GenericView`1[[generic class description]

Just thought I should report the bug, although it is a very unusual usage.

keep up the good work :)
Comments: ** Comment from web user: mattdotson **

@davy ... By the way. I was able to work around your generic issue using a dynamic type

public abstract class GenericView : AbstractSparkView
{
public dynamic Model { get; set; }
}

Categories: Issue Tracker

Commented Issue: Spark generated .cs failes when the view is a generic class [6068]

Sun, 05/30/2010 - 13:59
I was working on running spark outside of mvc, and created a nested class which derived from AbstractSparkView.

This causes compilation errors because the reference to the generic class is not correct

extract:


public abstract class GenericView<T> : AbstractSparkView
where T : class
{
public class ViewDataContainer
{
private Dictionary<String, Object> store = new Dictionary<string, object>();
public object Eval(string expression)
{
return store[expression];
}
public void Add(string expression, object result)
{
store.Add(expression, result);
}
}
public GenericView()
{
ViewData = new ViewDataContainer();
}
public T Model { get; set; }
public ViewDataContainer ViewData { get; private set; }
}



Than using this like the following code:
var settings = new SparkSettings().SetPageBaseType(typeof(GenericView<T>));
var templates = new InMemoryViewFolder();
var engine = new SparkViewEngine(settings)
{
ViewFolder = templates
};
var templates.Add("template.spark", File.ReadAllText(sparkTemplate));
var descriptor = new SparkViewDescriptor().AddTemplate("template.spark");
var view = (GenericView<T>)engine.CreateInstance(descriptor); // exception here

causes exceptions due to the following file being generated:

public class View985cb5903412401d80854c30ff9b0761 : GeneratePDFFromTemplate.GenericView`1[[generic class description]

Just thought I should report the bug, although it is a very unusual usage.

keep up the good work :)
Comments: ** Comment from web user: mattdotson **

I got something similar where my implementation of a AbstractSparkView was a nested class.

public class MyParentClass
{
public class MySparkView : AbstractSparkView { ... }
}

Spark failed because it doesn't expect a + in the class name. (i.e. MyParentClass+MySparkView)

Also low priority, but just giving more info

Categories: Issue Tracker

Commented Issue: Force CompilerParameters.TreatWarningsAsErrors = false in BatchCompiler.Compile() [3873]

Thu, 05/27/2010 - 17:34
I don't think we need warnings in generated classes.
By default TreatWarningsAsErrors = (WarningLevel > 0).
I don't want to touch WarningLevel in my system.codedom section, and <providerOption name="WarnAsError" value="false" /> is taken into account only for Web Forms compilation.
So it will be nice to to set TreatWarningsAsErrors = false in code. Or at least read the provider <providerOption name="WarnAsError" value="false" /> (unfortunately it is internal so read is only possible via reflection).

Issue is actual only for later versions of Spark, in 1.0release compiler parameters were created via new CompilerParameters().
Comments: ** Comment from web user: aloker **

I totally agree. Treating warnings as errors causes compilation of the following to fail because the compiler detects unreachable code (if(false)...):

<script type="text/javascript" src="~/Scripts/jquery-1.4.1.min.js" if="false"></script>

(useful to get jquery intellisense)

Categories: Issue Tracker