dbforge / nupdate Goto Github PK
View Code? Open in Web Editor NEWA comfortable update solution for .NET-applications.
Home Page: https://www.nupdate.net
License: MIT License
A comfortable update solution for .NET-applications.
Home Page: https://www.nupdate.net
License: MIT License
Hey there,
i'm currently writing something like a launcher for my other software and i want to update them with my launcher.
Therefor the actual Version cannot be the same, as the one of the launcher (which is also updated with nUpdate).
Is there a possibility to set different "assembly: nUpdateVersion"?
For example read the actual version out of a text file or something?
Greetings
There is no exception thrown or alternative culture used in this case. Instead, nUpdate seems to work fine until the download of the update packages has finished. After that, it just closes the dialog, throwing a NullReferenceException
internally when trying to access the localized properties that do not exist.
This should be fixed.
When trying to use "Load version from assembly" in nUpdate Administration 3.2.0, I get an error:
Invalid assembly found.
Could not load file or assembly 'nUpdate.WithoutTap,
Version=3.2.0.0, Culture=neutral, PublicKeyToken=null' or one
of its dependencies. The system cannot find the file specified.
I have updated the nuGet package in my application to 3.2, but it just won't load the assembly.
Version: 3.3.0
No error or exception, it just stopped after ShowDialog
.
The ShowDialog();
at line 36 in MainForm.cs
will block the execution of ThreadPool.QueueUserWorkItem(arg => RunUpdateAsync());
at line 141 in Update.cs
.
Hello,
When I built my project where the nuget package nUpdate.ProvideTAB is installed (targeting.Net Framework 4.5), I always get this line in the built output:
Der Konflikt zwischen "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" und "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" kann nicht aufgelöst werden. Auswahl von "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" nach dem Zufallsprinzip.
It says, there is an conflict between mscorlib v4.0.0.0 and v2.0.5.0 and it takes v4.0.0.0 always but after ~5 seconds delay.
Can you check it out please? It's annoying.
And it's not specific for the last update, because this problem I have since I've installed nUpdate.ProvideTAB.
If you need more informations, tell me.
Thank you very much!
Pilzinsel64
Hello,
I have problem with updating application. After I ran manager.InstallPackage();
installation progress is shown, but in a while I got error
I have tried everything to get rid of this error, nothing helps.
Could you please guilde me what am I doing wrong?
PS. This is how I'm doing it right now (not working OFC)
Task.Factory.StartNew(async () =>
{
await Task.Delay(TimeSpan.FromSeconds(10));
UpdateManager manager = new UpdateManager(...)
var forUpdates = manager.SearchForUpdates();
if (forUpdates)
{
manager.DownloadPackages();
manager.CloseHostApplication = true;
manager.InstallPackage();
}
});
hello,i want to use this,but i don't know how to getting start.can you write wiki to teach me?
Hello,
do you agree to update the library to .dotnetcore 2.2, .net standard 2.0 and .net framework 4.7.2 ?
Also I realized a new provider, nUpdate.WebProvider, to be used in asp net.
I did some little changes to your library, so it can be used in Linux too.
I prefer to pull a request, in order to avoid creating a new nuget package.
Let me know
I hope to be able to support Chinese
Hello!
It would be brilliant if I could setup an proxy authentification in the Settings.
Per code you can setup like this:
System.Net.WebRequest.DefaultWebProxy.Credentials = New System.Net.NetworkCredential("Username", "Password");
And the authentification will be used for the whole application.
And in the Settings like this:
Thanks
When creating a package and selecting another architecture than AnyCPU
, nUpdate will check the client's system for the wrong architecture (x64 instead of x86 and vice-versa) before making the package available which result in a missing package. This is caused by a UI mistake.
I always get the error
Field must contain equals "-" value with only a name and value
add an app.manifiest file for support hdpi
https://docs.microsoft.com/en-us/dotnet/framework/winforms/high-dpi-support-in-windows-forms
The nUpdateVersionAttribute has been designed for external access to the assembly's current version, but is not used in the feature provided by nUpdate Administration. This should be changed as this is the only reason why the attribute had been introduced.
I think that there may have been a merge conflict or any other problem as I am pretty sure this had already been implemented some time ago.
Hello and sorry for asking questions again:P
In my software i use an app.manifest to force the program using admin rights (requestedExecutionLevel level="requireAdministrator")
Now my question; Does nUpdate restart the host program (my software) with admin rights, after an update?
Greetings
Cedric
How do I add an action to delete/rename a file or any other action? I can only add files to directories.
And is there any blog/forum about this Updater I can check?
My programm need a bit longer to close and that occus that the updater try to overwrite the file of the running process which is closing. This cause that a error window opens that tell me that the updater wan't able to overwrite the specific file. When I click to close the updater tries again.
But this is not realy nice for the end-user. He see the error and make a bug report to me.
How would be a option for the developer who can setup the behavior for what happens if the host application doesn't close after the updater told the process to close?
E.g. setup by changing a property "BehaviorWhenHostApplicationDoesntClose" on UpdateManager of type of an Enum with this values: ShowErrorDialog, KillProcess, WaitForProcessHasClosed
Very simple and basic question that I do not see attended to anywhere. The wikis, github issues, information on the official website, etc... all explain and discuss the administration end.
How is nUpdate implemented on the client side, such that when we done updating and setting things up at the admin side, client/users of my app will have their nUpdate downloading as intended?
Thanks
Hi. I have a question about nUpdate. Does it support updates if a certain extension folder is present?
For example: I have an application that supports extensions (like Google Chrome). If an extension were installed in the following directory: myapp/extensions/coolExtension, nUpdate will continually update this extension to the latest version, when available. However, if the extension was not installed (is not present in my application's extension folder) nUpdate will not show/allow updates for this extension (i.e. it will ultimately ignore updates for that particular extension and simply provide updates for other installed extensions or the application itself).
Is this possible?
The host application is not always closed correctly, if it's a WPF or console application (or else the closing of a form is cancelled). This is due to the functionality of Application.Exit
and should be changed.
The method Icon.ExtractAssociatedIcon
used in all dialogs of nUpdate.UI.WinForms
throws an ArgumentException
, if the path of the application's executable file is a UNC path (for network sharing).
Hello,
I'm currently working on the same project from different computers with Git.
As the whole project, I also copy the update.nupdproj with Git, and this seems to be a problem.
A path string is stored inside the update.nupdproj, and because i'm sometimes on another computer, it cannot find this local path.
It's not a big problem, i just edited the update.nupdproj myself, so it fits the path, but I think you could improve there a little bit.
Nochmals in Deutsch, da mein Englisch nicht das Beste ist.
Ich arbeite momentan an einem Projekt mit mehreren Arbeitsplätzen, wobei mit Git gearbeitet wird, um immer die aktuellste Version auf jedem Rechner zu haben (des Sources).
Nun hatte ich damals auf Rechner 1 das nUpdate Projekt erstellt und die update.nupdproj Datei einfach auch mit Git synchronisiert, damit ich Updates auch vom zweiten Rechner aus hochladen kann.
Leider scheint dies nicht so einfach zu gehen.
Ich habe herausgefunden, dass in der update.nupdproj ein lokaler Pfad als String gespeichert ist (der Datei-eigene Pfad) der natürlich auf einem anderen Rechner nicht mehr unbedingt stimmt.
Ich konnte das Problem umgehen, in dem ich die Datei mit einem Texteditor geöffnet und von Hand den Pfad geändert habe, so dass es danach stimmte.
Dennoch denke ich, dass man hier eventuell etwas ändern könnte, auch wenn es nicht direkt notwendig ist.
Greetings KillTrot
www.nupdate.net seems to be down...
After migrating my useraccount to "C:\Users\AliveDevil" and moving "nUpdate Administration" to "nUpdate.Administration" nUpdate throws a filenotfoundexception.
Cause: Every path is saved in the project file.
Hello sirs and thank you for your great work,
I'm using your application since almost a year, but had to move the update files to another hosting area, in that area I kept getting "Forbidden 403-Access denied" error despite that the directory listing is working and Json file is accessible from the browser.
That took me three days until I accidentally found someone talking about the "user-agent" header (see this link : https://stackoverflow.com/a/2794346 ), so I decided to clone your code and debug it my self.
then I changed couple places:
1- file: "nUpdate.Shared\Updating\UpdateConfiguration.cs"
Method :
public static IEnumerable Download(Uri configFileUri, NetworkCredential credentials, WebProxy proxy, int timeout = 10000)
Changed this code:
wc.Encoding = Encoding.UTF8;
if (credentials != null)
wc.Credentials = credentials;
if (proxy != null)
wc.Proxy = proxy;
to this:
wc.Encoding = Encoding.UTF8;
if (credentials != null)
wc.Credentials = credentials;
wc.Headers.Add("user-agent", "Only a test!");
if (proxy != null)
wc.Proxy = proxy;
2- file "nUpdate.ProvideTAP\Updating\UpdateConfiguration.cs",
Method:
public static async Task<IEnumerable> DownloadAsync(Uri configFileUri, NetworkCredential credentials, WebProxy proxy, CancellationTokenSource cancellationTokenSource = null, int timeout = 10000)
change this code:
// Check for SSL and ignore it
ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };
var request = (HttpWebRequest)WebRequest.Create(configFileUri);
request.Timeout = timeout;
To this:
// Check for SSL and ignore it
ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };
var request = (HttpWebRequest)WebRequest.Create(configFileUri);
request.UserAgent = "Only a test!";
request.Timeout = timeout;
then the issue is gone from the administration application..
So I suggest that you add an option to specify the request headers and also allow the user to specify custom client for the request and setting a default "user-agent" header for the administration and all parts of the application.
The version I'm using is v3.5.0
Thank you for your effort
After my user account migration I tried to open a single project. Everything is OK except: I cannot see ANY Update because every update is saved in %AppData%.
I would like you to change that behaviour:
Either let the user specify where to store update files, make ovious where update files are stored or use a more intuitive path (i.e. in the project file directory under updates).
If I try to edit a package I can't modify the replace / add file action.
Is that way correct? Or an issue?
Following files are missing in the repository but are referenced in project files.
nUpdate:
Core\Operations\OperationsMethods.cs
Core\SizeConverter.cs
UI\Dialogs\BaseForm.cs
UI\Dialogs\BaseForm.resx
nUpdate Administration:
Core\Application\Sql.cs
Core\Update\Operations\OperationMethods.cs
Core\Update\Operations\Panels\RegistryEntryCreateOperationPanel.cs
Core\Update\Operations\Panels\RegistryEntryDeleteOperationPanel.cs
Core\Update\Operations\Panels\RegistryEntrySetValueOperationPanel.cs
UI\Controls\WatermarkTextBox.cs
nUpdate UpdateInstaller:
Controls\ControlPanel.cs
Core\Operations\OperationMethods.cs
Dialogs\MainForm.cs
hi,
i want to make a generic updater with your lib. is it possible to update apps from other locations?
Has anyone tested this library on mono framework using a Linux OS (example CentOS)?
Hi,
I have cloned this project and read it, but I can not find any instruction manual.
Hey guys,
Maybe i'm just not good enough with C#, but for me it seems that the event manager.PackagesDownloadStarded is not fired.
My Code:
using nUpdate.Updating;
using System;
using System.Diagnostics;
using System.Globalization;
using System.Threading;
using System.Windows;
namespace KLauncher____Installer {
/// <summary>
/// Interaktionslogik für MainWindow.xaml
/// </summary>
public partial class MainWindow: Window {
public MainWindow() {
InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e) {
UpdateManager manager = new UpdateManager(new Uri("ServerURL"), "Key provide by nUpdate Administration", new CultureInfo("de-DE"));
manager.PackagesDownloadStarted += Manager_PackagesDownloadStarted;
var updaterUI = new UpdaterUI(manager, SynchronizationContext.Current);
updaterUI.ShowUserInterface();
manager.RestartHostApplication = false;
}
public void Manager_PackagesDownloadStarted(object sender, EventArgs e) {
MessageBox.Show("Event fired!");
}
}
}
Please tell what i'm doing wrong:)
Have nice easter days.
If I edit an update the operation "Replace file/folder" won't be shown. Other operations are visible.
I would like to use UpdaterVersion in following form:
0.0.0-a
or 0.0.0a
Make build
, revision
and developmentBuild
optional (defaults to 0).
How can i make it exit application when they click cancel.
I dont want users to be able to carry on if they dont update.
Thanks
The lastest nUpdate build in VS2015, some of the source code used the new C# feature, like "$",“??”,"?."
But many C# projects are based on .NET4.0.....
Hi,
I want to use nUpdate to update my executable app on launch. Currently have set my instance of the UpdateManager to have a "CloseHostApplication" of "true". However when I run the InstallPackage routine, nUpdate will attempt to overwrite my executable before it's had a chance to close causing it to open a dialog saying the update couldn't be completed.
Is there a way to delay the update from starting for a few seconds to allow time for the app to close?
Hi again,
I was wondering if it is possible to have an operation placed before the "Replace file/folder" operation.
For instance so I could stop a running Windows Service, replace the necessary files and restart it once completed?
I have tried CTRL+Up to push it above but this doesn't appear to be possible.
if you try it - you will get a error, too many arguments
a quick fix would be great :)
At the moment you can only import projects that have no statistics enabled. The reason is that the version-IDs can differ on the systems and there could be possible conflicts whit other projects that already have these IDs set as it's a Primary Key.
Hello,
Is there any documentation for this project at all? It looks nice from the screenshots but I can't find anything in the Wiki and the docs section on the Website is simply a listing of the types and namespaces.
Thank you!
It doesn't happen every time. But, every time this error occurs, the host app directory in Temp is always not cleared. So I added a log in MainForm.Fail(Exception ex)
,
like this:
System.IO.File.AppendAllText(@"D:\installerLog.txt", ex.StackTrace);
The StackTrace:
在 System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound) 在 System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) 在 nUpdate.UpdateInstaller.Updater.CleanUp()
I think it is it was caused by calling Directory.Delete
when the thread did not release the host app directory in 'Temp'.
P.S. It is difficult to cause this exception if the files in the update package are too small.
Since it often happens that the packages are similar (ie almost the same actions must be performed) would be a way to copy a package well.
Example: A button "Add copie" in the package administration which adds a package with the same actions and files but this package will not be saved but will just open as a dialog. Now you make only minor adjustments and saves the package.
If i try to make an update with an application that run as service i get the following exception :
System.ArgumentException: Der Pfad darf keine leere Zeichenfolge sein oder nur aus Leerzeichen bestehen.
bei System.IO.Directory.CreateDirectory(String path)
bei nUpdate.UpdateInstaller.Updater.CopyDirectoryRecursively(String sourceDirName, String destDirName)
while debugging or if running as normal ui application, the exception doesnt occurs
any ideas ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.