In Visual Studio 2012 where does ClickOnce "Publish" expect to find the .Net 4 client profile?
Asked Answered
S

2

4

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.

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

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

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

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...)

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

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.

Am I missing something? Where is ClickOnce Publish expecting to find these prerequisites for my WPF application?

Solicitude answered 15/3, 2013 at 16:5 Comment(2)
It's not clear if you're still trying to publish from VS 2010 or if you are trying to publish a .NET 4 app from VS 2012?Woodchopper
VS 2012 doesn't work. For a year this worked in VS 2010 before I upgraded to VS 2012. I'll clarify the question.Solicitude
S
6

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/en-us/download/details.aspx?id=24872

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.

Solicitude answered 15/3, 2013 at 17:32 Comment(2)
Good catch, the dotNetFx40_Client_setup.exe is the web installer, it's only 800Kb so it was obviously not a valid .NET 4 installer...Woodchopper
That explains it. I'm using Chrome. It downloaded the web installer and I assumed it downloaded the installer I needed. Had I been using IE I wouldn't have stumbled over this issue. Thanks!Solicitude
F
0

re: Windows installer: VS2012 doesn't include the same prerequisites as VS2010, but you can copy the package from the previous SDK folders to the new one, and it will magically show up in the prerequisite list in VS2012 and work!

Focus answered 7/4, 2013 at 1:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.