sec / dotnet-core-freebsd-source-build

Collection of script to build .NET Core under FreeBSD OS (with binary releases)
MIT License
53 stars 4 forks source link

Powershell build ? #26

Open Martinfx opened 6 months ago

Martinfx commented 6 months ago

hi, I have a question about the PowerShell build from you. Are you going to build?

sec commented 6 months ago

I've never done any PowerShell builds, I know @thefrank did some some time ago. Have you maybe tried to make the build yourself?

Martinfx commented 6 months ago

@sec Yes, i tried make yourself but its hard with install nuget packages.

Martinfx commented 6 months ago

@sec i have problem with this:


MSBuild version 17.8.3+195e7f5a3 for .NET
CSC : warning CA1016: Mark assemblies with assembly version (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1016) [/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/ResGen/ResGen.csproj]
/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/ResGen/Program.cs(12,18): warning CA1052: Type 'Program' is a static holder type but is neither static nor NotInheritable (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1052) [/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/ResGen/ResGen.csproj]
  ResGen -> /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/ResGen/bin/Debug/net8.0/resgen.dll

Build succeeded.

CSC : warning CA1016: Mark assemblies with assembly version (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1016) [/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/ResGen/ResGen.csproj]
/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/ResGen/Program.cs(12,18): warning CA1052: Type 'Program' is a static holder type but is neither static nor NotInheritable (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1052) [/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/ResGen/ResGen.csproj]
    2 Warning(s)
    0 Error(s)

