Thinking outside the box

SteelePrice.Net

My Links

Twitter Updates


Get Microsoft Silverlight
follow me

Article Categories

Archives

Post Categories

Image Galleries

Dot Net

General

Linux

OneNote

Windows

TechED Bloggers
Visual Basic Bloggers (OPML)

Minor Silverlight 1.1 Issues (and how to fix them)

I upgraded a VB Silverlight Project made in VS08 Beta2 and had the following 3 errors.

  1. .NET Framework 2.0 update not found. The win32manifest will not be embedded.
  2. Child nodes not allowed.
  3. Lambdas that had no Return Value on all paths would compile without error in Beta2, they MUST return a value in RTM. IOW you can't use Subs in the Lambda (this should be known, they were never supported in this release) If you try to return without an explicit value, you may/will have problems.

While these may not be limited just to Silverlight Apps, they should be watched for when you are upconverting Projects from Beta2.

#1 If you have an App.Manifest,

    Delete it.
    This is what caused my problem and it was not a required file.  If you need one, then it should be created with the RTM version.

    This was a particularly frustrating error since it appeared that the Framework was not installed correctly, which in fact it was...

#2 Open Web.config

Change:

    <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>
        <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
                  type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <providerOption name="CompilerVersion" value="v3.5"/>
          <providerOption name="OptionInfer" value="true"/>
          <providerOption name="WarnAsError" value="false"/>
        </compiler>
      </compilers>
    </system.codedom>

 

To This:

    <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">
        </compiler>
        <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
                  type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        </compiler>
      </compilers>
    </system.codedom>

The providerOptions weren't required for me, YMMV.

 

After fixing these three problems my apps loaded, compiled and ran properly.  Now, off to create more coolness.

posted on Wednesday, November 28, 2007 2:26 PM

Feedback

# Interesting Finds: November 29, 2007 11/29/2007 7:01 AM Jason Haley      

Post a new comment about this topic
Title  
Name  
Url

Comments   
Enter the code you see:
   

Blogroll Me!

Blog Search Engine

Copyright © 2003-2004 H. Steele Price, IV -
All opinions are my own, not necessarily those of my employer, your mother, or any government agency.