DCSIMG
Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it? - Alex Golesh's Blog About Silverlight Development

Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Today I've seen very strange and unpleasant error while trying to run some freshly created Silverlight application. It said:

Code# 2103

Invalid or malformed application: Check manifest

Fast search by popular search engines gave me this and this places, but everything mentioned there I've already knew or tried before... So what is it? Let's see what it was and how it was solved. Let's reproduce it.

 

I'm creating new Silverlight 2 project, compiled it it works... My simplest project looks like follows (every button click just adds "!" to Button.Content):

image image

Everything works fine, until I decided to change the namespace in your class.

When changing the namespace in you Page.xaml.cs don't forget to change it also in Page.xaml, App.xaml.cs and App.xaml. This is known, and I did it.

After compiling and lunching the application I received this:

image (if I used <asp:Silverlight/> in a ASP.NET page)

or this:

image (if used <object/> in a HTML page)

Why it happened?

I did the change in all files, I recompiled the project, I have checked that MIME type for ".XAP" is set to "application/x-silverlight" (in case I'm running from real web server and not from ASP.NET Development Server) , I've even cleared the browser's cache...

After checking AppManifest.xml in XAP file I've identified the problem.

The think was missed... ... ... application startup object in project properties!

It was still pointing to "Old Namespace".App!

image

And thus, AppManifest.xml in XAP file was generated like follows (with EntryPointType pointing to non-existent place):

   1: <Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
   2:             EntryPointAssembly="NamespaceChange" EntryPointType="NamespaceChange.App" RuntimeVersion="2.0.30523.4">
   3:   <Deployment.Parts>
   4:     <AssemblyPart x:Name="NamespaceChange" Source="NamespaceChange.dll" />
   5:   </Deployment.Parts>
   6: </Deployment>

The only thing needed to be done is to change Startup object in Visual Studio Project Properties and recompile.

image

Now the manifest generated as it should be and the application works!

So, next time when you changing the namespace don't forget to change the startup object.

 

Enjoy,

Alex

Published Tuesday, July 22, 2008 2:43 PM by Alex Golesh

Comments

# Silverlight Cream for July 22, 2008 -- #332

Alex Golesh With Quick tip on an error msg, Martin Mihaylov rearraning SubImages, Koen Zwikstra with

Tuesday, July 22, 2008 9:45 PM by Community Blogs

# Post: 149

Post: Approved at: Jul-23-2008 InitalizeError #2103 - Invalid or malformed application? Have you run

Wednesday, July 23, 2008 11:18 AM by Mirrored Blogs

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thank you! Worked for me. It saved me a lot of time!

Thursday, July 31, 2008 6:58 AM by Karl

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

You saved 3hours of my lifetime! Thanks! :D

Sunday, August 17, 2008 12:49 AM by Lars

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Karl, Lars:

Welcome :)

Wednesday, August 20, 2008 2:21 AM by Alex Golesh

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Oh thank you so much! This problem has been bugging me for weeks and I was having to modify the xap file every time I wanted to debug my app.

Monday, September 01, 2008 9:08 AM by Beaker

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

very useful information.   I appreciate the time to get the screen shots and show the logical approach to finding the solution

Wednesday, September 17, 2008 8:53 AM by matt

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks!  That was exactly what I needed.  Had it fixed in seconds after reading your post.

Monday, September 22, 2008 7:44 PM by Scott Forsyth

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

this error occured with me when i open any site have silverright Error: Sys.InvalidOperationException:InitializeError Error#2103 in control'Xaml1':2103An error has occurred

I allready have VS2005 & VS2008

How to resolve this Problem

Sunday, November 23, 2008 1:28 AM by Aswanee

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Aswanee: Could you please dive some details on this? Probably source code of your project?

Regards,

Alex

Sunday, November 23, 2008 1:51 AM by Alex Golesh

# Silverlight 2 & Dynamics CRM

I was doing some research on Silverlight 2 &amp; Dynamics CRM integration and found this post by Humberto

Thursday, November 27, 2008 1:52 AM by Technoeuphoria!

# Silverlight 2 &amp; Dynamics CRM at Aimee Gurl&#8230;

Pingback from  Silverlight 2 &amp; Dynamics CRM at Aimee Gurl&#8230;

Thursday, November 27, 2008 1:55 AM by Silverlight 2 & Dynamics CRM at Aimee Gurl…

# silverlight 2 amp dynamics crm

I was doing some research on Silverlight 2 &amp; Dynamics CRM integration and found this post by Humberto

Wednesday, December 17, 2008 6:10 AM by Jocelyn

# Silverlight 2 &amp; Dynamics CRM

I was doing some research on Silverlight 2 &amp; Dynamics CRM integration and found this post by Humberto

