Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / April 2008

Tip: Looking for answers? Try searching our database.

command line program doesn't run!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CSharper - 27 Mar 2008 17:28 GMT
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 - 28 Mar 2008 14:43 GMT
> Please tell me what am I doing wrong in the following;
>
[quoted text clipped - 13 lines]
>
> Thanks.

For time being I converted the app to WinForm and everything works,
hopefully someone will shed some light into XAML into binary.
Willy Denoyette [MVP] - 28 Mar 2008 19:20 GMT
> Please tell me what am I doing wrong in the following;
>
[quoted text clipped - 13 lines]
>
> 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.
CSharper - 31 Mar 2008 20:54 GMT
On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.be> wrote:

> > Please tell me what am I doing wrong in the following;
>
[quoted text clipped - 21 lines]
>
> - 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.
Willy Denoyette [MVP] - 31 Mar 2008 23:55 GMT
On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.be> wrote:
> "CSharper" <cshar...@gmx.com> wrote in message
>
[quoted text clipped - 26 lines]
>
> - 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.
CSharper - 01 Apr 2008 01:38 GMT
On Mar 31, 5:55 pm, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.be> wrote:
> On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"
>
[quoted text clipped - 44 lines]
>
> - Show quoted text -

Thanks. We use NAnt and we do not use MSBuild so I am kind of stuck.
But it is ok. Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.