SharpeRAD / Cake.Powershell

Powershell addin for Cake
http://cakebuild.net
MIT License
83 stars 36 forks source link

Throwing error trying to run powershell from Cake frosting #100

Open jasells opened 5 months ago

jasells commented 5 months ago

Error: Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

Systems:

Full VS-About details from local dev system:

Microsoft Visual Studio Professional 2022 Version 17.9.0 Preview 2.1 VisualStudio.17.Preview/17.9.0-pre.2.1+34414.90 Microsoft .NET Framework Version 4.8.09037

Installed Version: Professional

Visual C++ 2022 00476-80000-00000-AA175 Microsoft Visual C++ 2022

ASP.NET and Web Tools 17.9.153.1332 ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.9.153.1332 Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools 17.9.153.1332 Azure Functions and Web Jobs Tools

C# Tools 4.9.0-2.23613.5+47b0a1e0ab831076eda00bb1e24b9d042d256e17 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10 Provides common services for use by Azure Mobi

Extensibility Message Bus 1.4.39 (main@e8108eb) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Fine Code Coverage FineCodeCoverage2022.ad53fb28-7a11-4465-a27a-3550499ea4a1 Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio 17.9.0 (b3bca6f) Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 6.9.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Project System Tools 1.0 Tools for working with C#, VisualBasic, and F# projects.

Razor (ASP.NET Core) 17.9.2.2357901+dfac5e3cec112dd38af95d899f85347f2e64411a Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.9.39.0 Microsoft SQL Server Data Tools

TypeScript Tools 17.0.21025.2001 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.9.0-2.23613.5+47b0a1e0ab831076eda00bb1e24b9d042d256e17 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.8.0-beta.23570.1+e9491ad27f8c9399cdd68e2308e906851a6db84f Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2 AI-assisted development for Visual Studio.

Visual Studio Spell Check Everywhere VSSpellCheckEverywhere An extension that enables spell checking within any Visual Studio file editor or tool window that uses WPF text boxes. https://GitHub.com/EWSoftware/VSSpellChecker

Visual Studio Spell Checker VSSpellChecker An editor extension that checks the spelling of comments, strings, and plain text as you type or interactively with tool windows. https://GitHub.com/EWSoftware/VSSpellChecker

VisualStudio.DeviceLog 1.0 Information about my package

VisualStudio.Mac 1.0 Mac Extension for Visual Studio

VSColorOutput64 2023.4 Color output for build and debug windows - https://mike-ward.net/vscoloroutput

VSPackage Extension 1.0 VSPackage Visual Studio Extension Detailed Info

Xamarin 17.9.0.62 (main@1a123c3) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 17.9.2.9 (remotes/origin/d17-9@dba677e96e) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 17.9.0 (38e87ba) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 13.2.2.0 (d17-5/45b0e14) Xamarin.Android Reference Assemblies and MSBuild support. Mono: d9a6e87 Java.Interop: xamarin/java.interop/d17-5@149d70fe SQLite: xamarin/sqlite/3.40.1@68c69d8 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

Xamarin.iOS and Xamarin.Mac SDK 16.4.0.23 (9defd91b3) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

jasells commented 5 months ago

Looks like same/related issue: https://github.com/SharpeRAD/Cake.Powershell/issues/95

jasells commented 5 months ago

I'm guessing it may be related to https://github.com/SharpeRAD/Cake.Powershell/blob/master/TroubleShooting.md#error-message-4, possibly due to the systems I'm running on are @ Pwsh v5.1.x, and this package needs an update to support, since it sounds like it may only support 5.0?

jasells commented 5 months ago

Possibly only needs updated dependency? This package is currently using > 1y old v 7.2.10? https://www.nuget.org/packages/Microsoft.PowerShell.SDK/7.2.10?_src=template

trashpanda-dotnet commented 4 months ago

I second this. In my case the error started to occour after updating Visual Studio 2022 to Version 17.9.5.

jasells commented 4 months ago

I second this. In my case the error started to occour after updating Visual Studio 2022 to Version 17.9.5.

I updated my OP to include this info as well.