cake-build / cake-build/cake

Cake MSBuild MSBuildPlatform.x86 not working with WithProperty("OutDir" correctly, only builds to local bin directory of project

Open
#2,797 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.2k
Forks
778
Avg merge
1h 15m
Merged PRs (30d)
19

Description

### What You Are Seeing?
When calling MSBuild, the MSBuildSettings class does not work properly when trying to set an "OutDir" property when executing MSBuildPlatform = MSBuildPlatform.x86

I created a reporting services project, and went to call MSBuild and it did not work. It is required to execute MSBuild against Reporting Services(SSRS) projects as x86. When setting this value, it actually will only build to the bin directory of the project even though the OutDir is set with the WithPropery("OutDir", "C:\SomeLocation") as part of the MSBuildSettings argument of the MSBuild method in Cake.

### What is Expected?
I was expecting the output to go to the OutDir property I set when calling MSBuild.

### What version of Cake are you using?
0.34.1.0

### Are you running on a 32 or 64 bit system?
64 Bit
### What environment are you running on? Windows? Linux? Mac?

### Are you running on a CI Server? If so, which one?
Azure DevOps

### How Did You Get This To Happen? (Steps to Reproduce)

public static class Settings
{
public static readonly MSBuildSettings ReportingMSBuildSettings = new MSBuildSettings()
{
MSBuildPlatform = MSBuildPlatform.x86

}.WithProperty("OutDir", Paths.ReportingDirectory);
}

MSBuild("..\\CompanyName.ProjectName.Reports\\CompanyName.ProjectName.Reports.rptproj", Settings.ReportingMSBuildSettings);

### Output Log

Contributor guide

Open the contributing guide

Research direction

Start with MSBuildSettings and the MSBuildPlatform.x86 handling, then reproduce the issue using the provided MSBuild call for the .rptproj and the OutDir property. Done means an x86 MSBuild invocation sends its output to the configured OutDir instead of the project's local bin directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.