dotnet / dotnet/sdk

Building a `Microsoft.VisualStudio.JavaScript.SDK` on OS X results in a folder named `obj\Release`

Open
#46,465 7 comments 2 reactions 1 assignee Claimed by @joeloff View on GitHub
Area-esproj untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Describe the bug
When building an `.esproj` project on OS X the generated artifacts includes two `package.g.props` files. One in the `obj` folder and another in a similar folder that includes a backslash `obj\Release`:

Image

As a result, the following `.gitignore` entry which excludes the folder by escaping the backslash is **required**:

```
# Weird esproj bug
obj\\Release
```

otherwise during a clean build of an Angular SPA template a TypeScript error similar to the one documented [here](https://github.com/angular/angular-cli/issues/28936) is thrown.

**Note:** In addition, (but _completely_ unrelated to the bug) it would be nice if the JavaScript SDK supported the new [Artifacts output layout](https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output) introduced in .NET 8.

### To Reproduce
1. Create a folder named `esproj-bug`.
2. Create a `.esproj` file inside the folder with the following content:
```xml


npm start
Jasmine
false
$(MSBuildProjectDirectory)\dist\esproj-bug\browser

```
3. Run `npm init` and generate a `package.json`
4. Run `dotnet build`

### Exceptions (if any)
No exception is thrown during build, however, when building an `Angular v19` solution a TypeScript error is thrown if that `obj\Release` folder exists.

### Further technical details
`dotnet --info`
```
.NET SDK:
Version: 9.0.100
Commit: 59db016f11
Workload version: 9.0.100-manifests.3068a692
MSBuild version: 17.12.7+5b8665660

Runtime Environment:
OS Name: Mac OS X
OS Version: 15.3
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/9.0.100/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.0
Architecture: arm64
Commit: 9d5a6a9aa4

.NET SDKs installed:
9.0.100 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
```

**Visual Studio Code**
```
Version: 1.96.4 (Universal)
Commit: cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
Date: 2025-01-16T00:16:19.038Z (2 wks ago)
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.3.0
```

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.