Re: command line program doesn't run!

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"CSharper" <csharper@xxxxxxx> wrote in message news:7cdca6a6-b48c-438b-8083-2a85874e9ea1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"
<willy.denoye...@xxxxxxxxxx> wrote:
"CSharper" <cshar...@xxxxxxx> wrote in message

news:ab68a892-99fb-416b-bbab-c273d091c846@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





> 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.

.



Relevant Pages

  • Re: command line program doesnt run!
    ... I wanted to make it an exe through command line compiler(why, ... compiler parameters and wrote a batch program to create the exe. ... to convert the xaml to baml. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: command line program doesnt run!
    ... I wanted to make it an exe through command line compiler(why, ... compiler parameters and wrote a batch program to create the exe. ... to convert the xaml to baml. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: command line program doesnt run!
    ... I have a WPF program that I build it in IDE and ran it, ... I wanted to make it an exe through command line compiler(why, ... to convert the xaml to baml. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: If APL Is So Wonderful, How Come APL Programmers Arent Rich
    ... compiled to a single EXE: ... >> Will APEX allow me to take a set of APL2 functions and produce an .EXE ... Compiler runs under APL+Win today, ...
    (comp.lang.apl)
  • Re: Building EXE Twice Produces Different Files
    ... It think the status bar control pulls in the latest ... project type an Active EXE or Standard EXE under the properties? ... the C2 compiler, but it ends up in the finished executable. ...
    (microsoft.public.vb.general.discussion)