Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update dotnet deps + run formatting on all relevant files + some fixes#1839

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
o-l-a-v wants to merge35 commits intoPowerShell:master
base:master
Choose a base branch
Loading
fromo-l-a-v:update-deps-250628

Conversation

@o-l-a-v
Copy link
Contributor

@o-l-a-vo-l-a-v commentedJun 28, 2025
edited
Loading

This PR is just a suggestion on some housekeeping I think is due.

Feel free to close it or ask for changes.

PR Summary

  • Copied settings for VSCode, EditorConfig and Markdownlint from PowerShell/PowerShell.
  • Updated all dotnet deps withdotnet-outdated.
  • Ran formatter on all relevant files with VSCode extensionalexr00.formatallfilesinworkspace.
  • Fixed missing dep in perf/benchmark.
  • Use actual cmdletInstall-PSResource of PSResourceGet in setupReleaseTools, not the aliasInstall-Module.
  • Don't hardcode path seperator char (/ vs\) in build scripts.

PR Context

Why?

  • Keep syntax and style consistent with PowerShell/PowerShell, for both C#, PowerShell and Markdown.
  • Run formatter on all relevant files, so that future PRs that fixes one thing does not show that the whole file changed due to running the formatter.

PR Checklist

@alericksonalerickson mentioned this pull requestJul 15, 2025
14 tasks
@alerickson
Copy link
Member

It looks like the build isn't working in CI for this PR

o-l-a-v reacted with eyes emoji

@o-l-a-v
Copy link
ContributorAuthor

It builds fine on my Windows machine. 🤔


Seems GitHub actions builds on Ubuntu 22.04.

Can it (Linux) even target net472?


Why the Windows Server 2022 build fails I don't know.

@alerickson
Copy link
Member

It builds fine on my (Windows) machine as well, but I just pulled in your most recent changes and it's (still) not building on the server. We only build on windows, and then we use that build to test Windows PowerShell on Windows and PowerShell Core on Windows, Mac and Ubuntu.

Could you try opening up a new PR with a subset of these changes? It may help to have a smaller set of changes

@o-l-a-v
Copy link
ContributorAuthor

Could we get more output on what/where it fails?dotnet.exe will create log files, right?

@alerickson
Copy link
Member

@adityapatwardhan's change resolved the build issue (just an incorrect file name), but it looks like many of the tests are failing with the same error:

Error parsing server metadata: Could not load file or assembly
| 'System.IO.Pipelines, Version=9.0.0.6, Culture=neutral,
| PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file
| specified.

@o-l-a-v
Copy link
ContributorAuthor

o-l-a-v commentedAug 8, 2025
edited
Loading

Maybe previous run results are deleted, but the one failed test I can see does not fail when testing manually from Windows PowerShell.

The name of the failed test was misleading though,find resource given CommandName, while it actually was finding module by module name. I updated the name.

Can this be rerun and can I get some logs to see where and what it fails on?

alerickson reacted with thumbs up emoji

@alerickson
Copy link
Member

I think this PR will need to be broken down to smaller PRs to see what's causing this issue:

Find-PSResource: D:\a\1\s\test\FindPSResourceTests\FindPSResourceContainerRegistryServer.Tests.ps1:76
[-] Find all versions of resource when given specific Name, Version not null --> '' 486ms
Line |
Expected a value, but got $null or empty.
76 | … $res = Find-PSResource -Name $testModuleName -Version "
" -Repos …
77: $res | Should -Not -BeNullOrEmpty
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at , D:\a\1\s\test\FindPSResourceTests\FindPSResourceContainerRegistryServer.Tests.ps1: line 77
| Error parsing server metadata: Could not load file or assembly 'System.IO.Pipelines, Version=9.0.0.8,
| Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Find-PSResource: D:\a\1\s\test\FindPSResourceTests\FindPSResourceContainerRegistryServer.Tests.ps1:87

o-l-a-v reacted with thumbs up emoji

@o-l-a-v
Copy link
ContributorAuthor

It's very slow to troubleshoot when tests don't run on PR automatically. 🫠

@o-l-a-v
Copy link
ContributorAuthor

Ithink it was due to upgradingSystem.Text.Json from v8 to v9, which requires dotnet 9.

alerickson reacted with thumbs up emoji

@alerickson
Copy link
Member

Unfortunately now the package build is failing:

VERBOSE: Invoking build scriptVERBOSE: Starting DoBuild for Microsoft.PowerShell.PSResourceGet with configuration: Release, framework: net472VERBOSE: Module output file path: 'D:\a\1\s\out\Microsoft.PowerShell.PSResourceGet'VERBOSE: Module build source path: 'D:\a\1\s\src\code\bin\Release\net472\publish'VERBOSE: Building assembly and copying to 'D:\a\1\s\out\Microsoft.PowerShell.PSResourceGet'VERBOSE: dotnet.exe command found in path: C:\hostedtoolcache\windows/dotnet\dotnet.exeVERBOSE: DotNet version: 8.0.414VERBOSE: Build location: PSScriptRoot: D:\a\1\s, PWD: D:\a\1\s\src\codeVERBOSE: Starting dotnet build command: dotnet.exe publish --configuration Release --framework net472 --output D:\a\1\s\src\code\bin\Release\net472\publishVERBOSE: dotnet build failed with error: Build failed with exit code: 1Invoke-ModuleBuild : Exception calling "Invoke" with "0" argument(s): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: dotnet build failed with error: Build failed with exit code: 1"At D:\a\1\s\build.ps1:81 char:5+     Invoke-ModuleBuild -BuildScript $sb+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : NotSpecified: (:) [Invoke-ModuleBuild], MethodInvocationException+ FullyQualifiedErrorId : ActionPreferenceStopException,Invoke-ModuleBuild##[error]PowerShell exited with code '1'.Finishing: Build Module

@o-l-a-v
Copy link
ContributorAuthor

It builds fine on my machine, using dotnet v8.0.414. Would be helpful with more verbose build logs.

If you don't want to continue with this PR just close it. Would be nice to have it working and merged, though.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@adityapatwardhanadityapatwardhanadityapatwardhan left review comments

@anamnavianamnaviAwaiting requested review from anamnavianamnavi is a code owner

@alericksonalericksonAwaiting requested review from alericksonalerickson is a code owner

@SydneyhSmithSydneyhSmithAwaiting requested review from SydneyhSmithSydneyhSmith is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@o-l-a-v@alerickson@adityapatwardhan

[8]ページ先頭

©2009-2025 Movatter.jp