Spark and VS2010 / .Net 4.0 Beta 2

122 views
Skip to first unread message

Tim

unread,
Oct 23, 2009, 8:23:11 AM10/23/09
to Spark View Engine Dev
I'm trying to upgrade my project, which uses Spark as the MVC view
engine, to the recently released .Net 4.0 Beta 2. However, when a view
is rendered I get the following error:

"Dynamic view compilation failed.
(0,0): error CS1703: An assembly with the same identity 'mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has
already been imported. Try removing one of the duplicate references."

I found an old post in this discussion group about VS2010 Beta 1,
which indicated that the same problem occurred in Beta 1.

Should I just be patient and wait for a version of Spark to be built
against .Net 4.0 Beta 2, if this is in the pipeline? Or should I have
a go at this myself? I'd be happy to try it out.

Tim

Tim

unread,
Oct 23, 2009, 10:12:21 AM10/23/09
to Spark View Engine Dev
Never mind - I've got it working by doing the following:

- Changed the target framework to v4 for all the projects in the Spark
solution
- Changed the references to System.Web.Abstractions and
System.Web.Routing to the v4 versions
- Added the following line in Spark.Web.Mvc/Properties/
AssemblyInfo.cs:
[assembly: SecurityRules(SecurityRuleSet.Level1)]
(this is probably a hack, but it fixed a weird security exception I
was getting)

Hope this helps,
Tim

AHJohannessen

unread,
Oct 29, 2009, 8:47:39 PM10/29/09
to Spark View Engine Dev
I also would like to hear more about a Spark release for VS2010 Beta 2
- Are there coming any dlls anytime soon? :)

notthere

unread,
Nov 16, 2009, 3:03:41 AM11/16/09
to Spark View Engine Dev
Updated to .NET 4.0 also today, same problem with Spark.

Thanks for the fix Tim

Chris Schoon

unread,
Nov 29, 2009, 12:15:29 PM11/29/09
to Spark View Engine Dev
I had this problem and found a way to move past it. I first changed
the spark projects to target 4.0 and updated the system.web.* stuff to
4.0 as Tim mentioned previously in this thread. I then also had to
modify the provider options in line 33 of BatchCompiler.cs to say
"v4.0" instead of "v3.5".

Chris

Jason

unread,
Dec 13, 2009, 4:08:18 PM12/13/09
to Spark View Engine Dev
Thanks Tim and Chris!
> > > - Are there coming any dlls anytime soon? :)- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages