Resolved Warning Messages on publishing

robertb_NZ

Well-known member
Joined
May 11, 2010
Messages
146
Location
Auckland, New Zealand
Programming Experience
10+
My software is deployed from my web site using ClickOnce. When I published it I got various warning messages, however everything seems to be OK. Should I be concerned?

First there are some messages related to an IBM Add-in: -
1>------ Build started: Project: Jazz, Configuration: Debug x86 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "IBM.Data.DB2, Version=9.7.4.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208, processorArchitecture=x86", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
1>vbc : warning BC42372: Referenced assembly 'IBM.Data.DB2, Version=9.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208' targets a different processor.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3867,5): warning MSB3187: Referenced assembly 'C:\Program Files\IBM\SQLLIB\BIN\netf20\IBM.Data.DB2.dll' targets a different processor than the application.
1> Jazz -> C:\Users\Robertbw10\source\repos\Jazz\Jazz\bin\Debug\Jazz.exe
Building Jazz...

The output then continues with a couple of MSB3155 messages that seem to relate to ClickOnce publishing: -

2>------ Publish started: Project: Jazz, Configuration: Debug x86 ------
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5390,5): warning MSB3155: Item '.NETFramework,Version=v4.0,Profile=Client' could not be located in 'C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\'.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5390,5): warning MSB3155: Item 'Microsoft.Windows.Installer.3.1' could not be located in 'C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\'.
[/ICODE]

The build was successful, and when I clicked the link from the web site it downloaded and ran correctly.

From Help/About, I am using Visual Studio Community 2017, Version 15.9.13, with .NET Framework Version 4.1.03752.
The project's Target framework is set to .NET Framework 4. VS offers me versions up to 4.6.1
My laptop is running Windows 10 Pro, version 1903, on an x64-based processor.

So everything appears to be OK in spite of the messages, but I'm wondering if this might not be true for other users, e.g. with earlier OS or 32 bit systems. Would the messages disappear if I were to set the target framework to 4.6.1 (the latest)?

Thank you, Robert Barnes.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,439
Location
Norway
Programming Experience
10+
Why not install VS 2019 and use .Net 4.8? VS 2017 support up to .Net 4.7.2, you may have to use VS Installer and add Targeting Pack for it. Below 4.5.2 support ended in January 2016.

I'm not sure what to make of the reference warning, but you could try changing build to x64.

You can remove Windows Installer from Publish Prerequisites, it was only needed for Vista to install .Net Fw.
 

robertb_NZ

Well-known member
Joined
May 11, 2010
Messages
146
Location
Auckland, New Zealand
Programming Experience
10+
Thanks JohnH, I'll take your suggestion to install VS2019 and use .Net 4.8 for the next development round.

In the meantime I've been experimenting with some local builds, still with VS2017.

By changing Compile/Target CPU from X86 to X64 the messages related to the IBM DB2 support disappeared. The two MSB3155 messages remained.

By changing the Publish pre-requisites, removing the Windows Installer and checking Microsoft .NET Framework 4.6.2 (x86 and x64) I got rid of the MSB3155 messages

I believe that my software now requires a 64-bit Windows operating system, Windows 7 or later. Is that true? Not a problem, but I need to revise my documentation. I'm guessing that I've always had this requirement, at least since I implemented DB2 support, I just didn't realize it.

Thank you for your help John
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,439
Location
Norway
Programming Experience
10+
Windows 7 or later. Is that true?
Yes.
my software now requires a 64-bit Windows operating system
Yes.
I'm guessing that I've always had this requirement, at least since I implemented DB2 support, I just didn't realize it.
Hard to tell, especially by looking at IBM docs, but they seem to support both bitness. I find it odd that the reference claims it is x64 and worked with your previous x86 app. It could be some mixed-mode assembly that is oddly marked. Perhaps you could try changing build to AnyCpu? To see if warning returns or not. Note that 32bit is preferred for AnyCpu, even for 64bit Windows, this is a setting in Compile tab and not found in Configuration Manager.
 
Top Bottom