precompiled views error

77 views
Skip to first unread message

Josh Coffman

unread,
Nov 4, 2009, 12:09:28 AM11/4/09
to spark-dev
Hi,

  I followed the example for precompiled views, but I get an installer error during compilation for both my attempt and the source code example.  Anyone see this before:

Error    30    The command "%systemroot%\Microsoft.NET\Framework\v2.0.50727\installutil "C:\dev\csinc\dotnet\TimeToaster\ToasterWeb\bin\ToasterWeb.dll"" exited with code -1

Here is the install log from this:


Installing assembly 'C:\dev\csinc\dotnet\TimeToaster\ToasterWeb\bin\ToasterWeb.dll'.
Affected parameters are:
   logtoconsole =
   assemblypath = C:\dev\csinc\dotnet\TimeToaster\ToasterWeb\bin\ToasterWeb.dll
   logfile = C:\dev\csinc\dotnet\TimeToaster\ToasterWeb\bin\ToasterWeb.InstallLog
Rolling back assembly 'C:\dev\csinc\dotnet\TimeToaster\ToasterWeb\bin\ToasterWeb.dll'.
Affected parameters are:
   logtoconsole =
   assemblypath = C:\dev\csinc\dotnet\TimeToaster\ToasterWeb\bin\ToasterWeb.dll
   logfile = C:\dev\csinc\dotnet\TimeToaster\ToasterWeb\bin\ToasterWeb.InstallLog
An exception occurred during the Rollback phase of the ToasterWeb.PreCompile installer.
System.ArgumentException: The savedState dictionary does not contain the expected values and might have been corrupted.
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.

The code for my installer is copied from the MediumTrustTrusting sample in the code.

Thanks,
-j

Morten Maxild

unread,
Nov 4, 2009, 7:11:02 AM11/4/09
to spar...@googlegroups.com

In my experience this sometimes happen when the templates does not compile

 

Does it work if you compile just-in-time?

 


Josh Coffman

unread,
Nov 4, 2009, 10:44:54 AM11/4/09
to spar...@googlegroups.com
Actually, now its not running wo precompile either.  It was before I started making these changes.  kinda frustrating.  I'll have to make it work again and try again.  It makes me wonder though since I have the same installutil problem with the source code sample.

-j

Matthieu GD

unread,
Nov 4, 2009, 7:51:51 PM11/4/09
to Spark View Engine Dev
In the InstallUtil.Log I got this exception :

An exception occurred during the Install phase.
System.IO.FileNotFoundException: The system cannot find the file
specified. (Exception from HRESULT: 0x80070002)


On Nov 4, 10:44 am, Josh Coffman <joshcoff...@gmail.com> wrote:
> Actually, now its not running wo precompile either.  It was before I started
> making these changes.  kinda frustrating.  I'll have to make it work again
> and try again.  It makes me wonder though since I have the same installutil
> problem with the source code sample.
>
> -j
>
>
>
> On Wed, Nov 4, 2009 at 5:11 AM, Morten Maxild <mmax...@gmail.com> wrote:
> >  In my experience this sometimes happen when the templates does not
> > compile
>
> > Does it work if you compile just-in-time?
>
> >   ------------------------------
>
> > *From:* spar...@googlegroups.com [mailto:spar...@googlegroups.com] *On
> > Behalf Of *Josh Coffman
> > *Sent:* Wednesday, November 04, 2009 6:09 AM
> > *To:* spark-dev
> > *Subject:* precompiled views error

Matthieu GD

unread,
Nov 4, 2009, 7:56:42 PM11/4/09
to Spark View Engine Dev
I misspelled an assembly name .. but now I got the problem where
lamdba expression are not recognized and report as an error :
c:\dev\projets\Folder\View.spark(144,47): error CS1525: Invalid
expression term '>'

Morten Maxild

unread,
Nov 5, 2009, 10:46:12 AM11/5/09
to spar...@googlegroups.com
Hi,

I have had that same error, see http://groups.google.com/group/spark-dev/browse_thread/thread/2a719afb4bed094d#