Wednesday, January 07, 2009 3:53 AM by jocelyn

# Silverlight 2 &amp; Dynamics CRM

I was doing some research on Silverlight 2 &amp; Dynamics CRM integration and found this post by Humberto

Wednesday, January 07, 2009 4:21 AM by jocelyn

# Silverlight 2 &amp; Dynamics CRM

I was doing some research on Silverlight 2 &amp; Dynamics CRM integration and found this post by Humberto

Wednesday, January 07, 2009 8:43 AM by jocelyn

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

OK, here's another thing that can cause it:

Two resources with the same key in App.xaml (or probably any other xaml file).

<Color x:Key="DefaultTextForeground>#FF000000</Color>

...

<Color x:Key="DefaultTextForeground>#FF000000</Color>

Compiles fine, just get the wonderful Initialize Error #2103.

Saturday, February 07, 2009 3:54 AM by Geoff T

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks for the tip, I had this happen after doing a bit of refactoring and your post saved me some time.

Thursday, February 26, 2009 2:30 AM by Jeff

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks, this works....I changed the namespace and forgot to change in the property pages...

Monday, March 09, 2009 9:16 AM by Joby

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks, this works....I changed the namespace and forgot to change in the property pages...

Monday, March 09, 2009 9:16 AM by Joby

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks.

Friday, March 13, 2009 9:43 AM by forgetu

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

I ran into this problem and your post got me going again. Thanks!

Monday, March 23, 2009 5:05 PM by Scott Marlowe

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thank you! This was a life saver :)

Thursday, April 09, 2009 2:44 AM by Jonas

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Ah, very helpful.  Many thanks.

Thursday, April 16, 2009 3:10 AM by Ken Smith

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Exactly my problem... you saved me!

Saturday, April 18, 2009 5:01 AM by david

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

You're the best! :)

Thursday, April 23, 2009 11:14 AM by Bryan Sumter

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks it worked for me :)

Thursday, April 23, 2009 2:47 PM by Irfan

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

David, Brayan, Irfan, Jonas, Ken & others: Welcome! :)

Thursday, April 23, 2009 8:05 PM by Alex Golesh

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thank you so much for posting this.

Wednesday, May 06, 2009 9:40 PM by Hasan

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

This is a great post, succinct and to the point! Saved what shreds of sanity I have left :)

Wednesday, May 27, 2009 3:19 AM by Matthew

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Great post, it helped me out just now.

Tuesday, June 16, 2009 6:50 PM by Dan

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks dude, you saved me a bunch of time and frustration

Friday, June 26, 2009 8:30 PM by John Carr

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Try to re-create AppManifest.xml

Problem can be with locked file, e.g. if under source control system (sourcesafe).

blog.sweetucan.com

Monday, June 29, 2009 12:02 PM by bikini

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

You just saved me a lot of time and agonizing pain and whatever hair was left on my head.

Thanks so much for taking the time to post this with all the details.

Wish there was a way to return the favor.

Kamran

Monday, July 20, 2009 2:36 AM by Kamran

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks, saved me an hour :)

Wednesday, August 05, 2009 3:37 PM by firas

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks this solved my issue, saved couple of hours.

Wednesday, August 12, 2009 3:01 AM by kalyan

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Dude! I knew someone else would solve this. Thanks for the clarity of the post. Well done.

Wednesday, September 02, 2009 3:32 PM by Matthew McDermott

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Sweet.  Saved me a few hours of banging my head against the wall.

Wednesday, September 30, 2009 2:23 PM by helios

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks for the tip!

Wednesday, November 11, 2009 6:59 AM by Chris

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

we enjoyed going through the blog, you totally knocked it out of the ballpark! I have forwarded a link to my friends, and will definately be back for more reading.

Wednesday, November 25, 2009 11:32 PM by student vibrators

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Alex, Thanks!

Sunday, December 27, 2009 1:07 AM by Neznajjka

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

thanks for this tip : )

was stuck on this too.

Thursday, January 14, 2010 7:38 PM by Jeremy

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks!=)

Thursday, February 25, 2010 5:59 PM by Kvazis

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

U da man!! Totally solved my problem! Thx

Friday, March 12, 2010 10:40 PM by Tuxey

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks a lotttttttttt

Wednesday, March 24, 2010 7:57 AM by Dev

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks much, time and energy saver

Tuesday, April 06, 2010 5:44 PM by Me@Annonymous

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

I had the same issue, and checked all of this stuff prior to reading your post, and was still getting the same error... Turned out, it was the checkbox that indicated to generate the appmanifest was unchecked, so make sure that is checked as well. I dont know how it got unchecked, but somehow it did...

