Discussion Group
Re: SparkViewEngine spontaneous NullReferenceException while rendering view
master and some dummy childactions / partial views.
If i ever get more time to look at it i will think about stripping
down the project until the exception dissapears, hopefully pinpointing
the exact spot of the problem this way.
Commented Issue: Force CompilerParameters.TreatWarningsAsErrors = false in BatchCompiler.Compile() [3873]
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).
Commented Issue: Force CompilerParameters.TreatWarningsAsErrors = false in BatchCompiler.Compile() [3873]
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).
Re: Warning as Error
culpa. Easier still is to drop the <system.codedom> section unless
you have need of customizing it.
Re: Warning as Error
system.codedom section for warningLevel="4", which equates to telling
the compiler to treat all warnings as errors. Drop it down to 3.
Re: Warning as Error
temporarily disabled with an <if condition="false"> block.
I'd love to have this be configurable, as my spark compilation
integration tests would benefit greatly from finding warnings as
errors (which they currently don't--with the same web.config section,
Re: Bindings
as part of a dictionary, as part of viewdata or even the viewdata
model itself.
Is it possilbe I may need to change a setting somewhere?
Cheers
Re: Bindings
Thanks for the replies and sorry to sound like a bit of a hassle.
I really like the idea of bindings hence perservering with them.
Having tried Louis' lates suggestion I get the error:
error CS1040: Preprocessor directives must appear as the first non-
whitespace character on a line
RE: Bindings
<element name="partial">#Html.RenderPar tial("@name", @data)</element>
But I think your usage might need some adjustments around the quoting of attributes...
<partial name="'FeedbackPageTable'" data=Model />
Try:
<partial name="FeedbackPageTable" data="Model" />
-----Original Message-----
Re: Bindings
[link]
Re: Bindings
Is there a property for passing a model to the partial?
Re: Bindings
Html.RenderPartial (to my knowledge) is the MSMVC helper used when rendering ascx partials. In your case, if your partial is a spark partial, then you don't need Bindings, you can just call it by typing <FeedbackPageTable/>
Bindings
Secondly: I cannot get them to work correctly in some cases.
I have tried to create a partial binding that renders a partial view
by passing a name and a model:
Binding:
<element name="partial">#Html.RenderPar tial("@name", @data)</element>
Code that I want it to replace in my view:
Commented Issue: SparkSense throws an exception whenever it runs [6846]
279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgume ntException(ExceptionResource resource) at System.Collections.Generic.Dic tionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.BuildViewMapFromProjectEn vironment() at SparkSense.Parsing.ProjectExpl orer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExpl orer.GetViewFolder() at SparkSense.Parsing.ViewExplore r.InitCurrentView() at SparkSense.Parsing.ViewExplore r..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionSource..ctor(ITextB uffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionListe
Commented Issue: SparkSense throws an exception whenever it runs [6846]
279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgume ntException(ExceptionResource resource) at System.Collections.Generic.Dic tionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.BuildViewMapFromProjectEn vironment() at SparkSense.Parsing.ProjectExpl orer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExpl orer.GetViewFolder() at SparkSense.Parsing.ViewExplore r.InitCurrentView() at SparkSense.Parsing.ViewExplore r..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionSource..ctor(ITextB uffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionListe
An assembly with the same simple name.. side-by-side
Happens about 1 in every 3 debugging attempts. Usually a clean,
rebuild, iisreset, rebuild sorts it but its bloody annoying and only
ever happens when using Spark.
I've had this in both .Net 4.0 and .Net 3.5 on two dev machines and
occasionally on server (when not stoppping app pools before copying).
Commented Issue: SparkSense throws an exception whenever it runs [6846]
279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgume ntException(ExceptionResource resource) at System.Collections.Generic.Dic tionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.BuildViewMapFromProjectEn vironment() at SparkSense.Parsing.ProjectExpl orer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExpl orer.GetViewFolder() at SparkSense.Parsing.ViewExplore r.InitCurrentView() at SparkSense.Parsing.ViewExplore r..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionSource..ctor(ITextB uffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionListe
Commented Issue: SparkSense throws an exception whenever it runs [6846]
279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgume ntException(ExceptionResource resource) at System.Collections.Generic.Dic tionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.BuildViewMapFromProjectEn vironment() at SparkSense.Parsing.ProjectExpl orer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExpl orer.GetViewFolder() at SparkSense.Parsing.ViewExplore r.InitCurrentView() at SparkSense.Parsing.ViewExplore r..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionSource..ctor(ITextB uffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionListe
Re: Special node use had no understandable attributes
I've made this really simple now, and copied both the
Application.spark and the view into another project and they work
fine.
So it must be something gone weird with the project. One thing worth
mentioning perhaps, I have two MVC2 projects in the same solution, one
of them is working, the other isn't.
Special node use had no understandable attributes
I'm getting this error message: "Special node use had no
understandable attributes"
Which suggests to me that I'm using the use tag with some incorrect
attributes.
However, I've swapped the Application.spark for one from another
simple app that works, and edited the view so it only has one line of
