Repository navigation
fix(vsix-tests): avoid CS5001 in TF_BUILD inert mode - #600
Merged
Merged
Conversation
Phil Nachreiner (philnach)
requested a review
from Chris Anderson (codemonkeychris)
as a code owner
June 17, 2026 22:58
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes CI/ADO inert TF_BUILD=true builds for the VSIX test projects by preventing C# from expecting an executable entry point when the projects intentionally disable compile items (which previously triggered CS5001).
Changes:
- Made
OutputTypeconditional inReactor.VsExtension.Tests.csproj(Exenormally,LibraryunderTF_BUILD=true). - Made
OutputTypeconditional inReactor.VsExtension.SdkTests.csproj(Exenormally,LibraryunderTF_BUILD=true).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vs-reactor/Tests/Reactor.VsExtension.Tests/Reactor.VsExtension.Tests.csproj | Switches to OutputType=Library in inert TF_BUILD mode to avoid CS5001 while keeping normal behavior unchanged. |
| src/vs-reactor/Tests/Reactor.VsExtension.SdkTests/Reactor.VsExtension.SdkTests.csproj | Same conditional OutputType change to make inert TF_BUILD builds succeed without requiring Main. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Alexandre Zollinger Chohfi (azchohfi)
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes CI failures where VSIX test projects were built in inert
TF_BUILDmode but still emittedExe, causingCS5001(missingMain).Follow-up
Root Cause
Both VSIX test projects intentionally switch to an inert configuration under
TF_BUILD == true:net10.0In that inert mode,
OutputTypewas stillExe, so C# expected an entry point and failed with:CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry pointChanges
Updated
OutputTypeto be conditional in the two affected projects:ExewhenTF_BUILD != true(normal/local behavior unchanged)LibrarywhenTF_BUILD == true(inert CI mode)Files changed
src/vs-reactor/Tests/Reactor.VsExtension.Tests/Reactor.VsExtension.Tests.csprojsrc/vs-reactor/Tests/Reactor.VsExtension.SdkTests/Reactor.VsExtension.SdkTests.csprojValidation
Built both projects with
TF_BUILD=truelocally:dotnet build src/vs-reactor/Tests/Reactor.VsExtension.Tests/Reactor.VsExtension.Tests.csproj -c Release -p:TF_BUILD=truedotnet build src/vs-reactor/Tests/Reactor.VsExtension.SdkTests/Reactor.VsExtension.SdkTests.csproj -c Release -p:TF_BUILD=trueBoth now succeed and no longer hit
CS5001.Risk / Impact
Low risk:
TF_BUILD != truestill usesExe).