I am building a wixproject using Visual studio solution on Configuration= Release,Platform=x64
by unchecking x86 platform
to skip some dependency wix projects.
Is there a way to do the same using MSBuild command line?
Asked
Active
Viewed 380 times
-1

Sid Mhatre
- 3,272
- 1
- 19
- 38

Neethu Haridas
- 1
- 1
-
What do you mean exactly with 'unchecking x86 platform? If you're building x64 as you say you're doing, no x86 stuff should be considered. Are you just looking to pass properties on the commandline to build for x64, like `msbuild myproject /p:Configuration=Release;Platform=x64'? – stijn Nov 19 '18 at 19:33
-
unchecking x86 platform means - In Visual studio solution, there is an option to skip the platform x86 build by using VS configuration manager. – Neethu Haridas Nov 20 '18 at 08:43
-
Whatever changes made in Configuration manager are saved in the solution file, so also get applied for commandline builds. In other words; you shouldn't do anything special. – stijn Nov 20 '18 at 08:48
1 Answers
0
Skipping dependency wixproject using msbuild command line
Just like stijn said, you can specify the property in the command line when you build the project/solution file.
As we know, the property Platform=
project-level property, which we could set or override the specified project-level properties by -property:name=value
. Name is the property name and value is the property value.
Check the document MSBuild command-line reference for some more details.
So, to resolve this issue, you just need pass the property Platform=x64
in the command line, like:
MSBuild YourProjectPath.wixproj /property:Configuration=Release /property:Platform=x64
or use shorter form:
MSBuild YourProjectPath.wixproj /p:Configuration=Release /p:Platform=x64
Hope this helps.

Leo Liu
- 71,098
- 10
- 114
- 135
-
I have tried below command msbuild a.wixproj /p:Configuration=Release;Platform=X64. a.wixproj has some dependency wixproj not supporting x64 platform.So how can we skip those wixproject while building a.wixproj with platform x64? – Neethu Haridas Nov 20 '18 at 08:35
-
@NeethuHaridas, You can exclude projects at the solution level for a specific build configuration by using the Configuration Manager Dialog in Visual Studio:https://stackoverflow.com/questions/9778916/how-to-exclude-project-from-build-in-msbuild – Leo Liu Nov 20 '18 at 09:05
-
instead of visual studio configuration manager , Is there any way to exclude project through msbuild command line? – Neethu Haridas Nov 20 '18 at 09:07
-
@NeethuHaridas, Yes, there is no directly way to do this via command line. And all the settings in the visual studio configuration manager are saved in the project/solution file, if you have set this in the visual studio configuration manager, you do not specify it on the command line. – Leo Liu Nov 20 '18 at 09:12
-
I am not using visual studio solution for build, I am calling wix project directly from msbuild command line. – Neethu Haridas Nov 20 '18 at 09:36
-
@NeethuHaridas, Got it, so what is your problem now? Exclude project through msbuild command line? If yes, this issue is not the same problem as you post in this thread, you should open a new thread with the new problem. One question one thread is recommended. – Leo Liu Nov 20 '18 at 09:55
-
@NeethuHaridas, But I still don't know what your current problem is? Is the problem solved in the post? If not, then the question is now? If it's solved, then you have a new problem, as I said, close this one and open a new post. – Leo Liu Nov 20 '18 at 10:03
-
My problem is not solved yet. I want to build wixproject directly through command line without using visual studio. – Neethu Haridas Nov 20 '18 at 11:24
-
@NeethuHaridas, I know it, we have been discussing it all the time. So your problem is build wixproject directly through command line **Exclude** one project? Am I right? Or you just build the project through command line? The command line is not use MSBuild command line `MSBuild YourProjectPath.wixproj /p:Configuration=Release /p:Platform=x64`? – Leo Liu Nov 20 '18 at 12:33
-
@NeethuHaridas, Not working? What is the result? Any error message? You really should share the question, what have your tried and the result. Or I have to ask again and again. – Leo Liu Nov 21 '18 at 06:12
-
Some of the dependency wixproject are failing with below error C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(508,7): error : The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='Release' Platform='x64' – Neethu Haridas Nov 21 '18 at 06:19
-
Check this thread:https://stackoverflow.com/questions/9086795/the-outputpath-property-is-not-set-for-this-project/25973557#25973557 – Leo Liu Nov 21 '18 at 06:32