Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSSDK projects shouldn't extract to experimental instance when running unit tests #9628

Open
drewnoakes opened this issue Jan 8, 2025 · 0 comments
Labels
Area-External Owned by another feature area and not this repo. Likely be closed in lieu of issue against it. Performance-Scenario-Build This issue affects build performance. Triage-Investigate Reviewed and investigation needed by dev team

Comments

@drewnoakes
Copy link
Member

If a VSIX project is in the reference graph of a unit test project, then it will be built whenever a user runs unit tests.

In a repo I'm working in, we don't want to deploy when building for unit tests.

  1. The deploy isn't very fast. It adds delay when you're waiting for unit test results.

  2. If the experimental instance is running, the deploy fails because the destination files are in use. This fails the build, which means tests don't run. You have to kill the experimental instance, which feels like an unnecessary interference to your workflow.

    1>D:\NuGetPackages\microsoft.vssdk.buildtools\17.12.2084-preview3-gea5fc75f5e\tools\VSSDK\Microsoft.VsSDK.targets(987,5): error VSSDK1081: Problem occurred while extracting the vsix to the experimental extensions path. The process cannot access the file '%LOCALAPPDATA%\Microsoft\VisualStudio\17.0_c0707f09Exp\Extensions\Microsoft Corporation<package><version><assembly>.dll' because it is being used by another process.

I wonder if it's every helpful to deploy when running unit tests in the VS test runner. If not, then we can disable this step during build. We currently identify "indirect" builds (those which happen for unit tests and for debug launches) via a global property. We could use a similar mechanism in the project system to convey to the VSSDK targets that we're just running unit tests.

It's unclear if this is safe to do. At the least, it'd be good to have a way to opt in to this behaviour. Perhaps we add a project property page for VSSDK projects that has a checkbox for this.

@drewnoakes drewnoakes added Performance-Scenario-Build This issue affects build performance. Triage-Investigate Reviewed and investigation needed by dev team Area-External Owned by another feature area and not this repo. Likely be closed in lieu of issue against it. labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Owned by another feature area and not this repo. Likely be closed in lieu of issue against it. Performance-Scenario-Build This issue affects build performance. Triage-Investigate Reviewed and investigation needed by dev team
Projects
None yet
Development

No branches or pull requests

1 participant