2013-04-09 27 views
10

Tôi đang nâng cấp ứng dụng từ .NET3.5/EF3.5 lên .NET4.5/EF5, sử dụng Visual Studio 2012.Làm cách nào để tôi có thể xuất bản một lần nhấp để hoạt động sau khi nâng cấp lên .NET framework 4.5

One-click xuất bản chạy, nhưng tạo ra những thông điệp cảnh báo sau đây:

  • Item Microsoft.Windows.Installer.3.1 'không thể được đặt trong 'C: \ Program Files (x86) \ Microsoft SDKs \ Windows \ v8.0A \ Bootstrapper \ '.
  • Mục 'Windows Installer 4.5' được yêu cầu bởi '.NET Framework 3.5 SP1', nhưng không được bao gồm.

Khi tôi cố gắng để cài đặt các phiên bản được xuất bản, tôi nhận được một Dialog nói

  • không thể bắt đầu ứng dụng
  • Không thể tải ứng dụng. Ứng dụng bị thiếu các tệp bắt buộc. Liên hệ với nhà cung cấp ứng dụng để được hỗ trợ.

Nhấp vào "Details ..." nút trên hộp thoại cung cấp cho các văn bản mà tôi sẽ dán dưới đây (tôi đã thay thế tên tôi với "...")

Tôi đã kiểm tra rằng c: \ Program Fiels (x86) \ Microsoft SDK \ Windows \ v8.0A \ Bootstrapper tồn tại. Nó có ba thư mục, có tên là "Engine", "Packages" và "Schemas" và không có nội dung nào khác.

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. 

Trả lời

30

Tôi đã bỏ lỡ một bước nhắm mục tiêu lại đến .NET 4.5. Tôi đã phải điều chỉnh các điều kiện tiên quyết như sau:

  • Mở cửa sổ Thuộc tính dự án . (Nhấp vào "Dự án của tôi")
  • Nhấp vào Điều kiện tiên quyết.
  • Bỏ chọn ".NET Framework 3.5 (Hoặc bất kỳ phiên bản .NET framework cũ khác. Đặc biệt là nếu nó có biểu tượng này Yellow triangle with exclamation mark.
  • Kiểm tra " .NET Framework 4.5 (x86 và x64)."
  • Bỏ chọn "Windows Installer 3.1".
  • Kiểm tra "Windows Installer 4.5".
+1

Điều kiện tiên quyết nằm trong Thuộc tính dự án -> Xuất bản trong VS2015 –

2

Tôi gặp lỗi này và giải pháp đã làm việc cho tôi. Tôi chỉ cần bỏ chọn Windows Installer 3.1 và kiểm tra Windows Installer 4.5 để loại bỏ cảnh báo này.