dotnet / dotnet/msbuild

'MSBuildExtensionsPath' appends a '\' backslash in .NET Core mode.

Open
#3,045 5 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 6h
Merged PRs (30d)
139

Description

### Steps to reproduce

Set to any simple project in a directory and execute `msbuild` and `dotnet msbuild`

```cmd
:: .NET Framework edition
msbuild /bl /t:Restore
```
```cmd
:: .NET Core edition
dotnet msbuild /bl /t:Restore
```

Examine the `.binlog` file using [`MSBuild Structured Log Viewer`](/KirillOsenkov/MSBuildStructuredLog).

#### .NET Core mode:
![.NET Core mode](https://user-images.githubusercontent.com/4962580/36947255-633c20ba-1fef-11e8-84d8-28beb1bd9d18.png)

#### .NET Framework mode:
![.NET Framework mode](https://user-images.githubusercontent.com/4962580/36947313-24179a26-1ff0-11e8-8d31-22f436384016.png)

### Expected behavior
`MSBuildExtensionsPath` should not have `\` backslash at the end!

### Actual behavior
`MSBuildExtensionsPath` has `\` backslash at the end only when run in .NET Core mode!

### Environment data
`dotnet msbuild /version`:
```
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

15.5.180.51428
```

`msbuild /version`:
```
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

15.5.180.51428
```

OS info:

`dotnet --info`
```
.NET Command Line Tools (2.1.4)

Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190

Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.4\

Microsoft .NET Core Shared Framework Host

Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.