command line program doesn't run!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CSharper

    command line program doesn't run!

    Please tell me what am I doing wrong in the following;

    I have a WPF program that I build it in IDE and ran it, it runs fine.
    I wanted to make it an exe through command line compiler(why, I need
    to do some additional work) to I did a build in IDE and took the
    compiler parameters and wrote a batch program to create the exe. It
    compiled successfully and created the exe. But when try to run it I
    get the error that Window1.xaml not found.

    I have 2 part question;
    1. What is the correct way to create single exe that I can distribute
    it to the client, without giving all the xaml files?
    2. I did find couple of tools from some blogs like ac.exe or xamlc.exe
    to convert the xaml to baml. But even if I convert it to baml how can
    I add it to the exe file?

    Thanks.

  • CSharper

    #2
    Re: command line program doesn't run!

    On Mar 27, 11:28 am, CSharper <cshar...@gmx.c omwrote:
    Please tell me what am I doing wrong in the following;
    >
    I have a WPF program that I build it in IDE and ran it, it runs fine.
    I wanted to make it an exe through command line compiler(why, I need
    to do some additional work) to I did a build in IDE and took the
    compiler parameters and wrote a batch program to create the exe. It
    compiled successfully and created the exe. But when try to run it I
    get the error that Window1.xaml not found.
    >
    I have 2 part question;
    1. What is the correct way to create single exe that I can distribute
    it to the client, without giving all the xaml files?
    2. I did find couple of tools from some blogs like ac.exe or xamlc.exe
    to convert the xaml to baml. But even if I convert it to baml how can
    I add it to the exe file?
    >
    Thanks.
    For time being I converted the app to WinForm and everything works,
    hopefully someone will shed some light into XAML into binary.

    Comment

    • Willy Denoyette [MVP]

      #3
      Re: command line program doesn't run!

      "CSharper" <csharper@gmx.c omwrote in message
      news:ab68a892-99fb-416b-bbab-c273d091c846@a7 0g2000hsh.googl egroups.com...
      Please tell me what am I doing wrong in the following;
      >
      I have a WPF program that I build it in IDE and ran it, it runs fine.
      I wanted to make it an exe through command line compiler(why, I need
      to do some additional work) to I did a build in IDE and took the
      compiler parameters and wrote a batch program to create the exe. It
      compiled successfully and created the exe. But when try to run it I
      get the error that Window1.xaml not found.
      >
      I have 2 part question;
      1. What is the correct way to create single exe that I can distribute
      it to the client, without giving all the xaml files?
      2. I did find couple of tools from some blogs like ac.exe or xamlc.exe
      to convert the xaml to baml. But even if I convert it to baml how can
      I add it to the exe file?
      >
      Thanks.
      >


      The exe doesn't need xaml file at run time. IMO you are dynamically loading
      Windows1.xaml in code, but it's hard to tell for sure without seeing any
      code.


      Willy.

      Comment

      • CSharper

        #4
        Re: command line program doesn't run!

        On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"
        <willy.denoye.. .@telenet.bewro te:
        "CSharper" <cshar...@gmx.c omwrote in message
        >
        news:ab68a892-99fb-416b-bbab-c273d091c846@a7 0g2000hsh.googl egroups.com...
        >
        >
        >
        >
        >
        Please tell me what am I doing wrong in the following;
        >
        I have a WPF program that I build it in IDE and ran it, it runs fine.
        I wanted to make it an exe through command line compiler(why, I need
        to do some additional work) to I did a build in IDE and took the
        compiler parameters and wrote a batch program to create the exe. It
        compiled successfully and created the exe. But when try to run it I
        get the error that Window1.xaml not found.
        >
        I have 2 part question;
        1. What is the correct way to create single exe that I can distribute
        it to the client, without giving all the xaml files?
        2. I did find couple of tools from some blogs like ac.exe or xamlc.exe
        to convert the xaml to baml. But even if I convert it to baml how can
        I add it to the exe file?
        >
        Thanks.
        >
        The exe doesn't need xaml file at run time. IMO you are dynamically loading
        Windows1.xaml in code, but it's hard to tell for sure without seeing any
        code.
        >
        Willy.- Hide quoted text -
        >
        - Show quoted text -
        I created a simple WPF project nothing in it and then I took the
        compiler command from the output tab and try to build the exe from the
        command line. It compiled properly but when Ran the exe, it is looking
        for xaml. I did read some more and found out that if I use MSBuild to
        build the wpf application then the XAML is converted and put it in the
        exe otherwise you need xaml.
        Thanks.

        Comment

        • Willy Denoyette [MVP]

          #5
          Re: command line program doesn't run!

          "CSharper" <csharper@gmx.c omwrote in message
          news:7cdca6a6-b48c-438b-8083-2a85874e9ea1@a2 2g2000hsc.googl egroups.com...
          On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"
          <willy.denoye.. .@telenet.bewro te:
          "CSharper" <cshar...@gmx.c omwrote in message
          >
          news:ab68a892-99fb-416b-bbab-c273d091c846@a7 0g2000hsh.googl egroups.com...
          >
          >
          >
          >
          >
          Please tell me what am I doing wrong in the following;
          >
          I have a WPF program that I build it in IDE and ran it, it runs fine.
          I wanted to make it an exe through command line compiler(why, I need
          to do some additional work) to I did a build in IDE and took the
          compiler parameters and wrote a batch program to create the exe. It
          compiled successfully and created the exe. But when try to run it I
          get the error that Window1.xaml not found.
          >
          I have 2 part question;
          1. What is the correct way to create single exe that I can distribute
          it to the client, without giving all the xaml files?
          2. I did find couple of tools from some blogs like ac.exe or xamlc.exe
          to convert the xaml to baml. But even if I convert it to baml how can
          I add it to the exe file?
          >
          Thanks.
          >
          The exe doesn't need xaml file at run time. IMO you are dynamically
          loading
          Windows1.xaml in code, but it's hard to tell for sure without seeing any
          code.
          >
          Willy.- Hide quoted text -
          >
          - Show quoted text -
          I created a simple WPF project nothing in it and then I took the
          compiler command from the output tab and try to build the exe from the
          command line. It compiled properly but when Ran the exe, it is looking
          for xaml. I did read some more and found out that if I use MSBuild to
          build the wpf application then the XAML is converted and put it in the
          exe otherwise you need xaml.
          Thanks.


          Yep, you need to convert the xaml to a cs file, before you can compile the
          project, this translation is done by an msbuild step.

          Willy.

          Comment

          • CSharper

            #6
            Re: command line program doesn't run!

            On Mar 31, 5:55 pm, "Willy Denoyette [MVP]"
            <willy.denoye.. .@telenet.bewro te:
            "CSharper" <cshar...@gmx.c omwrote in message
            >
            news:7cdca6a6-b48c-438b-8083-2a85874e9ea1@a2 2g2000hsc.googl egroups.com...
            On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"
            >
            >
            >
            >
            >
            <willy.denoye.. .@telenet.bewro te:
            "CSharper" <cshar...@gmx.c omwrote in message
            >
            news:ab68a892-99fb-416b-bbab-c273d091c846@a7 0g2000hsh.googl egroups.com...
            >
            Please tell me what am I doing wrong in the following;
            >
            I have a WPF program that I build it in IDE and ran it, it runs fine.
            I wanted to make it an exe through command line compiler(why, I need
            to do some additional work) to I did a build in IDE and took the
            compiler parameters and wrote a batch program to create the exe. It
            compiled successfully and created the exe. But when try to run it I
            get the error that Window1.xaml not found.
            >
            I have 2 part question;
            1. What is the correct way to create single exe that I can distribute
            it to the client, without giving all the xaml files?
            2. I did find couple of tools from some blogs like ac.exe or xamlc.exe
            to convert the xaml to baml. But even if I convert it to baml how can
            I add it to the exe file?
            >
            Thanks.
            >
            The exe doesn't need xaml file at run time. IMO you are dynamically
            loading
            Windows1.xaml in code, but it's hard to tell for sure without seeing any
            code.
            >
            Willy.- Hide quoted text -
            >
            - Show quoted text -
            >
            I created a simple WPF project nothing in it and then I took the
            compiler command from the output tab and try to build the exe from the
            command line. It compiled properly but when Ran the exe, it is looking
            for xaml. I did read some more and found out that if I use MSBuild to
            build the wpf application then the XAML is converted and put it in the
            exe otherwise you need xaml.
            Thanks.
            >
            Yep, you need to convert the xaml to a cs file, before you can compile the
            project, this translation is done by an msbuild step.
            >
            Willy.- Hide quoted text -
            >
            - Show quoted text -
            Thanks. We use NAnt and we do not use MSBuild so I am kind of stuck.
            But it is ok. Thanks.

            Comment

            Working...