cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mr_Andersson
Level 2

error Building with MSBuild, msb4096 does not define a value for metadata "Platform"

I have this problem in a huge solution, but I managed to recreate the same problem with just some new practically empty projects.

There are 3 projects
1: "prjA"------------------is a console application
2: "prjFuscate"----------is a DotFuscator project, whose input is "prjA"
3: "MSI6000"-------------is a IS2016 basic msi project, only thing I did was add the output from "prjFuscate" to a destination folder under "Files and Folders"

in the VS Configuration manager, they all have "Release", defined under "Configuration".
Under "Platform" prjA has "Any CPU" defined, prjFuscate and MSI6000, are blank, since it's not possible to select.

My solution file is called "Test.sln"

I run MSbuild with these parameters:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" Test.sln /target:rebuild /p:"Configuration=Release" /p:WarningLevel=0

And it all fails with:

C:\Program Files (x86)\MSBuild\InstallShield\2016\InstallShield.targets(14,3):
error MSB4096: The item "..\prjA\prjFuscate.dotfuproj" in item list "_ConfiguredProjectReference" does not define a value for metadata "Platform".
In order to use this metadata, either qualify it by specifying %(_ConfiguredProjectReference.Platform), or ensure that all items in this list define a value for this metadata.

I've been googling all day and trying out stuff, but with no luck.
Labels (1)
0 Kudos
(1) Reply
mr_Andersson
Level 2

Today i tried removing the installshield project and replace it with a "Visual Studio Installer" type project. I added the output from prjFuscate, and it built fine.

I figure there is an error in either the

Installshield project file

or

InstallShield.targets file(which is added by Installshield to MSBuild folder)
0 Kudos