Auteur de questions
Problème d'installation

Discussion générale
-
Bonjour
J'ai une application développée sous VS2017 Coommunity que j'ai déployée avec ClickOnce sur un répertoire DropBox\GestionToponymes dans lequel se trouvent un setup.exe avec les fichiers associés.
Quand j’essaie de l'installer sur mon PC, cela marche très bien.
J'ai un utilisateur qui n'arrive pas à l'installer et qui obtient une erreur dont le log suit.
Que se passe-t-il ?
Pourquoi le setup cherche des fichiers sur le PC de l'utilisateur et non à partir du répertoire de dépoiement?
Merci pour votre aide.
Bernard
PLATFORM VERSION INFO
Windows : 10.0.14393.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.6.1586.0 built by: NETFXREL2
clr.dll : 4.6.1586.0 built by: NETFXREL2
dfdll.dll : 4.6.1586.0 built by: NETFXREL2
dfshim.dll : 10.0.14393.0 (rs1_release.160715-1616)
SOURCES
Deployment url : file:///C:/Users/Georges/Downloads/GestionToponymes.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\Georges\Downloads\GestionToponymes.application resulted in exception. Following failure messages were detected:
+ Downloading file:///C:/Users/Georges/Downloads/GestionToponymes.application did not succeed.
+ Could not find file 'C:\Users\Georges\Downloads\GestionToponymes.application'.
+ Could not find file 'C:\Users\Georges\Downloads\GestionToponymes.application'.
+ Could not find file 'C:\Users\Georges\Downloads\GestionToponymes.application'.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [17-02-17 14:41:07] : Activation of C:\Users\Georges\Downloads\GestionToponymes.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [17-02-17 14:41:07] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file:///C:/Users/Georges/Downloads/GestionToponymes.application did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState, X509Certificate2 clientCertificate)
at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- Could not find file 'C:\Users\Georges\Downloads\GestionToponymes.application'.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.WebException
- Could not find file 'C:\Users\Georges\Downloads\GestionToponymes.application'.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.GetResponseCallback(Object state)
--- Inner Exception ---
System.IO.FileNotFoundException
- Could not find file 'C:\Users\Georges\Downloads\GestionToponymes.application'.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Bernard Bouree
- Type modifié Nina ZaekovaMicrosoft contingent staff, Moderator lundi 13 mars 2017 08:25
Toutes les réponses
-
Il semble que la référence locale C:\Users\Georges\Downloads\GestionToponymes.application n'existe pas pour l'utilisateur...
Si cela marche sur votre machine c'est que la référence locale existe.
Vous devez changer les références locales "C:\..." en référence relative au dossier d'installation.
-
-
-
Bonjour,
Si votre programme utilise un fichier (texte par exemple) vous devez procéder comme suit:
Incorporez votre fichier au projet.
Dans l'onglet propriétés =>
Action de génération : contenu
Copier dans le répertoire de sortie: Toujours copier
Dans l'onglet Publier => fichier d'application, vous voyez apparaitre votre fichier.
Pour l'utiliser:
string l_Exe = System.Reflection.Assembly.GetEntryAssembly().Location;
string l_RepExe = System.IO.Path.GetDirectoryName(l_Exe);
string l_NomF = System.IO.Path.Combine(l_RepExe, "listeTxt.txt");
if (System.IO.File.Exists(l_NomF))
{
//...
}Cordialement
Gérard
-