Thanks, kastermester!
URL: http://sparkviewengine.codeplex.com/WorkItem/View.aspx?WorkItemId=4936
Spark crashed MVC 2 RC :(
URL: http://sparkviewengine.codeplex.com/WorkItem/View.aspx?WorkItemId=4936
using System.Web.Mvc;
using System.IO;
namespace Spark.Web.Mvc.Wrappers
{
internal class ViewContextWrapper : ViewContext
{
private readonly SparkViewBase sparkView;
internal ViewContextWrapper(ControllerContext
controllerContext, IView view, SparkViewBase sparkView,
ViewDataDictionary viewData, TempDataDictionary tempData)
: base(controllerContext, view, viewData, tempData, new
StringWriter())
{
this.sparkView = sparkView;
}
public override TextWriter Writer
{
get
{
return sparkView.Output ?? base.Writer;
}
}
}
}
in the Spark.Web.Mvc2 project, and then on line 142 in the Render
method in SparkView.cs add this:
...
var wrappedViewContext = new ViewContextWrapper(
new ControllerContext(wrappedHttpContext,
viewContext.RouteData, viewContext.Controller),
viewContext.View,
this,
viewContext.ViewData,
viewContext.TempData);
...
If you use .Net4 you should probably do the following.
Add this to AssemblyInfo.cs in Spark.Web.Mvc2:
[assembly: SecurityRules(SecurityRuleSet.Level1)]
If you are targeting .Net4, then you can go into the compiler and
change its target to v4.0:
...
var providerOptions = new Dictionary<string, string> {
{ "CompilerVersion", "v4.0" } };
...
in BatchCompiler.cs in the Spark project.
And then change the System.Web.Routing, System.Web.Abstractions and
System.Web references to the corresponding .Net4 versions.
I hope this helps,
ahjohannessen
> --
> You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
> To post to this group, send email to spar...@googlegroups.com.
> To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.
>
>
>
>
your solution is working for me but I had to fix some tests too.
Let's hope there will be a new release soon which supports MVC 2 RC.
The latest commit is from November 7, that's a long time ago.
Bas
No problem, glad to help :)
> The latest commit is from November 7, that's a long time ago.
It sure is, wonder why. I guess Louis has a lot on his mind with his
new job at MS and such. Louis, we need some Spark love, you hear me! ;)
:\
Sent from my mobile phone
On Jan 20, 2010, at 7:17 PM, "Louis DeJardin"
<louis.d...@gmail.com> wrote:
I’d love to see that happen too at some point. Is anyone here willing to help out? J
Having this happen for ASP.NET MVC 2 is probably not going to happen “in the box”. However, I’ve been working with Louis to take baby steps towards that and provide an experience that is better than we have now.
We could use some help.
I mentioned on Twitter that we’re going to make a change to the Add View scaffolding so that you can control the file extension of the generated view. I had Spark (and other view engines) in mind with that.
If you’ve been playing around with ASP.NET MVC 2 RC, maybe you can help me convert our existing T4 templates to produce Spark output. What I’m working towards is having a Spark installer available in our Web Platform Installer that would make it trivially easy to add Spark to ASP.NET MVC after the fact. It’s not “in the box” but it’s pretty darn close.
Phil
On Jan 21, 9:09 am, Phil Haack <phi...@microsoft.com> wrote:
> I'd love to see that happen too at some point. Is anyone here willing to help out? :)
>
> Having this happen for ASP.NET MVC 2 is probably not going to happen "in the box". However, I've been working with Louis to take baby steps towards that and provide an experience that is better than we have now.
>
> We could use some help.
>
> I mentioned on Twitter that we're going to make a change to the Add View scaffolding so that you can control the file extension of the generated view. I had Spark (and other view engines) in mind with that.
>
> If you've been playing around with ASP.NET MVC 2 RC, maybe you can help me convert our existing T4 templates to produce Spark output. What I'm working towards is having a Spark installer available in our Web Platform Installer that would make it trivially easy to add Spark to ASP.NET MVC after the fact. It's not "in the box" but it's pretty darn close.
>
> Phil
>
> From: spar...@googlegroups.com [mailto:spar...@googlegroups.com] On Behalf Of Chris Missal
> Sent: Thursday, January 21, 2010 6:53 AM
> To: spar...@googlegroups.com
> Subject: Re: Commented Issue: MVC2RC breaks latest version [4936]
>
> +100 to Josh's statement :)
>
> On Thu, Jan 21, 2010 at 8:22 AM, Josh Close <nar...@gmail.com<mailto:nar...@gmail.com>> wrote:
>
> Yeah, and add full Visual Studio integration with full intellisense support while you're at it! Slacker! :P
>
> Seriously though Phil, spark should be a part of the MVC release and be supported like jQuery is. :)On Wed, Jan 20, 2010 at 9:28 PM, Phil Haack <phi...@microsoft.com<mailto:phi...@microsoft.com>> wrote:
>
> Get on the ball Louis!
>
> Sent from my mobile phone
>
> On Jan 20, 2010, at 7:17 PM, "Louis DeJardin"
>
>
>
> <louis.dejar...@gmail.com<mailto:louis.dejar...@gmail.com>> wrote:
> > Yeah! What the heck's up with the delay?
>
> > :\
>
> > On Jan 20, 2:53 am, AHJohannessen <ahjohannes...@gmail.com<mailto:ahjohannes...@gmail.com>> wrote:
> >> On Jan 19, 9:51 am, "b...@bertus.com<mailto:b...@bertus.com>" <b...@bertus.com<mailto:b...@bertus.com>> wrote:
>
> >>> Thanks Alex,
>
> >> No problem, glad to help :)
>
> >>> The latest commit is from November 7, that's a long time ago.
>
> >> It sure is, wonder why. I guess Louis has a lot on his mind with his
> >> new job at MS and such. Louis, we need some Spark love, you hear
> >> me! ;)
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Spark View Engine Dev" group.
> > To post to this group, send email to spar...@googlegroups.com<mailto:spar...@googlegroups.com>.
> > To unsubscribe from this group, send email to spark-dev+...@googlegroups.com<mailto:spark-dev%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group athttp://groups.google.com/group/spark-dev?hl=en
> > .
>
> --
>
> You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
> To post to this group, send email to spar...@googlegroups.com<mailto:spar...@googlegroups.com>.
> To unsubscribe from this group, send email to spark-dev+...@googlegroups.com<mailto:spark-dev%2Bunsu...@googlegroups.com>.
> For more options, visit this group athttp://groups.google.com/group/spark-dev?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
> To post to this group, send email to spar...@googlegroups.com<mailto:spar...@googlegroups.com>.
> To unsubscribe from this group, send email to spark-dev+...@googlegroups.com<mailto:spark-dev%2Bunsu...@googlegroups.com>.
> For more options, visit this group athttp://groups.google.com/group/spark-dev?hl=en.
>
> --
> Chris Missalhttp://chrismissal.lostechies.com/
To post to this group, send email to spar...@googlegroups.com.
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
Louis has already done a lot of work on Intellisense. However, the real challenge is dual intellinese. What I mean is if you want Spark code instellisense, you lose HTML intellisense. If you want HTML intellisense, you lose Spark intellisense.
Getting both at the same time is a huge challenge. I have no idea either. I’ve tried talking to people on the Visual Studio team but they’ve been understandably very busy lately.
Phil
On Jan 21, 2:16 pm, Adam Schroder <adamschro...@gmail.com> wrote:
> Yeah. You need to be able to extend the current HTML intellisense adding in
> sparkness, not replace it.
>
>
>
> On Fri, Jan 22, 2010 at 9:03 AM, Phil Haack <phi...@microsoft.com> wrote:
> > Louis has already done a lot of work on Intellisense. However, the real
> > challenge is dual intellinese. What I mean is if you want Spark code
> > instellisense, you lose HTML intellisense. If you want HTML intellisense,
> > you lose Spark intellisense.
>
> > Getting both at the same time is a huge challenge. I have no idea either.
> > I’ve tried talking to people on the Visual Studio team but they’ve been
> > understandably very busy lately.
>
> > Phil
>
> > *From:* spar...@googlegroups.com [mailto:spar...@googlegroups.com] *On
> > Behalf Of *Adam Schroder
> > *Sent:* Thursday, January 21, 2010 12:50 PM
>
> > *To:* spar...@googlegroups.com
> > *Subject:* Re: Commented Issue: MVC2RC breaks latest version [4936]
>
> > The intellisense for VS2010 is the big one i think. Having full support
> > would be awesome. Unfortunately I have no idea where to start otherwise
> > would be glad to help.
>
> > spark-dev+...@googlegroups.com<spark-dev%2Bunsubscribe@googlegroups.com>
> > <mailto:spark-dev%2Bunsu...@googlegroups.com<spark-dev%252Bunsubscribe@googlegroups.com>
>
> > > > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/spark-dev?hl=en
>
> > > > .
>
> > > --
>
> > > You received this message because you are subscribed to the Google Groups
> > "Spark View Engine Dev" group.
>
> > > To post to this group, send email to spar...@googlegroups.com<mailto:
> > spar...@googlegroups.com>.
> > > To unsubscribe from this group, send email to
> > spark-dev+...@googlegroups.com<spark-dev%2Bunsubscribe@googlegroups.com>
> > <mailto:spark-dev%2Bunsu...@googlegroups.com<spark-dev%252Bunsubscribe@googlegroups.com>
> > >.
> > > For more options, visit this group athttp://
> > groups.google.com/group/spark-dev?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Spark View Engine Dev" group.
>
> > > To post to this group, send email to spar...@googlegroups.com<mailto:
> > spar...@googlegroups.com>.
> > > To unsubscribe from this group, send email to
> > spark-dev+...@googlegroups.com<spark-dev%2Bunsubscribe@googlegroups.com>
> > <mailto:spark-dev%2Bunsu...@googlegroups.com<spark-dev%252Bunsubscribe@googlegroups.com>
> > >.
> > > For more options, visit this group athttp://
> > groups.google.com/group/spark-dev?hl=en.
>
> > > --
> > > Chris Missalhttp://chrismissal.lostechies.com/
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Spark View Engine Dev" group.
> > To post to this group, send email to spar...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > spark-dev+...@googlegroups.com<spark-dev%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/spark-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Spark View Engine Dev" group.
> > To post to this group, send email to spar...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > spark-dev+...@googlegroups.com<spark-dev%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/spark-dev?hl=en.- Hide quoted text -
>
> - Show quoted text -
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
It’s not the forgetting of HTML I worry about, it’s the auto-complete snippet like support you get in VS. It makes it *very* fast to build up views. I hate typing things fully now. ;)
On Jan 26, 6:24 pm, Alexander Popov <mogada...@gmail.com> wrote:
> For me main project with Spark VSIntegration is that it writen on Cpp.
> For me it is stopping thing to contribute in it.
>
> I belive that it can be on C# mostly.
> for example nemerle VS Integration.http://nemerle.org/svn/nemerle/trunk/VsIntegration/Nemerle.VisualStudio/
>
>
>
> On Fri, Jan 22, 2010 at 3:07 AM, Phil Haack <phi...@microsoft.com> wrote:
> > It’s not the forgetting of HTML I worry about, it’s the auto-complete
> > snippet like support you get in VS. It makes it **very** fast to build up
> > views. I hate typing things fully now. ;)
>
> > *From:* spar...@googlegroups.com [mailto:spar...@googlegroups.com] *On
> > Behalf Of *Louis DeJardin
> > *Sent:* Thursday, January 21, 2010 3:54 PM
>
> > *To:* spar...@googlegroups.com
> > *Subject:* Re: Commented Issue: MVC2RC breaks latest version [4936]
>
> > Yeah, the Spark VS langauge service as it stands only targets the VS2k8
> > sdk, registry, etc.
>
> > I fall into the same category... I need more help with extension methods
> > signatures and properties on the model than html element/attribute
> > assistance.
>
> > That said css/js/jquery support is something you miss... I find myself
> > making scratch file to work on other bits to paste into a .spark file.
>
> > On Thu, Jan 21, 2010 at 3:36 PM, Phil Haack <phi...@microsoft.com> wrote:
>
> > You mean this?http://sparkviewengine.com/usage/intellisense
> > <spark-dev%252Bunsubscribe@googlegroups.com>
> > > > >.
> > > > > For more options, visit this group athttp://
> > > > groups.google.com/group/spark-dev?hl=en.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Spark View Engine Dev" group.
>
> > > > > To post to this group, send email to spar...@googlegroups.com
> > <mailto:
> > > > spar...@googlegroups.com>.
> > > > > To unsubscribe from this group, send email to
> > > > spark-dev+...@googlegroups.com<spark-dev%2Bunsubscribe@googlegroups .com>
> > <spark-dev%2Bunsubscribe@googlegroups.com>
> > > > <mailto:spark-dev%2Bunsu...@googlegroups.com<spark-dev%252Bunsubscribe@ googlegroups.com>
> > > >http://groups.google.com/group/spark-dev?hl=en.-Hide quoted text -
>
> > > - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Spark View Engine Dev" group.
> > To post to this group, send email to spar...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > spark-dev+...@googlegroups.com<spark-dev%2Bunsubscribe@googlegroups .com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/spark-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Spark View Engine Dev" group.
> > To post to this group, send email to spar...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > spark-dev+...@googlegroups.com<spark-dev%2Bunsubscribe@googlegroups .com>
> > .
>
> ...
>
> read more »
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.