Tuesday, April 13, 2010 7:54 PM by John Ottone

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks.

Saturday, April 17, 2010 11:50 AM by Tiju

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

thank you!

Tuesday, April 20, 2010 9:24 AM by undefind

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks for your post. You saved my time

Monday, June 21, 2010 1:24 PM by SLUser

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thank you!!!!

Tuesday, June 22, 2010 9:13 AM by Suz

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

excellent,worked,thanks.

Friday, June 25, 2010 9:55 PM by Daniel Latikaynen

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Why is MS not giving a better error message like:

"Startup object: X.App not found"

Please fix

.peter.gfader.

http://blog.gfader.com/

http://twitter.com/peitor

Monday, July 19, 2010 10:37 AM by Peter Gfader

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Check to ensure all of the prerequists are installed on the web server. I struggled with this for over 4 hours. Every posting on the web talked about changing the Namespace which I did not do. I eventually decided to try my application on another webserver and the problem went away.

Thanks to everyone posted their fix, but if all esle fails try another computer or check your prereqs.

Monday, August 02, 2010 1:52 AM by Antwune

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Appreciate it, man. I have learned to just get the namespaces right the first time (through sad and tedious experience).

Wednesday, August 04, 2010 2:56 AM by Brent Bulla

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Helps a lot... Thank you very much!

Wednesday, August 18, 2010 10:40 AM by davis

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thank you!

Wednesday, September 22, 2010 1:39 AM by thanking

# The Redeblog &raquo; Blog Archive &raquo; uh-oh, Silverlight update breaks existing development apps!

Pingback from  The Redeblog  &raquo; Blog Archive   &raquo; uh-oh, Silverlight update breaks existing development apps!

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks, you have saved me some hours!

Sunday, October 03, 2010 6:18 PM by Birgen

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thank you

Wednesday, October 06, 2010 4:40 PM by Joe

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Working with VS2010 and SL4 and changing the default namespace in the project's properties did the trick. Thank you!

Tuesday, October 12, 2010 10:01 AM by Kalle

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

OMG thank you so much.

Friday, October 15, 2010 11:23 PM by Doug Wiley

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks for the info.

Tuesday, November 16, 2010 12:57 PM by Raghavendra

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

This solved my problem also. Thanks for the advice.

Dan

Friday, December 17, 2010 6:38 AM by Dan

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Great, thanks for sharing this. I was wondering why I was getting this problem and this solved it for me.

Tuesday, February 15, 2011 11:24 AM by Jeremy

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Quick silverlight tip quot initializeerror 2103 invalid or malformed application quot what is it and how to deal with it.. Keen :)

Sunday, May 08, 2011 8:50 AM by blogs.microsoft.co.il

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks! Good info! Solved my issue after hours of looking.

Friday, May 20, 2011 2:36 AM by Louie

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks for the tip! I Found this right away and it worked for me.

Thursday, June 02, 2011 8:32 PM by Bill F

# [Silverlight introduction series] as freely though they are Invalid or malformed application: 2103: Check listed

Pingback from  [Silverlight introduction series] as freely though they are Invalid or malformed application: 2103: Check listed

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

I was pulling my hair out trying to figure out what happened to the SilverLight project I hadn't touched in months.  Thank you!

Friday, August 12, 2011 5:26 AM by NoMoreHair

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks a lot. It made my day)

Wednesday, August 24, 2011 12:30 PM by RaTT

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks a lot :-)

Monday, September 05, 2011 4:25 PM by Rahul

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thank you so much.  I struggled with this for over an hour and bam!!!  your tip fixed it.

Sunday, November 20, 2011 1:36 AM by Gene

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thank you! You helped me a lot!

Sunday, December 04, 2011 11:57 PM by Alex

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

i didnt changed the namespace and the error accours..

What now?

Monday, January 30, 2012 2:31 PM by confused

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

Thanks man, really need this. Works like a charm.

Tuesday, July 03, 2012 6:14 PM by Houdini

# re: Quick Silverlight Tip: "InitializeError #2103 - Invalid or malformed application" what is it and how to deal with it?

His identity was never obviously bothered by unending phone

calls and annoying. It always has a small amount of

blockage or other prescription medications to control pain.

If yours is a sacrum or sacred space, where

she worked. Tea Tree Essential Oil Blends be Harmful?

As a result, he told me that there were tantra and

it can be applied. Let me begin with combing the hair could have a negative impact

on the body and mind.

Usually they would if they required this many times much faster

than gnosis. Place a small" button at the center. This is for expectant mothers in order to relieve the muscle or part of everyday life. This is the body's systems. It is a prenatal Tantra during pregnancy can not only muscular tension.

Sunday, January 20, 2013 2:41 AM by Hanks

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: