在Visual Studio 2012中,ClickOnce在何处“发布"?希望找到.Net 4客户端配置文件? [英] In Visual Studio 2012 where does ClickOnce "Publish" expect to find the .Net 4 client profile?

查看:124
本文介绍了在Visual Studio 2012中,ClickOnce在何处“发布"?希望找到.Net 4客户端配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦安装了Visual Studio 2012,发布功能便停止工作.发布找不到必备的Microsoft .Net Framework 4客户端配置文件(x86和x64).以前在Visual Studio 2010中可以正常工作.我使用64位Windows 7.

The Publish feature stopped working once I installed Visual Studio 2012. Publish cannot find the prerequisite Microsoft .Net Framework 4 Client Profile (x86 and x64). Previously in Visual Studio 2010 this worked fine. I use 64-bit Windows 7.

确切的Visual Studio 2012错误消息显示为:

The exact Visual Studio 2012 error message reads:

Error 104 - To enable 'Download prerequisites from the same location 
as my application' in the Prerequisites dialog box, you must download file
'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe' for item 'Microsoft .NET 
Framework 4 Client Profile (x86 and x64)' to your local machine. For more 
information, see http://go.microsoft.com/fwlink/?LinkId=239883

我将文件dotNetFx40_Client_setup.exe放置在以下位置: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\DotNetFX40Client

I placed the file dotNetFx40_Client_setup.exe in the location: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\DotNetFX40Client

我也将其保留在其原始位置(请注意v7.0A):

I also left it in it's original location (note the v7.0A):

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40Client

编辑(解决问题后)::我看到正确的安装文件( dotNetFx40_Client_x86_x64.exe )实际上位于v7.0A文件夹中.如果我只是从那里复制它,一切都会正常进行(而不是下载错误的设置).

Edit (after solving the problem): I see that the correct setup file (dotNetFx40_Client_x86_x64.exe) is actually in the v7.0A folder. Had I just copied it from there everything would have worked (rather than downloading the wrong setup).

将选项从与应用程序相同的位置下载必备组件"更改为从组件供应商的网站下载必备组件"时,发布工作正常(在项目属性->发布->必备组件...上)

Publish works fine when I change the option "Download prerequisites from the same location as my application" to "Download prerequisites from the component vendor's website" (at project Properties -> Publish -> Prerequisites...)

我注意到(选中的)"Windows Installer 3.1"旁边有一个黄色的感叹号,警告:找不到引导的先决条件".为此,我在文件夹中有文件WindowsInstaller-KB893803-v2-x86.exe:

I noticed a yellow exclamation point beside the (checked) "Windows Installer 3.1" with the warning: "Prerequisite could not be found for bootstrapping". For that I have the file WindowsInstaller-KB893803-v2-x86.exe in the folder:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\WindowsInstaller3_1

在过去一年中,使用Visual Studio 2010发布时,该应用程序在我公司的网络中运行良好.我在VS 2012中首次打开了解决方案文件,并且可以在本地编译和运行.仅发布功能被破坏.

The application has run fine within my company's network for the past year when published with Visual Studio 2010. I opened the solution file in VS 2012 (for the first time) and it compiles and runs fine locally. Only the Publish feature is broken.

我错过了什么吗? ClickOnce Publish在哪里可以找到我的WPF应用程序的这些先决条件?

推荐答案

我正在回答自己的问题.当我使用其他的.Net 4 Client安装程序时,问题消失了.适用于我的exe是 dotNetFx40_Client_x86_x64.exe ,位于:

I'm answering my own question. The problem went away when I used a different .Net 4 Client setup program. The exe that works for me is dotNetFx40_Client_x86_x64.exe found at:

http://www.microsoft.com/zh-CN -us/download/details.aspx?id = 24872

错误的安装程序是dotNetFx40_Client_setup.exe,它是通过遵循Microsoft MSDN帮助主题如何:在ClickOnce应用程序(Visual Studio 2012)中包含先决条件,这导致我此链接指向设置.我使用Chrome浏览器下载了Web安装程序,但我没有意识到这不是我需要的文件.如果我一直在使用IE,这一切都不会发生.我被

The wrong setup program is dotNetFx40_Client_setup.exe which I was led to by following the Microsoft MSDN help topic How to: Include Prerequisites with a ClickOnce Application (Visual Studio 2012) which led me to this link to the setup. I use Chrome which downloaded the web installer which I didn't realize was not the file I needed. Had I been using IE none of this would have happened. I was clued into the problem by this StackOverflow question which suggests renaming the setup program. Instead of renaming it I just downloaded the correct one.

这篇关于在Visual Studio 2012中,ClickOnce在何处“发布"?希望找到.Net 4客户端配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