Time Elapsed 00:00:03.98
ResGen for ../Microsoft.PowerShell.ScheduledJob/gen/ScheduledJobErrorStrings.cs
ResGen for ../Microsoft.WSMan.Management/gen/WsManResources.cs
ResGen for ../Microsoft.PowerShell.LocalAccounts/gen/Microsoft.PowerShell.LocalAccounts.Strings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/NewObjectStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/VariableCommandStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/AliasCommandStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/MeasureObjectStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/WriteProgressResourceStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/EventingStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/TraceCommandStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/UpdateListStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/GetUptimeStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/AddMember.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/ConvertMarkdownStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/ConvertFromStringResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/GetMember.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/ConvertHTMLStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/CsvCommandStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/FormatAndOut_out_gridview.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/WebCmdletStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/HttpCommandStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/SelectObjectStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/ImmutableStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/ConvertFromStringData.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/HostStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/OutPrinterDisplayStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/FlashExtractStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/ImplicitRemotingStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/AddTypeStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/SortObjectStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/UnblockFileStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/TestJsonCmdletStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/WriteErrorStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/UtilityCommonStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/ImportLocalizedDataStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/StartSleepStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/UpdateDataStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/ConvertStringResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/SendMailMessageStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/Debugger.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/MatchStringStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/UtilityMshSnapinResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Utility/gen/GetRandomCommandStrings.cs
ResGen for ../Microsoft.Management.Infrastructure.CimCmdlets/gen/CimCmdletStrings.cs
ResGen for ../Microsoft.PowerShell.CoreCLR.Eventing/gen/DotNetEventingStrings.cs
ResGen for ../Microsoft.Management.UI.Internal/gen/InvariantResources.cs
ResGen for ../Microsoft.Management.UI.Internal/gen/ShowCommandResources.cs
ResGen for ../Microsoft.Management.UI.Internal/gen/HelpWindowResources.cs
ResGen for ../Microsoft.Management.UI.Internal/gen/UICultureResources.cs
ResGen for ../Microsoft.Management.UI.Internal/gen/GraphicalHostResources.cs
ResGen for ../Microsoft.Management.UI.Internal/gen/XamlLocalizableResources.cs
ResGen for ../System.Management.Automation/gen/ParserStrings.cs
ResGen for ../System.Management.Automation/gen/HistoryStrings.cs
ResGen for ../System.Management.Automation/gen/CatalogStrings.cs
ResGen for ../System.Management.Automation/gen/Modules.cs
ResGen for ../System.Management.Automation/gen/GetErrorText.cs
ResGen for ../System.Management.Automation/gen/SessionStateStrings.cs
ResGen for ../System.Management.Automation/gen/DiscoveryExceptions.cs
ResGen for ../System.Management.Automation/gen/ExperimentalFeatureStrings.cs
ResGen for ../System.Management.Automation/gen/HostInterfaceExceptionsStrings.cs
ResGen for ../System.Management.Automation/gen/SuggestionStrings.cs
ResGen for ../System.Management.Automation/gen/CoreClrStubResources.cs
ResGen for ../System.Management.Automation/gen/MiniShellErrors.cs
ResGen for ../System.Management.Automation/gen/SessionStateProviderBaseStrings.cs
ResGen for ../System.Management.Automation/gen/DescriptionsStrings.cs
ResGen for ../System.Management.Automation/gen/FormatAndOutXmlLoadingStrings.cs
ResGen for ../System.Management.Automation/gen/PipelineStrings.cs
ResGen for ../System.Management.Automation/gen/ErrorCategoryStrings.cs
ResGen for ../System.Management.Automation/gen/Metadata.cs
ResGen for ../System.Management.Automation/gen/ExtendedTypeSystem.cs
ResGen for ../System.Management.Automation/gen/ProxyCommandStrings.cs
ResGen for ../System.Management.Automation/gen/Credential.cs
ResGen for ../System.Management.Automation/gen/RunspaceInit.cs
ResGen for ../System.Management.Automation/gen/DebuggerStrings.cs
ResGen for ../System.Management.Automation/gen/EventingResources.cs
ResGen for ../System.Management.Automation/gen/PSCommandStrings.cs
ResGen for ../System.Management.Automation/gen/SubsystemStrings.cs
ResGen for ../System.Management.Automation/gen/TabCompletionStrings.cs
ResGen for ../System.Management.Automation/gen/FormatAndOut_MshParameter.cs
ResGen for ../System.Management.Automation/gen/WildcardPatternStrings.cs
ResGen for ../System.Management.Automation/gen/MshSignature.cs
ResGen for ../System.Management.Automation/gen/RemotingErrorIdStrings.cs
ResGen for ../System.Management.Automation/gen/CredUI.cs
ResGen for ../System.Management.Automation/gen/FormatAndOut_format_xxx.cs
ResGen for ../System.Management.Automation/gen/StringDecoratedStrings.cs
ResGen for ../System.Management.Automation/gen/CoreMshSnapinResources.cs
ResGen for ../System.Management.Automation/gen/PathUtilsStrings.cs
ResGen for ../System.Management.Automation/gen/CredentialAttributeStrings.cs
ResGen for ../System.Management.Automation/gen/HelpDisplayStrings.cs
ResGen for ../System.Management.Automation/gen/ConsoleInfoErrorStrings.cs
ResGen for ../System.Management.Automation/gen/CommandBaseStrings.cs
ResGen for ../System.Management.Automation/gen/InternalHostStrings.cs
ResGen for ../System.Management.Automation/gen/TransactionStrings.cs
ResGen for ../System.Management.Automation/gen/SecuritySupportStrings.cs
ResGen for ../System.Management.Automation/gen/InternalHostUserInterfaceStrings.cs
ResGen for ../System.Management.Automation/gen/TypesXmlStrings.cs
ResGen for ../System.Management.Automation/gen/ProgressRecordStrings.cs
ResGen for ../System.Management.Automation/gen/InternalCommandStrings.cs
ResGen for ../System.Management.Automation/gen/AutomationExceptions.cs
ResGen for ../System.Management.Automation/gen/PSListModifierStrings.cs
ResGen for ../System.Management.Automation/gen/NativeCP.cs
ResGen for ../System.Management.Automation/gen/PSConfigurationStrings.cs
ResGen for ../System.Management.Automation/gen/ParameterBinderStrings.cs
ResGen for ../System.Management.Automation/gen/MshSnapInCmdletResources.cs
ResGen for ../System.Management.Automation/gen/MshHostRawUserInterfaceStrings.cs
ResGen for ../System.Management.Automation/gen/FormatAndOut_out_xxx.cs
ResGen for ../System.Management.Automation/gen/PowerShellStrings.cs
ResGen for ../System.Management.Automation/gen/EventResource.cs
ResGen for ../System.Management.Automation/gen/AuthorizationManagerBase.cs
ResGen for ../System.Management.Automation/gen/RegistryProviderStrings.cs
ResGen for ../System.Management.Automation/gen/VerbDescriptionStrings.cs
ResGen for ../System.Management.Automation/gen/ErrorPackageRemoting.cs
ResGen for ../System.Management.Automation/gen/PSDataBufferStrings.cs
ResGen for ../System.Management.Automation/gen/RunspacePoolStrings.cs
ResGen for ../System.Management.Automation/gen/EnumExpressionEvaluatorStrings.cs
ResGen for ../System.Management.Automation/gen/CmdletizationCoreResources.cs
ResGen for ../System.Management.Automation/gen/Logging.cs
ResGen for ../System.Management.Automation/gen/ErrorPackage.cs
ResGen for ../System.Management.Automation/gen/MshSnapinInfo.cs
ResGen for ../System.Management.Automation/gen/Serialization.cs
ResGen for ../System.Management.Automation/gen/RunspaceStrings.cs
ResGen for ../System.Management.Automation/gen/CimInstanceTypeAdapterResources.cs
ResGen for ../System.Management.Automation/gen/EtwLoggingStrings.cs
ResGen for ../System.Management.Automation/gen/Authenticode.cs
ResGen for ../System.Management.Automation/gen/ProviderBaseSecurity.cs
ResGen for ../System.Management.Automation/gen/FileSystemProviderStrings.cs
ResGen for ../System.Management.Automation/gen/PSStyleStrings.cs
ResGen for ../System.Management.Automation/gen/HelpErrors.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ControlPanelResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ComputerResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/EventlogResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/TestConnectionResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/HotFixResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ClipboardResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/TransactionResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ManagementMshSnapInResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/CmdletizationResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ClearRecycleBinResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/WmiResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/TimeZoneResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ComputerInfoResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/TestPathResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ProcessCommandHelpResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/NavigationResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/WebServiceResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ProcessResources.cs
ResGen for ../Microsoft.PowerShell.Commands.Management/gen/ServiceResources.cs
ResGen for ../Microsoft.PowerShell.Security/gen/SecurityMshSnapinResources.cs
ResGen for ../Microsoft.PowerShell.Security/gen/UtilsStrings.cs
ResGen for ../Microsoft.PowerShell.Security/gen/SecureStringCommands.cs
ResGen for ../Microsoft.PowerShell.Security/gen/CertificateProviderStrings.cs
ResGen for ../Microsoft.PowerShell.Security/gen/CertificateCommands.cs
ResGen for ../Microsoft.PowerShell.Security/gen/CmsCommands.cs
ResGen for ../Microsoft.PowerShell.Security/gen/ExecutionPolicyCommands.cs
ResGen for ../Microsoft.PowerShell.Security/gen/SignatureCommands.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/ProgressNodeStrings.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/ConsoleHostUserInterfaceStrings.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/ConsoleControlStrings.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/ConsoleHostStrings.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/CommandLineParameterParserStrings.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/HostMshSnapinResources.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/TranscriptStrings.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/ConsoleHostRawUserInterfaceStrings.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/ConsoleHostUserInterfaceSecurityResources.cs
ResGen for ../Microsoft.PowerShell.ConsoleHost/gen/ManagedEntranceStrings.cs
ResGen for ../Microsoft.PowerShell.Commands.Diagnostics/gen/GetEventResources.cs
cd /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/powershell-unix &&  dotnet restore --packages /usr/ports/shells/powershell/work/packages
  Determining projects to restore...
  Restored /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj (in 905 ms).
  Restored /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj (in 906 ms).
  Restored /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj (in 905 ms).
  Restored /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj (in 906 ms).
  Restored /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/SourceGenerators/PSVersionInfoGenerator/PSVersionInfoGenerator.csproj (in 1.04 sec).
  Restored /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj (in 1.14 sec).
  Restored /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj (in 1.18 sec).
  Restored /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/powershell-unix/powershell-unix.csproj (in 1.24 sec).
