Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Library project file cannot specify ApplicationDefiniti... RSS

13 replies

Last post Sep 16, 2011 04:22 PM by axm358

(0)
  • PregnantBySilverlight

    PregnantBySi...

    Member

    91 Points

    112 Posts

    Library project file cannot specify ApplicationDefinition element.

    Sep 26, 2008 09:44 PM | LINK

     Very strange problem....

    I added <asp:Image> tag to my default.aspx page and I got the following errors....now that I deleted the tag....I still get the same error :(

    any iadeas????

    these are errors:

    Library project file cannot specify ApplicationDefinition element.

    The project file contains a property value that is not valid.

     

    here is my Default.aspx page

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="System7Web._Default" %>

    <%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"

    TagPrefix="asp" %>

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head runat="server">

    <title></title>

    </head>

    <body>

    <form id="form1" runat="server">

    <asp:Table>

    <asp:TableHeaderRow>

    <asp:TableHeaderCell>

    header

    </asp:TableHeaderCell>

    </asp:TableHeaderRow>

    <asp:TableRow>

    <asp:TableCell>

    <div>

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

    <asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/System7.xap" MinimumVersion="2.0.30523" Width="100%" Height="100%" />

    </div>

    </asp:TableCell>

    </asp:TableRow>

    <asp:TableFooterRow>

    <asp:TableCell>

    footer

    </asp:TableCell>

    </asp:TableFooterRow>

    </asp:Table>

     

     

    </form>

    </body>

    </html>

    I need just to replace header and footer with image...how can I do that? and how can I get rid of these two error messages????

     Thanks so much
    MT

  • sladapter

    sladapter

    All-Star

    43607 Points

    7907 Posts

    Re: Library project file cannot specify ApplicationDefinition element.

    Sep 26, 2008 10:08 PM | LINK

    How did you add the <asp:Image> tag? Like this? <asp:Image ImageUrl="YourImageURL" runat="server" />

    By the way, do you really need to add those tags as Server control? You can use html tag <image src="YourImageURL" />. Same as those <asp:Table/><asp:TableRow/><asp:TableCell/> tags. Why not just use <Table> <TR><TD>.

    Unless you need code behind to do something with those server controls. But I did not see any ID is assigned on those server controls,  that means you do not even intend to refer them in your code behind.

    The server control will render the same HTML tag to your page. If you do not want to do anything with those tag in your code, write out those HTML tag yourself is more efficient. You do not need server processing time at all.

     

     

     

     

     

     

    Sally Xu
    Software Engineer
    Aprimo, Inc

    Please remember to mark the replies as answers if they answered your question
  • PregnantBySilverlight

    PregnantBySi...

    Member

    91 Points

    112 Posts

    Re: Re: Library project file cannot specify ApplicationDefinition element.

    Sep 26, 2008 10:22 PM | LINK

    You are right, I don't need them right now and It's better to use just html code....but for some reason it didn't work that's why I tried <asp:table> control and it worked....

    but now I can't get it to work at all....although I deleted the code <asp:Image> tag....

    I tried <img> html tag before and that didn't work....

    I keep getting these two errors and they are not going away from my project....

    I even deleted my Default.aspx page and I placed a new one...but still same errors...complaining about Library!

    errors are:

    Library project file cannot specify ApplicationDefinition element.
    The project file contains a property value that is not valid.

     

  • sladapter

    sladapter

    All-Star

    43607 Points

    7907 Posts

    Re: Re: Library project file cannot specify ApplicationDefinition element.

    Sep 26, 2008 10:29 PM | LINK

    Is the Error come from your aspx page (server side error) or it's from your Silverlight control (client side error)?

    Make sure to isolate the problem. Take the silverlight control out first to test your aspx page, if no error, then it's caused by Silverlight control. Otherwise, it has nothing to do with Silverlight, something wrong with your aspx page.

     

     

     

     

    Sally Xu
    Software Engineer
    Aprimo, Inc

    Please remember to mark the replies as answers if they answered your question
  • PregnantBySilverlight

    PregnantBySi...

    Member

    91 Points

    112 Posts

    Re: Re: Re: Library project file cannot specify ApplicationDefinition element.

    Sep 26, 2008 11:10 PM | LINK

    This is not Silverlight error at all....I didn't make any changes to the project....

    The only change I made adding the tag and boom I got the error...I removed the tag and still the error is there....

    I use WCF in my program, so the Silverlight and ASPX pages are working together....I can't just build one of them...or...I don't know how to do that...they work together....

    but the error is on the server side, the aspx page....

    It is really frustrating...as I got this error yesterday too...

    It looks like by using <asp:Image> tag, some changes had happend into the Class Library....and I can't get rid of the change by just deleting the tag....

    do you know how I can access to the Class Library?

    thanks
    MT

  • sladapter

    sladapter

    All-Star

    43607 Points

    7907 Posts

    Re: Re: Re: Library project file cannot specify ApplicationDefinition element.

    Sep 27, 2008 02:40 AM | LINK

    What class library? The .Net class library? How can you affect the class library by using a <asp:Image> tag? Are you running your page on IIS or the Dev server? 

    If you think the aspnet get corrupted, use Start/Run to run the following command:

     %Windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

     

    Sally Xu
    Software Engineer
    Aprimo, Inc

    Please remember to mark the replies as answers if they answered your question
  • PregnantBySilverlight

    PregnantBySi...

    Member

    91 Points

    112 Posts

    Re: Re: Re: Re: Library project file cannot specify ApplicationDefinition element.

    Sep 29, 2008 04:58 PM | LINK

    Thanks Sladapter....but it's still not working :(

    I don't know which class library....I just keep getting the same error....

    I tried to create the same scenario with a brand new project; but I couldn't get the error....

    I will explain more about the project.

    I have two projects, one is System7(which is silverlight pages) and the other one is System7Web (which is asp pages)...then I have my Web Service to communicate the data between Silverlight, sql and asp pages....The problem happend when I added the <asp:Image ImageUrl="someUrl" runat="server" /> to the default.aspx page....then I removed this tag...but still getting the error....

    This is really strange....but it happened before...and then I had to start the project over from scratch....and in the new project, again the same thing....when I added the <asp:Image> tag, the problem happened and it doesn't go away :(

    I want to kow what is causing this problem....and the problem is on the asp pages...not the Silverlight....

    Thanks again
    Marjan

     

     

  • sladapter

    sladapter

    All-Star

    43607 Points

    7907 Posts

    Re: Re: Re: Re: Library project file cannot specify ApplicationDefinition element.

    Sep 29, 2008 05:50 PM | LINK

     Then I have no idea what is going on. Discard that aspx page. Just start from a new asxp page and try it. If still not work, start a new Web project and try it.

    Sally Xu
    Software Engineer
    Aprimo, Inc

    Please remember to mark the replies as answers if they answered your question
  • PregnantBySilverlight

    PregnantBySi...

    Member

    91 Points

    112 Posts

    Re: Re: Re: Re: Re: Library project file cannot specify ApplicationDefinition element.

    Sep 29, 2008 07:36 PM | LINK

    I found why the problem is happening.....my big mistake....

    This was just result of copy and pasting iamges folder through the program....wrong wrong thing to do....I had to create the images folder directly under my asp project and then add the images into it....not copy from Silverlight project and pasting it under the asp project....that was causing the library issue error....

    Once I deleted the folder and created a new folder...it worked....

    Thanks for your replies :)
    MT

  • Harlequin

    Harlequin

    Member

    218 Points

    159 Posts

    Re: Re: Re: Re: Re: Library project file cannot specify ApplicationDefinition element.

    Feb 26, 2009 09:55 PM | LINK

    Yup, same thing happened to me when copying(not cut, but copy) a png from an /images folder in the Silverlight project into the ClientBin of the web app. I had to delete the png from the ClientBin, then it built fine. Did another copy, and a build was fine after that. Seems like a bug perhaps, sometimes the project files get mucked up on copying binaries or something from Silverlight to a web app.