We need to dynamically load assemblies at runtime in order to include customization for our users. However, after looking all over the web, I cannot find any information on whether Microsoft plan to make this feature possible or not. I have started a feature request here:
https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/18145291-dynamically-load-assembly
Failing that, I figured that it may be possible to manually add assemblies in to the AppX package, and then force the user to quit, and reopen the app. Yes, this is horrible, but I don't see any way around this currently. Are there any examples out there on how to modify the AppX package?
Or, is this idea thwarted because the package would lose its certificate signing?
Related
Pretty simple question. I know how to find out if it's been installed. But, if it hasn't....how do I install it? All of the documentation appears to be geared towards C++ where you can just run Shell commands. I also found something where you can use a FullTrustProcessLauncher but you have to modify the package manifest to get permission and, since this is a component, I can't do that.
we are using the infragistics libraries for a long time now. But now we ran into a problem, that has been solved here Cannot select Infragistics controls in winform designer.
My more specific question now is, why does this problem not occur on all of our colleaques computers, but only on mine? We have the same visual studio solution and all of the source code is from a subversion repository.
We decided to put a copy of the infragistics dlls to our controls directory in the project, so we can deploy it later on very easily by copy and paste the files into the target directory (but still we need a setup tool to install for the first time).
How can we make sure, that the following requirements (useful or not) are met?
Updating the application still possible by copy&paste.
developper tracks the needed infragistic dlls by copying them into the controls directory (that is then copied into the application executable directory).
the problem from the link above doesnt occur
Perhaps we miss something important?
Is it bad practice to update the application by simply copying newer files to the application directory? Or is it even "illegal" in some way?
Do the infragistics tools need to be installed via setup or msi installer? Or is it sufficient to copy them?
[edit #1]:
to clarify things, as i know whats going wrong (see the link above) and what the possible solution is, i need some good arguments for or against not using the controls directory with respect to our practice of deploying the application without setup when it gets updated. We need to give our customer the posibility to update our application without a setup, because in his factory he needs to update a couple of computers at once, and if he is able to do this without the need of a setup, it will be more cost efficient compared to a setup way.
Here is my two cents:
Try setting all Infragistics libraries Copy Local property to True.
This will copy the dll to the bin folder each time you build your
application. This could solve the problem you are having with
updating the application by copy&paste;
It is better each developer to install the libraries into the GAC. I suppose all of you are using the same version of these libraries.
Otherwise, it will be real chaos. If, for some reason, you are not using same versions try to set for each Infragistics dll Specific Version to False
If all the controls are appear in the Component try (down in the designer) this clearly shows, that Designer.dll is broken or is not found. So it is always good idea to install the dlls into GAC - this should add the Infragistics Designer dll there too, and you should not have this problem.
So, install everything into GAC, set Copy Local to true and set Specific Version to false.
Also whenever you need to upgrade project containing Infragistics libraries use their nice tool Version Utility - this could save you many efforts
Is there a way to publish a VS2012 App (WPF) to an .exe without any installer? I know how to use ClickOnce installers but i was wondering if it could be taken one step furthur.
Many small programs seem to come in a .rar with some app files and an .exe that runs and doesn't have to install. Is this possible in VS2012? (or 2010)
Yes, sure, it's possible. Just compile you app in Release mode and take all you have in Release folder.
This is possible with Visual Studio 2012 depending on your needs and your approach to developing your application. I'll list a couple options, but don't take this as being exhaustive as there are many ways to accomplish the same thing. I'm assuming you want a "1 click" solution for the user.
You can embed all of your application's resources into the application allowing your users to be able to simply download or copy the .exe and run it from anywhere and it "just works".
Pros: The only method that gives you what you asked for. A single .exe without the need for an installer.
Cons: You can't edit any of the embedded resources without a recompilation of the application. You also can't store user settings for this same reason (though you could silently create a settings file in App_Data or similar).
Self extracting archive. This is the WinRAR method you mentioned in your question. You embed your application into a self-extracting archive which is set to extract to the users Temp directory or App_Data (or similar) and to launch your exe upon successful extraction.
Pros: You get the ability to update your resources as they aren't embedded into your actual application.
Cons: Technically, this is still an installer; albeit a very lightweight and self-contained one.
There are more, such as click-once; etc., but this explained the general idea.
Note: The correct .NET version will need to be installed for these to work as simply as I described.
Here are the concerns I can think of that an installer takes care of that you would need to worry about:
The correct .NET framework already exists.
Any assemblies that you reference from the GAC are already installed.
You don't need any custom registry entries or permissions to be granted.
Your app doesn't access anything that would keep it from working in a "low trust" environment when the user is not running as admin.
There are surely more, but basically if your app is self-contained and does not use any external resources and the correct .NET framework is installed, you should be able to just copy your build output and go.
I am looking at making an application more modular and accessing dlls so that I can change them if the client was wanting different functionality.
I know how to create the dlls and reference them, but I am trying to find a way to create an executable that will install a different version of a dll into the required application folder. I want to avoid having to put the new dlls into the original project and build a new install file and I want to keep things simple for the end user.
Currently I am using visual studio 2010
You could create MSI files for each of your dlls and use the standard installer process to update the dll. It is also possible to write an exe that downloads and extracts which will have an arbitrary amount of logic (licensing, download location now and then...).
A combnation of both might seem an interesting thing. A bootstrapper downloading msi files and silently installing them. You could have advanced features in the installer while having the freedom to decide what and when to install on your own.
Technical aspects popping into my mind: files in use may not be changed and if you change the interface theunchanges main program won't be able to use the new library.
It seems you're searching for a plugin architechtecture, you might want to look at MEF or Unity to perform the compositiom, but that is more a side comment.
There are few SO thread available on this great website. You should explorer them and try the best way to implement whatever situation you have..
Check these reference links:
from: Creating a patch to upgrade .NET application
If you already use a a VS Setup Project you can deploy the new version
of this project and it will upgrade existing installations. Have a
look at the setup and upgrade ids. The stop and start of the service
can be done by custom actions that can be defined in the project and
will be executed i.e. when your setup is committed or rollbacked etc.
Patch development in DotNet
How to make Patch-able/Update-able application?
create patch file using .net windows application
Note: Ref this For clickonce how to build a patch for existing installer
I have to make a rather complex installer for a C# add-in for Word. I've been researching this for almost two days now and I still haven't found something that can do everything needed.
The main issue here is due to the constraints regarding prerequisites. They mustn't be included in the main installer to keep it small so they'll have to be downloaded.
Additionally, they have to be installed silently without bothering the user. It is ok to show a progress bar or something similar but nothing that requires user input.
After reading about the Windows Installer, Inno, bootstrapper packages and dotNetInstaller I have finally reached the conclusion that the later would be best suited for this scope. However, there's a nasty downside which I have yet to resolve: prerequisites checking.
Is there a standard way to check whether a Microsoft redistributable is installed? The add-in needs the following components:
Windows Installer 3.1
.Net Framework 3.5
PIA
VSTO
Furthermore, I haven't been able to find the direct URLs for these components. I'm wondering how Windows Setups in VS get them.
As a last resort I could host them somewhere to have them at a known location but I'd like to avoid that.
Furthermore, I haven't been able to find the direct URLs for these
components. I'm wondering how Windows Setups in VS get them.
If your using the Visual Studio Setup Project, you can embed them into the setup, and make them required for your application to be installed.
At least for the case of Windows Installer 3.1 and .NET Framework 3.5 SP1
Is there a standard way to check whether a Microsoft redistributable
is installed?
Checking the registry is a quick way.
I would first prompt the user about the downloads first because there would be an uproar if it secretly downloaded files without the users consent. It could also be used for malicious reasons if it were unsecure.
use this tool http://www.advancedinstaller.com/ for creating installer project it has the simple ui interface using which u can handel many comple scenarios in an easy way. U can purchase the tool or can use freeware edition