cd /usr/ports/shells/powershell/work/PowerShell-7.4.2/src && dotnet msbuild  Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj  #/t:_GetDependencies /p:DesignTimeBuild=true  /p:DesignTimeBuild=true  /p:_DependencyFile=/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/TypeCatalogGen/powershell.inc  /nologo
MSBuild version 17.8.3+195e7f5a3 for .NET
  PSVersionInfoGenerator -> /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/SourceGenerators/PSVersionInfoGenerator/bin/Debug/netstandard2.0/SMA.Generator.dll
CSC : error CS9057: The analyzer assembly '/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/SourceGenerators/PSVersionInfoGenerator/bin/Debug/netstandard2.0/SMA.Generator.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'. [/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
*** Error code 1
sec commented 6 months ago

Maybe take a look at https://github.com/mateusrodrigues/powershell-freebsd - I know @mateusrodrigues was working on powershell port for FreeBSD some time ago. Here's the project page https://wiki.freebsd.org/SummerOfCode2018Projects/PortingPowerShellPorting - don't know if there's something usuful as this was quite a time ago :) if you have this upstreamed somewhere with some steps on how to reproduce, I could take a look when have some spare time.

sec commented 6 months ago

More recent builds (7.1 I think) was done by @jasonpugsley so maybe he could help you out also.

Martinfx commented 6 months ago

More recent builds (7.1 I think) was done by @jasonpugsley so maybe he could help you out also.

Thank I looked this link but best is this patch https://people.freebsd.org/~zirias/patches/0001-shells-powershell-Add-new-port.patch. I bumped to 7.4.2 powershell

Thefrank commented 6 months ago

TL;DR: Use Zirias's patch.

Long reason:

Zirias's patches avoid needing the powershell-native library and use a newer upstream than mine.

I have two PR's out to add FreeBSD to both powershell-native and powershell itself and both have been stalled for over a year.

https://github.com/PowerShell/PowerShell-Native/pull/92 is done, including feedback from review https://github.com/PowerShell/PowerShell/pull/20041 needs to be rebased as it is over a year old and requires the above to be merged bonus: https://github.com/pester/Pester/pull/2385 If you want to use Pester you will need this. Requires the above two to work.

If you are going to use my patches be aware of one issue that I have not had time to address: https://github.com/Thefrank/freebsd-port-sooners/issues/18. This actually came during powershell's test run but I wrote it off as configuration difference between my environment and what the test was expecting. It was the only failure.

Oh, and if you want to use it as a login shell...mine might not work for FreeBSD 14 as 14 was not out when I authored the PR.

Martinfx commented 6 months ago

I tried zirias patch with version 7.4.2 and I have problem with this: cd /usr/ports/shells/powershell/work/PowerShell-7.4.2/src/powershell-unix && dotnet restore --packages /usr/ports/shells/powershell/work/packages Determining projects to restore... All projects are up-to-date for restore. cd /usr/ports/shells/powershell/work/PowerShell-7.4.2/src && dotnet msbuild Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj /p:DesignTimeBuild=true #/p:DesignTimeBuild=true /p:_DependencyFile=/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/TypeCatalogGen/powershell.inc /nologo MSBuild version 17.8.5+b5265ef37 for .NET /usr/local/dotnet/sdk/8.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.GenerateAssemblyInfo.targets(227,5): error MSB4044: The "GetAssemblyVersion" task was not given a value for the required parameter "NuGetVersion". [/usr/ports/shells/powershell/work/PowerShell-7.4.2/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj] *** Error code 1

Do you have some idea ?

Thefrank commented 6 months ago

Are you trying to build it or dogfood it? If you have a working pwsh it should dogfood fine. For the initial build I recall I had to pick part the pwsh script to build it manually. MSB4044 is not a helpful error as it is basically a "missing parameter" error :(

Was TypeCatalogGen made (powershell.inc)?

Martinfx commented 6 months ago

Are you trying to build it or dogfood it? If you have a working pwsh it should dogfood fine. For the initial build I recall I had to pick part the pwsh script to build it manually. MSB4044 is not a helpful error as it is basically a "missing parameter" error :(

Was TypeCatalogGen made (powershell.inc)?

I build with FreeBSD (make) and find . -iname "*powershell.inc*" don't see

Thefrank commented 6 months ago

It has been more than year but from what I recall both a "TypeGen" and "ResGen" tasks needed to be executed before pwsh would build. The former being the task that generates your missing powershell.inc file.

EDIT: hopefully the .psm1 file still contains information or atleast commands on how those are made

Martinfx commented 5 months ago

I tried build PowerShell-7.4.2 with Zirias patches

MSBuild version 17.8.3+195e7f5a3 for .NET
  PSVersionInfoGenerator -> /usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/SourceGenerators/PSVersionInfoGenerator/bin/Debug/netstandard2.0/SMA.Generator.dll
CSC : warning CS9057: The analyzer assembly '/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/SourceGenerators/PSVersionInfoGenerator/bin/Debug/netstandard2.0/SMA.Generator.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'. [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.MSBuild version 17.8.3+195e7f5a3 for .NET
  PSVersionInfoGenerator -> /usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/SourceGenerators/PSVersionInfoGenerator/bin/Debug/netstandard2.0/SMA.Generator.dll
CSC : warning CS9057: The analyzer assembly '/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/SourceGenerators/PSVersionInfoGenerator/bin/Debug/netstandard2.0/SMA.Generator.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0'. [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs(92,35): error CS0103: The name 'InitializeTypeCatalog' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/utils/Telemetry.cs(865,57): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/utils/tracing/SysLogProvider.cs(293,58): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/utils/tracing/SysLogProvider.cs(312,58): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/utils/tracing/SysLogProvider.cs(338,47): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/security/SecuritySupport.cs(1364,104): error CS0117: 'PSVersionInfo' does not contain a definition for 'ProductVersion' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/security/SecuritySupport.cs(1370,111): error CS0117: 'PSVersionInfo' does not contain a definition for 'ProductVersion' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotingprotocolimplementation.cs(213,56): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(88,30): error CS0103: The name 'Version_Label' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(89,39): error CS0103: The name 'Version_Major' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(89,54): error CS0103: The name 'Version_Minor' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(89,69): error CS0103: The name 'Version_Patch' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(90,39): error CS0103: The name 'Version_Major' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(90,54): error CS0103: The name 'Version_Minor' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(90,69): error CS0103: The name 'Version_Patch' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(90,84): error CS0103: The name 'Version_Label' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(95,51): error CS0103: The name 'GitCommitId' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs(1009,43): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs(1059,43): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs(1075,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs(1090,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs(1230,76): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs(1245,68): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs(1287,64): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/client/clientremotesession.cs(531,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/client/clientremotesession.cs(545,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/client/clientremotesession.cs(559,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/client/remotingprotocolimplementation.cs(640,56): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
4.2/src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs(92,35): error CS0103: The name 'InitializeTypeCatalog' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/utils/Telemetry.cs(865,57): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/utils/tracing/SysLogProvider.cs(293,58): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/utils/tracing/SysLogProvider.cs(312,58): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/utils/tracing/SysLogProvider.cs(338,47): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/security/SecuritySupport.cs(1364,104): error CS0117: 'PSVersionInfo' does not contain a definition for 'ProductVersion' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/security/SecuritySupport.cs(1370,111): error CS0117: 'PSVersionInfo' does not contain a definition for 'ProductVersion' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotingprotocolimplementation.cs(213,56): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(88,30): error CS0103: The name 'Version_Label' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(89,39): error CS0103: The name 'Version_Major' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(89,54): error CS0103: The name 'Version_Minor' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(89,69): error CS0103: The name 'Version_Patch' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(90,39): error CS0103: The name 'Version_Major' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(90,54): error CS0103: The name 'Version_Minor' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(90,69): error CS0103: The name 'Version_Patch' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(90,84): error CS0103: The name 'Version_Label' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/PSVersionInfo.cs(95,51): error CS0103: The name 'GitCommitId' does not exist in the current context [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs(1009,43): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs(1059,43): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs(1075,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/server/serverremotesession.cs(1090,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs(1230,76): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs(1245,68): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs(1287,64): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/client/clientremotesession.cs(531,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/client/clientremotesession.cs(545,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/client/clientremotesession.cs(559,39): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/engine/remoting/client/remotingprotocolimplementation.cs(640,56): error CS0117: 'PSVersionInfo' does not contain a definition for 'GitCommitId' [/usr/home/maxfx/Documents/FreeBSD-Ports/powershell/work/PowerShell-7.4.2/src/System.Management.Automation/System.Management.Automation.csproj]
Thefrank commented 5 months ago

SMA.Generator.dll' references version '4.9.0.0' of the compiler, which is newer than the currently running version '4.8.0.0' Looks like incorrect dependencies or a failed restore

rhubarb-geek-nz commented 2 months ago

Hi all, I have successfully made a build of 7.4.5 for arm64 and x64.

My solution was to add the freebsd-arm64 and freebsd-x64 apphost and runtime packs to an SDK on Linux, and do a cross compilation for both FreeBSD architectures on Linux.

Then transfer the output to the FreeBSD machines and compile the libpsl-native.so on the host environment and create the FreeBSD pkg using 'pkg create'

Some minor patching was required but it is all captured in the project.

I have used my own packaging of the dotnet runtime so only dotnet-runtime-8.0 is a dependency.

Thefrank commented 2 months ago

@rhubarb-geek-nz Awesome job!

Can you upstream the code? The FreeBSD patch for libpsl-native.so finally got upstreamed but I don't have the time to right now to hammer out the final few test failures in my PR for Powershell.

The repo's checks system also bootstraps which complicates things a bit more too.

I am more than happy to close out a nonworking PR for one that is :)

rhubarb-geek-nz commented 2 months ago

Can you upstream the code?

Already done as rhubarb-geek-nz/powershell-freebsd

For libpsl-native I checked out commit Fix FreeBSD build failures. Update tests for FreeBSD. My patch disables the tests.

For PowerShell itself my patch contains the changes to src/powershell/Program.cs. I did a slash-and-burn to simply replace the Linux and MacOS code with FreeBSD code.

sec commented 2 months ago

@rhubarb-geek-nz I think @Thefrank was asking if you could upstream this with PR into powershell main repo or you already did that?

Martinfx commented 2 months ago

Can you upstream the code?

Already done as rhubarb-geek-nz/powershell-freebsd

For libpsl-native I checked out commit Fix FreeBSD build failures. Update tests for FreeBSD. My patch disables the tests.

For PowerShell itself my patch contains the changes to src/powershell/Program.cs. I did a slash-and-burn to simply replace the Linux and MacOS code with FreeBSD code.

you can look to https://github.com/mateusrodrigues/powershell-freebsd how to make freebsd port

sec commented 2 months ago

Given the fact, we already have dotnet 8 in ports, port of powershell would be nice

rhubarb-geek-nz commented 2 months ago

@rhubarb-geek-nz I think @Thefrank was asking if you could upstream this with PR into powershell main repo or you already did that?

The code changes I used to patch 7.4.5 are equivalent to what has been submitted to PowerShell 7.5 prerelease. WIP: Add platform support for FreeBSD #20041

Given the fact, we already have dotnet 8 in ports, port of powershell would be nice

Sure, the two problems I had was that

  1. I could not build PowerShell on FreeBSD, I used Linux then packaged on FreeBSD
  2. The current FreeBSD DotNet SDK is monolithic, I wanted PowerShell to just depend on the dotnet-runtime-8.0 package
Martinfx commented 1 month ago

I built Powershell for FreeBSD with dotnet 8.0.6 from freshports.

  1. apply https://reviews.freebsd.org/D44561
  2. Copy from /usr/ports/lang/dotnet/work/stage/usr/local/dotnet/packages/ to /usr/local/dotnet/packages
    
    Microsoft.NETCore.App.Runtime.freebsd-x64.8.0.6.nupkg               runtime.freebsd-x64.Microsoft.NETCore.DotNetHostResolver.8.0.6.nupkg
    runtime.freebsd-x64.Microsoft.DotNet.ILCompiler.8.0.6.nupkg         runtime.freebsd-x64.Microsoft.NETCore.ILAsm.8.0.6-servicing.24267.15.nupkg
    Microsoft.AspNetCore.App.Runtime.freebsd-x64.8.0.6.nupkg  runtime.freebsd-x64.Microsoft.NETCore.DotNetAppHost.8.0.6.nupkg     runtime.freebsd-x64.Microsoft.NETCore.ILDAsm.8.0.6-servicing.24267.15.nupkg
    Microsoft.NETCore.App.Crossgen2.freebsd-x64.8.0.6.nupkg   runtime.freebsd-x64.Microsoft.NETCore.DotNetHost.8.0.6.nupkg        runtime.freebsd-x64.Microsoft.NETCore.TestHost.8.0.6-servicing.24267.15.nupkg
    Microsoft.NETCore.App.Host.freebsd-x64.8.0.6.nupkg        runtime.freebsd-x64.Microsoft.NETCore.DotNetHostPolicy.8.0.6.nupkg

3. git clone https://github.com/Martinfx/FreeBSD-Ports/tree/master/powershell
4. sudo make
5. enjoy
6. Or package is on github [https://github.com/.../fre.../blob/main/powershell-7.4.2.pkg](https://github.com/Martinfx/freebsd-nupkg-powershell/blob/main/powershell-7.4.2.pkg)
Thefrank commented 1 month ago

@rhubarb-geek-nz @Martinfx Can I get your help in squashing these few test failures? Details here: https://github.com/PowerShell/PowerShell/pull/20041/#issuecomment-2336807591