1
votes

This is a ClickOnce build. It works fine for .NET 4.5.1. .NET 4.6.1 SDK is installed. MS Visual Studio 2015 Update 2 installed. Windows 7 is the OS.

The GenericBootstrapper is: "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper" with a 12.0 and 14.0 also.

  • In the project files I changed the ToolsVersion from 12.0 to 14.0.
  • I changed the TargetFrameworkVersion to 4.6.1.
  • And the bootstrapper to:
<BootstrapperPackage Include="Microsoft.Net.Framework.4.6.1">
  <Visible>False</Visible>
  <ProductName>Microsoft .NET Framework 4.6.1 (x86 and x64)</ProductName>
  <Install>true</Install>
</BootstrapperPackage>

Here's a warning from the log:

C:\windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(4513,5): warning MSB3155: Item 'Microsoft.Net.Framework.4.6.1' could not be located in 'C:\tm1\HE\HE.Manager'. [C:\tm1\HE\HE.Manager\HE.Managercopy.csproj]

Here's the error log:

C:\windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(4513,5): error MSB3147: Could not find required file 'setup.bin' in 'C:\tm1\HE\HE.Manager\Engine'. [C:\tm1\HE\HE.Manager\HE.Managercopy.csproj]

Why is this happening with 4.6.1?

In our batch file here's our MSBuild call:

frameworkPath="C:\Windows\Microsoft.NET\Framework64\v4.0.30319"

%frameworkPath%\msbuild %PROJECT_NAME%copy.csproj /target:publish /property:......

This doesn't work properly with .NET 4.6.1. We get the error I mentioned in my first post.

In my registry

"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper"

if I add a 4.0 item with a path "C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\" it works.

Why is it not using the registry item

"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper\14.0"

?

Also......

If I change the frameworkPath to...

frameworkPath="C:\Program Files (x86)\MSBuild\14.0\Bin"

%frameworkPath%\msbuild %PROJECT_NAME%copy.csproj /target:publish /property:......

and run the MSBuild call it works.

I've reinstalled the .NET 4.6.1 SDK and still no luck.

2

2 Answers

1
votes

We decided to change the MSBuild directory to:

'frameworkPath="C:\Program Files (x86)\MSBuild\14.0\Bin"'

. Using the old `

'frameworkPath="C:\Windows\Microsoft.NET\Framework64\v4.0.30319"'

` seemed like its MSBuild just couldn't find the correct tools to use; even changing the ToolsVersion attribute in the project files to 14.0.

It only worked if I created a new registry

'HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper\4.0' and added a path of 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\'

. Which by the way is the same path for

'HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper\14.0', but was too hacky for us.

Problem solved.

0
votes

Sounds like Microsoft experienced some issue to make the process smooth, so that they published a KB article,

https://support.microsoft.com/en-us/kb/3119510

Roughly speaking you need to manually fix the paths/files and so on.

Well, before executing the steps, roll back your previous changes.