I need to deploy a WinForm application and I need to generate just 1 .exe file.
I tried with ClickOnce but it generates also a manifest file, so I can't use it,
and I can not use the Release folder content because there aerseveral files (eg. strings resources)
Thanks a lot!
There's a little tool called ILMerge.
With this it is possible to merge several dlls and exe into one exe.
I don't know if it is possible to integrate resource files as well, but i don't think so.
Have a look at:
ILMerge Best Practices
Related
I am developing multiple Windows Phone applications that vary only by the content of several files. Applications share the same logic therefore I created a project and multiple folders, one for each app variation with variant's assets and files and moved them to separate location. To compile project I copy over files and follow a standard compilation process with Visual Studio.
Now there are only 5 application variations and for now it is suiting solution, but the number is expected to grow to 50 and more. I would like to automate the process and my current idea is to write a batch script to copy files from variation folder, overwrite project files, compile app with a script and to copy xap package to another location.
My two questions are:
Is my idea good resolution of the problem or is there a more graceful way to do this I am not aware of? (manage and develop multiple app variations)
How would I compile windows phone app from cmd?
I think your problem is valid. I ran into a similar requirement in the past (only that it was for Windows 8 Store Apps), and what I did was the following:
Create a "core" project and moved all the shared logic to that project. I then created a sample app project, referenced the core project and made sure the sample app worked the way I wanted it to.
Finally, I converted the sample app into a Visual Studio template. What this basically does is take the project code and create a Visual Studio template you can reuse.
Read more about it here.
Some work needed to be done within the template source code in order to get some of the dynamic parts like app name into specific locations within the code. For example, you can change a class namespace to be the project's namespace by applying the following code in tour class:
namespace $safeprojectname$
You can read more about template parameters here.
Hope it helps.
To compile windows phone applications or any .NET app from command line you should use
msbuild.exe
. You can find more information and samples here.
Can anybody suggest a tool to convert Silverlight xap files to Windows executables? I googled and got this this link but it does not work.
Edit: The Silverlight application has been compiled without the out-of-browser switch and I want to know if there is a solution which does not require me to open the project and recompile with out-of browser mode on.
A XAP file is just a Zip file that has a different extension. You can easily use libraries like SharpLib or DotNetZip to extract the contents of it. You can also manualy change the extension of a .xap file to .zip and then extract it in a folder. When extracted, you would get all the assemblies that were bundled as part of the .xap file.
Everything is clearly explained in the following link,
Extracting Assemblies from a XAP File
This link might be of interest:
http://www.amazedsaint.com/2010/05/how-to-create-offline-installer-no.html
It describes creating an installer that installs silverlight on machines where it is not present, as well as an Out-of-browser silverlight application and start menu links. You can use this installer on machines with no internet connection and no .net runtime installed. So it offers most of the practical benefits of converting it to an exe. I followed that procedure before and found it good.
I am using eclipse and would like to integrate some sort of version control. Ideally, I do not want to use a plugin. I would really like to somehow write the version to a text file in some way.
The reason I would like to do this is because I have a program that needs to track the current version of the workspace. Right now I am manually creating a text file in the workspace folder called "Version.XXXX" and just reading the name of the file to get the version number. However, I would like to somehow have eclipse do this automatically in case I forget to make the text file manually.
Any help or suggestions is greatly appreciated. Thanks!
If you want a simple source version control system I suggest you use Mercurial. All the versioning information is stored in the root folder of your project in a .hg folder. There is no server and log-ins. Like SVN and Git, it has gui support from Tortoise and plug-in for your IDE. The logic and commands behind it are similar to other solutions.
I have started to use WIX to deploy a WPF application. I have created the .wxs file with the desired interface features etc...
My questions is how to distribute the required .Net files that support my WPF executable? Not the .net framework or sql server express, but the dependencies needed to run my executable.
Should the process include building a msi with VS Installer, then including that msi into my WIX script and running that inside of my WIX msi?
Or, what is the correct process for distributing a WPF executable with WIX?
I don't think your question pertains to WiX or WPF at all. What you need to ensure is that you package up the necessary dependencies along with your installer, whatever they may be. Referencing your dependency files in your installer script should be sufficient.
Here's the process that I follow for any application.
1) Start with a clean VM that represents the least common denominator of a machine I want to target. Let's say WinXP SP2 32bit.
2) Deploy my application by hand and record all of the steps in a word document. Then try those steps on other OS's to make sure you didn't miss anything.
3) Take each of the steps in my document and implement them in WxS. Keep in mind that Windows Installer and Windows Installer XML is a declarative programming language not an imperative programming language. You don't tell it to xcopy files from dir a to dir b, you describe the directory structure and the installer takes care of it.
BTW, of the things you mentioned, your asking for help with what I consider the simple stuff and excluding the harder more complicated stuff.
As an alternative way, you might see also this post Embedding dlls in a compiled executable to embed all the dll needed (like the interop ones for example) using Costura.Fody. Using WIX there is no more need to add any dependent dll as components in the .wsx file.
Basically i want to utilize the Silverlight Video player on Codeplex in another Silverlight application. Is this possible. Can anyone point me in the right direction on how to achieve this?
Thanks
J
If you just have a few assemblies of interest, such as those video player .dll files, then you could of course:
Rename the .xap to .zip
Extract the contents
Copy the .dll assemblies into your project
Reference the .dll's
Unfortunately, I'm guessing that you might be wanting to take advantage of the actual video player application - which includes custom handling for init parameters of the control, and just include that .Xap file into your solution. I don't know of an easy way to do that.
adding another xap file to your project, yes. you'll need to manually load the assemblies inside the xap package to utilize it.
Check the downloadable project solution here: http://www.wintellect.com/CS/blogs/jprosise/archive/2010/06/21/dynamic-localization-in-silverlight.aspx
the solution basically has two silverlight projects, the ExternalResources project's generated xap gets created and it's assemblies are manually loaded when needed.