Skip to content

refactor(esproj): drop Microsoft.VisualStudio.JavaScript.Sdk shims#11

Merged
ANcpLua merged 1 commit into
mainfrom
refactor/esproj-drop-js-sdk-shims
May 12, 2026
Merged

refactor(esproj): drop Microsoft.VisualStudio.JavaScript.Sdk shims#11
ANcpLua merged 1 commit into
mainfrom
refactor/esproj-drop-js-sdk-shims

Conversation

@ANcpLua
Copy link
Copy Markdown
Owner

@ANcpLua ANcpLua commented May 12, 2026

Summary

Follow-up to #10. Replace both PaperlessUI.{Angular,React}.esproj files with the qyl hand-rolled MSBuild pattern (qyl/services/qyl.dashboard/qyl.dashboard.esproj), adapted for pnpm. No more <Project Sdk=...>; custom Restore/Build/Test/Clean targets shell to pnpm only when RunFrontendOnBuild=true, defaulting to no-op so the CI frontend jobs remain the single source of truth.

Why

Everything in the old esproj existed only to neutralize the JS SDK:

<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.5483906">  <!-- bumped in #10 -->
  <PropertyGroup>
    <StartupCommand>pnpm run start</StartupCommand>            <!-- VS-Windows launcher only -->
    <JavaScriptTestRoot>src\</JavaScriptTestRoot>              <!-- VS Test Explorer only -->
    <JavaScriptTestFramework>Jasmine</JavaScriptTestFramework> <!-- ditto -->
    <ShouldRunBuildScript>false</ShouldRunBuildScript>         <!-- neutralize SDK npm run build -->
    <ShouldRunNpmInstall>false</ShouldRunNpmInstall>           <!-- neutralize SDK npm install -->
    <BuildOutputFolder>$(MSBuildProjectDirectory)\dist\paperless-ui-angular</BuildOutputFolder>
    <!--                                          ^ backslashes leaked literal 'obj\Debug' folders on macOS -->
  </PropertyGroup>
</Project>

Plus the <Build Solution="Debug|*"/> opt-in I added in #10 to Paperless.slnx was only needed because the JS SDK skips projects not explicitly selected per config.

The bootstrap commit (02ce2b3 feat: bootstrap Paperless, 2026-05-12 01:34) hand-typed SDK version 1.0.1641815 — a VS-Windows internal build from the IDE's private NuGet feed, never published to nuget.org. That's why dotnet build outside VS-Windows initially failed to resolve it. Dropping the SDK entirely removes the version-pinning fragility for good.

What changes

File Change
PaperlessUI.Angular/PaperlessUI.Angular.esproj Hand-rolled — no Sdk=, pnpm-shelling targets, source tree exposed via <None Include="src/**/*"/>
PaperlessUI.React/PaperlessUI.React.esproj Same pattern
Paperless.slnx Drop `<Build Solution="Debug

Test plan

🤖 Generated with Claude Code

Replace both PaperlessUI.{Angular,React}.esproj projects with the qyl
hand-rolled MSBuild pattern (qyl/services/qyl.dashboard/qyl.dashboard.esproj),
adapted for pnpm. No more <Project Sdk=...>; custom Restore/Build/Test/Clean
targets shell to pnpm only when RunFrontendOnBuild=true, defaulting to no-op
so CI's dedicated frontend jobs remain the single source of truth.

Removes the entire shim stack that existed only to neutralize the JS SDK:
  - <Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.5483906">
  - <ShouldRunBuildScript>false</ShouldRunBuildScript>
  - <ShouldRunNpmInstall>false</ShouldRunNpmInstall>
  - <JavaScriptTestRoot>src\</JavaScriptTestRoot>           (VS-Windows only)
  - <JavaScriptTestFramework>Jasmine|Vitest</...>           (VS-Windows only)
  - <BuildOutputFolder>$(MSBuildProjectDirectory)\dist\...> (backslashes leaked
    literal 'obj\Debug' folders on macOS/Linux every time dotnet build ran)
  - <Build Solution="Debug|*"/> opt-in in Paperless.slnx (only needed because
    the JS SDK ignored projects that weren't explicitly selected per config)

The bootstrap commit (02ce2b3, today 01:34 UTC+2) hand-typed SDK version
1.0.1641815, which is a Visual Studio Windows internal build number from the
IDE's private NuGet feed and never published to nuget.org — that's why
dotnet build outside VS-Windows failed to resolve it. Dropping the SDK
entirely removes the version-pinning fragility for good.

Both projects still surface their source trees to Rider's solution explorer
via <None Include="src/**/*"/> etc., and 'dotnet build Paperless.slnx'
remains green (0 errors). Real frontend builds keep happening in the pnpm CI
jobs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 12, 2026 13:26
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (3)
  • Paperless.slnx is excluded by none and included by none
  • PaperlessUI.Angular/PaperlessUI.Angular.esproj is excluded by none and included by none
  • PaperlessUI.React/PaperlessUI.React.esproj is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7cd7e57f-8efa-4075-954c-3a84bd02ef63

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the frontend .esproj projects to remove the dependency on Microsoft.VisualStudio.JavaScript.Sdk, replacing it with minimal hand-rolled MSBuild targets that default to no-ops (keeping CI pnpm jobs as the build source of truth) while still allowing dotnet build Paperless.slnx and IDE project-tree discovery.

Changes:

  • Replaced both frontend .esproj files with non-SDK MSBuild projects that expose the source tree via <None Include=...> and provide opt-in pnpm Build behavior behind RunFrontendOnBuild=true.
  • Added no-op Restore/Test targets and a Clean target that removes the dist directory.
  • Simplified Paperless.slnx entries for the frontend projects by removing the Debug-only <Build .../> opt-in blocks.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
PaperlessUI.React/PaperlessUI.React.esproj Drops JS SDK usage; adds hand-rolled MSBuild targets and item globs for project visibility.
PaperlessUI.Angular/PaperlessUI.Angular.esproj Same hand-rolled MSBuild pattern for the Angular frontend.
Paperless.slnx Removes per-config `<Build Solution="Debug

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +26
<Message Text="[PaperlessUI.React] Restore is a no-op; pnpm install runs in the CI frontend job." Importance="low"/>
</Target>

<Target Name="Build" DependsOnTargets="Restore">
<Message Text="[PaperlessUI.React] Build is a no-op; pnpm run build runs in the CI frontend job." Importance="low"/>
<Exec Command="$(PnpmExe) install --frozen-lockfile=false" WorkingDirectory="$(FrontendRoot)" Condition=" '$(RunFrontendOnBuild)' == 'true' "/>
Comment on lines +21 to +26
<Message Text="[PaperlessUI.Angular] Restore is a no-op; pnpm install runs in the CI frontend job." Importance="low"/>
</Target>

<Target Name="Build" DependsOnTargets="Restore">
<Message Text="[PaperlessUI.Angular] Build is a no-op; pnpm run build runs in the CI frontend job." Importance="low"/>
<Exec Command="$(PnpmExe) install --frozen-lockfile=false" WorkingDirectory="$(FrontendRoot)" Condition=" '$(RunFrontendOnBuild)' == 'true' "/>
@ANcpLua ANcpLua merged commit 9565e43 into main May 12, 2026
6 checks passed
@ANcpLua ANcpLua deleted the refactor/esproj-drop-js-sdk-shims branch May 12, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants