Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2012 升级到.NET framework 4.5后,如何让一键发布工作_Visual Studio 2012_.net 4.5_Publishing_Oneclick - Fatal编程技术网

Visual studio 2012 升级到.NET framework 4.5后,如何让一键发布工作

Visual studio 2012 升级到.NET framework 4.5后,如何让一键发布工作,visual-studio-2012,.net-4.5,publishing,oneclick,Visual Studio 2012,.net 4.5,Publishing,Oneclick,我正在使用Visual Studio 2012将应用程序从.NET3.5/EF3.5升级到.NET4.5/EF5 一键发布运行,但会生成以下警告消息: 在中找不到项目“Microsoft.Windows.Installer.3.1” “C:\Program Files(x86)\Microsoft SDK\Windows\v8.0A\Bootstrapper\” “.NET Framework 3.5 SP1”需要“Windows Installer 4.5”项, 但没有包括在内 当我尝试安

我正在使用Visual Studio 2012将应用程序从.NET3.5/EF3.5升级到.NET4.5/EF5

一键发布运行,但会生成以下警告消息:

  • 在中找不到项目“Microsoft.Windows.Installer.3.1” “C:\Program Files(x86)\Microsoft SDK\Windows\v8.0A\Bootstrapper\”
  • “.NET Framework 3.5 SP1”需要“Windows Installer 4.5”项, 但没有包括在内
当我尝试安装发布的版本时,会出现一个对话框

  • 无法启动应用程序
  • 无法下载应用程序。应用程序缺少必需的文件。联系应用程序供应商以获得帮助
单击对话框上的“详细信息…”按钮,我将在下面粘贴文本(我将我的用户名替换为“…”)

我已检查是否存在c:\Program Fiels(x86)\Microsoft SDK\Windows\v8.0A\Bootstrapper。它包含三个文件夹,分别名为“引擎”、“包”和“模式”,没有其他内容

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.

我在重新定位到.NET4.5时错过了一步。我必须调整以下先决条件:

  • 打开“项目属性”窗口。(单击“我的项目”)
  • 单击先决条件。
  • 取消选中.NET Framework 3.5(或任何其他旧的.NET Framework版本)。特别是如果它有此图标
  • 选中“.NET Framework 4.5(x86和x64)。”
  • 取消选中“Windows Installer 3.1”。
  • 选中“Windows Installer 4.5”。

我遇到了此错误,解决方案对我有效。我只需取消选中Windows Installer 3.1和Windows Installer 4.5即可删除此警告。

先决条件位于Visual Studio 17的“项目属性->在VS2015中发布”下,路径为“我的项目>发布>先决条件”(按钮)。然后取消选中Windows Installer 3.1。