Skip to content

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

Open
@miguellira

Description

@miguellira

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 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 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:
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.2348200">
    <PropertyGroup>
        <StartupCommand>npm start</StartupCommand>
        <JavaScriptTestFramework>Jasmine</JavaScriptTestFramework>
        <ShouldRunBuildScript>false</ShouldRunBuildScript>
        <BuildOutputFolder>$(MSBuildProjectDirectory)\dist\esproj-bug\browser</BuildOutputFolder>
    </PropertyGroup>
</Project>
  1. Run npm init and generate a package.json
  2. 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

Metadata

Metadata

Assignees

Labels

Area-esprojIssues related to the Javascript project systemuntriagedRequest triage from a team member

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions