473,800 Members | 2,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.

Mar 27 '08 #1
5 2225
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.
Mar 28 '08 #2
"CSharper" <cs******@gmx.c omwrote in message
news:ab******** *************** ***********@a70 g2000hsh.google groups.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.

Mar 28 '08 #3
On Mar 28, 1:20*pm, "Willy Denoyette [MVP]"
<willy.denoye.. .@telenet.bewro te:
"CSharper" <cshar...@gmx.c omwrote in message

news:ab******** *************** ***********@a70 g2000hsh.google groups.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.
Mar 31 '08 #4
"CSharper" <cs******@gmx.c omwrote in message
news:7c******** *************** ***********@a22 g2000hsc.google groups.com...
On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"
<willy.denoye.. .@telenet.bewro te:
"CSharper" <cshar...@gmx.c omwrote in message

news:ab******** *************** ***********@a70 g2000hsh.google groups.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.

Mar 31 '08 #5
On Mar 31, 5:55*pm, "Willy Denoyette [MVP]"
<willy.denoye.. .@telenet.bewro te:
"CSharper" <cshar...@gmx.c omwrote in message

news:7c******** *************** ***********@a22 g2000hsc.google groups.com...
On Mar 28, 1:20 pm, "Willy Denoyette [MVP]"

<willy.denoye.. .@telenet.bewro te:
"CSharper" <cshar...@gmx.c omwrote in message
news:ab******** *************** ***********@a70 g2000hsh.google groups.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.
Apr 1 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1400
by: andrea valle | last post by:
Hi to all, I need to run a program from inside python (substantially, algorithmic batch processing). I'm on mac osx 10.3.8 with python 2.3 framework and macpython. Trying to use exec*, I checked references, Brueck & Tanner, and then grab this code from effbot: >>> program = "python" >>> def run(program, *args):
7
6037
by: Ken Innes | last post by:
I am trying to write a little program that can be run as a Windows program or as a command line program. I'm really not sure the best way to do this, so what I came up with so far was to check for command line parameters (code shown below). This works, except that printf()'s don't display anything. Is there a better way to do this? WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int pszCmdLine) { if(ParamStr(5)!="") { main1(); //command...
12
5379
by: Rhino | last post by:
I am having an odd problem: the sqlj command on my system doesn't work. I am running DB2 (LUW) V8 (FP8) on WinXP. I haven't done an sqlj program since Version 6 of DB2 (LUW) so I checked the manuals for the proper techniques to prepare an sqlj program. When I went to try the sqlj command, I got this: Exception in thread "main" java.lang.NoClassDefFoundError: sqlj/tools/Sqlj
3
3039
by: Double Echo | last post by:
Hi all, I'm using PHP 4.4.2, and use PHP on both the command-line and the web. I am running PHP on SuSE 10 Linux , in a VMware 5.5 workstation, using Apache 2.0.55 , on my Dell laptop. Everything has been running flawlessly without problems. Very amazing to use VMware, it has worked beautifully. uname -a
40
2754
by: raphfrk | last post by:
I have a program which reads in 3 filenames from the command line prog filename1 filename2 filename3 However, it doesn't work when one of the filenames has spaces in it (due to a directory name with a space in it) because that filename gets split into 2. I tried
3
10328
by: jlw16 | last post by:
Hello, I’m trying to use my vbs script to get a command line argument for a file which will need to be opened through QuickTestPro. Below are the commands I’m using: Dim qt_file 'As String -> If I don’t comment out the As String, I get an “Expected end of statement” error – is this correct?? qt_file = Command -> This doesn’t appear to be correct – when I echo out qt_file it’s null qtApp.Test.DataTable.Import qt_file ' Import data...
2
3387
by: Jim | last post by:
Hello, I need a program that will traverse a directory tree to ensure that there are unix-style line endings on every file in that tree that is a text file. To tell text files from others I want to use the unix "file" command (Python's "mimetypes" is not so good for me). But I am stuck on something about getting that output, and I'd greatly appreciate any pointers.
51
4165
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under Command Prompt or Browser or some other application? Ojas.
7
9375
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should display the Windows form. The form is being displayed but the command only returns when the form is closed. I want the command line to return immediately, leaving the form displayed.
7
2100
by: Kevin Vogler | last post by:
I'm trying to programatically run an app. The command line syntax is: "C:\Program Files\WinSCP3\WinSCP3.exe" -script=myscript.txt and it works as intended. In code, I have this Dim myProc As Process = New Process() myProc.StartInfo.FileName = "C:\Program Files\WinSCP3\WinSCP3.exe"
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.