Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get one-click publishing to work after upgrading to .NET framework 4.5

I am upgrading an app from .NET3.5/EF3.5 to .NET4.5/EF5, using Visual Studio 2012.

One-click publishing runs, but generates the following warning messages:

  • Item 'Microsoft.Windows.Installer.3.1' could not be located in 'C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\'.
  • Item 'Windows Installer 4.5' is required by '.NET Framework 3.5 SP1', but was not included.

When I try to install the published version, I get a Dialog saying

  • Cannot Start Application
  • Cannot download the application. The application is missing required files. Contact application vendor for assistance.

Clicking the "Details..." button on the dialog gives the text that I will paste below (I replaced my username with "...")

I have checked that c:\Program Fiels (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper exists. It three folders, named "Engine", "Packages", and "Schemas", and no other content.

PLATFORM VERSION INFO
Windows             : 6.1.7601.65536 (Win32NT)
Common Language Runtime     : 4.0.30319.18034
System.Deployment.dll       : 4.0.30319.17929 built by: FX45RTMREL
clr.dll             : 4.0.30319.18034 built by: FX45RTMGDR
dfdll.dll           : 4.0.30319.17929 built by: FX45RTMREL
dfshim.dll          : 4.0.41209.0 (Main.041209-0000)

SOURCES
Deployment url          : file:///C:/Users/.../AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.IE5/56DYV716/Security%20Management%20System.application

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\...\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\56DYV716\Security Management System.application resulted in exception. Following failure messages were detected:
    + Downloading file:///C:/Users/.../AppData/Local/Microsoft/Windows/Temporary Internet Files/Content.IE5/56DYV716/Security Management System.application did not succeed.
    + Could not find file 'C:\Users\...\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\56DYV716\Security Management System.application'.
    + Could not find file 'C:\Users\...\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\56DYV716\Security Management System.application'.
    + Could not find file 'C:\Users\...\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\56DYV716\Security Management System.application'.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [4/9/2013 3:04:00 PM] : Activation of C:\Users\...\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\56DYV716\Security Management System.application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [4/9/2013 3:04:01 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
    - Downloading file:///C:/Users/.../AppData/Local/Microsoft/Windows/Temporary Internet Files/Content.IE5/56DYV716/Security Management System.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)
        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\...\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\56DYV716\Security Management System.application'.
    - Source: System
    - Stack trace:
        at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
        at System.Net.FileWebRequest.GetResponse()
        at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
    --- Inner Exception ---
    System.Net.WebException
    - Could not find file 'C:\Users\...\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\56DYV716\Security Management System.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\...\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\56DYV716\Security Management System.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.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
        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.
like image 618
Tim Avatar asked Apr 09 '13 19:04

Tim


People also ask

How do I publish a .NET Framework application?

Deploy a . NET Windows Desktop application using ClickOnce - Visual Studio (Windows) Starting in Visual Studio 2019 version 16.8, you can use the Publish tool to publish . NET Core 3.1 or later Windows Desktop applications using ClickOnce from Visual Studio.

How do I publish a solution in Visual Studio 2022?

Right-click on the project (not the solution) in Solution Explorer and select Publish. In the Publish tab, select Publish. Visual Studio writes the files that comprise your application to the local file system.

What is ClickOnce bootstrapper package for Microsoft .NET Framework?

The . NET Framework 4.6 ClickOnce Bootstrapper package updates the prerequisite components list in Visual Studio 2013 by installing the required files that enable Visual Studio 2013 to offer the . NET Framework 4.6 entry in the list of available prerequisites. When it is available, you can select the .

What must be installed on a client computer to run NET based applications?

. Net framework is required for machines hosting ASP.Net application. Client only gets HTML/Javascript/CSS, Stuff which client's browser can handle. No server side code is executed on client.


2 Answers

I missed a step in retargeting to .NET 4.5. I had to adjust prerequisites as follows:

  • Open the Project Properties window. (Click on "My Project")
  • Click Prerequisites.
  • Uncheck ".NET Framework 3.5 (Or any other old .NET framework version. Especially if it has this icon Yellow triangle with exclamation mark.
  • Check ".NET Framework 4.5 (x86 and x64)."
  • Uncheck "Windows Installer 3.1".
  • Check "Windows Installer 4.5".
like image 93
Tim Avatar answered Oct 22 '22 07:10

Tim


I had this error and the solution worked for me. I only needed to uncheck Windows Installer 3.1 and check Windows Installer 4.5 to remove this warning.

like image 42
Robert Drummey Avatar answered Oct 22 '22 06:10

Robert Drummey