It was driving me crazy, but I had very little time at that time, and I hat to revert to an older tagged commit.

It's on my todo list to find the commit that creates this error.

Any help would be appreciated:-)

/Morten

>-----Original Message-----
>From: spar...@googlegroups.com [mailto:spar...@googlegroups.com] On
>> > > *From:* spar...@googlegroups.com [mailto:spark-
>d...@googlegroups.com] *On

maxild

unread,
Nov 5, 2009, 11:21:09 AM11/5/09
to Spark View Engine Dev
I will try to run git-bisect tonight, and find the commit. Hope to
come back with at least the commit causing the compile error tommorow

Don't even now how many commits it takes to reach the good (tagged)
commit from the (bad) commit?????

/Morten

On Nov 5, 4:46 pm, "Morten Maxild" <mmax...@gmail.com> wrote:
> Hi,
>
> I have had that same error, seehttp://groups.google.com/group/spark-dev/browse_thread/thread/2a719af...

Matthieu GD

unread,
Nov 5, 2009, 12:47:04 PM11/5/09
to Spark View Engine Dev
Thanks I revert back to the same version and my precompilation works.

I can try to revert back from the last version one tag at the time ?

Matthieu

Donn Felker

unread,
Nov 5, 2009, 12:55:36 PM11/5/09
to spar...@googlegroups.com
I haven't looked, but are there unit tests around this? A new check in should break the build if we have a test. 



Morten Maxild

unread,
Nov 5, 2009, 2:50:55 PM11/5/09
to spar...@googlegroups.com

@Matthieu

 

Don’t…git-bisect is the way to do it

 

@Don

 

Apparently not.

 

First I will try locate the problem. Right now I have no clue where to look, but when I have found the commit, I will get back to you

 

/Morten

 


Morten Maxild

unread,
Nov 5, 2009, 2:54:13 PM11/5/09
to spar...@googlegroups.com

BTW…a failing test off course would be super nice, but right now my main goal is just to locate the commit (as a first step)

 

/Morten

 


From: spar...@googlegroups.com [mailto:spar...@googlegroups.com] On Behalf Of Donn Felker


Sent: Thursday, November 05, 2009 6:56 PM
To: spar...@googlegroups.com

Morten Maxild

unread,
Nov 5, 2009, 3:36:05 PM11/5/09
to spar...@googlegroups.com

If anybody would like to investigate, this is the guilty commit:

 

commit a62a6aacde3c9238deebaabeb5730d3ce0af89d2

Author: Louis DeJardin <louis.d...@gmail.com>

Date:   Fri Jun 26 18:15:14 2009 -0500

 

    Early stages of Visual Basic compilation target

 

    Literal, expression, and local variable implemented.

    Now using system.codedom configuration for compiler options. Needed

    to coerce Option Infer On in code, as the setting in the config

    does not appear to have automatic effect.

 

I haven’t looked into the commit yet, but off course I will

 

/Morten

 

 

 


From: spar...@googlegroups.com [mailto:spar...@googlegroups.com] On Behalf Of Donn Felker


Sent: Thursday, November 05, 2009 6:56 PM
To: spar...@googlegroups.com

Morten Maxild

unread,
Nov 5, 2009, 7:08:54 PM11/5/09
to spar...@googlegroups.com

Hi,

 

Okay I have found the problem….a short term solution is to remove precompilation in your build script until the PrecompileInstaller is fixed, or another fix is published.

 

The behaviour can be replicated by removing the system.codedom config section from Spark.Web.Mvc.Tests

 

<system.codedom>

                      <compilers>

                                 <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

                                            <providerOption name="CompilerVersion" value="v3.5"/>

                                            <providerOption name="WarnAsError" value="false"/>

                                 </compiler>

                      </compilers>

           </system.codedom>

 

 

Background:

=========

 

The BatchCompiler now uses CodeDomProvider configured provider options (see config section above). Before the ‘guilty’ commit the providerOptions were defined inline in a dictionary.  

 

Because the install util (from System.Configuration.dll) runs in a separate process/appdomain it does pick up a ‘v2.0’ CompilerVersion, and bang….

 

Need to look into the install utility tomorrow, and its config, because it is getting late.

 

Regards

Morten

 


From: spar...@googlegroups.com [mailto:spar...@googlegroups.com] On Behalf Of Donn Felker


Sent: Thursday, November 05, 2009 6:56 PM
To: spar...@googlegroups.com

maxild

unread,
Nov 6, 2009, 9:19:48 AM11/6/09
to Spark View Engine Dev
The issue is fixed here http://github.com/maxild/spark/commit/489825dc0dbee0828cd58f739233fcf98eac91aa

On Nov 6, 1:08 am, "Morten Maxild" <mmax...@gmail.com> wrote:
> Hi,
>
> Okay I have found the problem….a short term solution is to remove precompilation in your build script until the PrecompileInstaller is fixed, or another fix is published.
>
> The behaviour can be replicated by removing the system.codedom config section from Spark.Web.Mvc.Tests
>
> <system.codedom>
>
>                       <compilers>
>
>                                  <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
>
>                                             <providerOption name="CompilerVersion" value="v3.5"/>
>
>                                             <providerOption name="WarnAsError" value="false"/>
>
>                                  </compiler>
>
>                       </compilers>
>
>            </system.codedom>
>
> Background:
>
> =========
>
> The BatchCompiler now uses CodeDomProvider configured provider options (see config section above). Before the ‘guilty’ commit the providerOptions were defined inline in a dictionary.  
>
> Because the install util (from System.Configuration.dll) runs in a separate process/appdomain it does pick up a ‘v2.0’ CompilerVersion, and bang….
>
> Need to look into the install utility tomorrow, and its config, because it is getting late.
>
> Regards
>
> Morten
>
>   _____  
>

Matthieu GD

unread,
Nov 7, 2009, 10:00:17 AM11/7/09
to Spark View Engine Dev
Thanks Maxild ! If I understand your fix, the compiler is configured
by the codedom section if it's present or inline if not ?

I'm not familiar with git, how can I get your fix or know when it will
be merged in the spark source code ?

Matthieu

On Nov 6, 9:19 am, maxild <mmax...@gmail.com> wrote:
> The issue is fixed herehttp://github.com/maxild/spark/commit/489825dc0dbee0828cd58f739233fcf...

Morten Maxild

unread,
Nov 7, 2009, 11:01:44 AM11/7/09
to spar...@googlegroups.com
Its in the mainline (but still in git), because Lou pulled my changes. If you are not willing to use git you will have a hard time getting the fix.

I am not saying Git is easy, but just getting the source code from github is. You should not have a hard time finding a tutorial using a Google search (I know the mvccontrib guys have a complete guide somewhere public)

Remember to set code.autocrlf to false (mvccontrib uses true, here), because Lou did that initially.

/Morten


>-----Original Message-----
>From: spar...@googlegroups.com [mailto:spar...@googlegroups.com] On
>Behalf Of Matthieu GD
>Sent: Saturday, November 07, 2009 4:00 PM
>To: Spark View Engine Dev
>Subject: Re: precompiled views error
>
>

Morten Maxild

unread,
Nov 7, 2009, 11:07:07 AM11/7/09
to spar...@googlegroups.com
>
>Thanks Maxild ! If I understand your fix, the compiler is configured
>by the codedom section if it's present or inline if not ?

Yes, inline in the BatchCompiler to restore the old behaviour, because always using system.codedom (when its not configured) is a breaking change.

Louis DeJardin

unread,
Nov 7, 2009, 1:43:15 PM11/7/09
to spar...@googlegroups.com
You can also pull the latest dev build from the server if you prefer. The link's under the downloads menu on the spark site, though you have to click login as guest on the screen that comes up.

Matthieu GD

unread,
Nov 7, 2009, 5:38:01 PM11/7/09
to Spark View Engine Dev
Got it from the TeamCity server and the precompilation is working.
Thanks again.

Matthieu
Reply all
Reply to author
Forward
0 new messages