dotnet deb install failed #132

Closed
opened 2026-01-29 16:30:15 +00:00 by claunia · 6 comments
Owner

Originally created by @sbannikov on GitHub (Jan 6, 2023).

Just tried to use your utility.
dotnet tool install --global dotnet-deb command was successful.
But now I am stuck at:
C:\GIT\ProjectFolder>dotnet deb install
Unhandled exception. System.InvalidOperationException: No instances of MSBuild could be detected.
Try calling RegisterInstance or RegisterMSBuildPath to manually register one.
at Microsoft.Build.Locator.MSBuildLocator.RegisterDefaults()
at Dotnet.Packaging.PackagingRunner..ctor(String outputName, String msbuildTarget, String commandName) in /__w/1/s/dotnet-rpm/PackagingRunner.cs:line 29
at Dotnet.Packaging.Program.Main(String[] args) in /__w/1/s/dotnet-deb/Program.cs:line 9
I tried to figure out what's happenning but failed.
Defintely I have both Microsoft Visual Studio 2022 with MSBuild installed.
Could anyone help me wth this issue? Thanks!

Originally created by @sbannikov on GitHub (Jan 6, 2023). Just tried to use your utility. `dotnet tool install --global dotnet-deb` command was successful. But now I am stuck at: `C:\GIT\ProjectFolder>dotnet deb install` `Unhandled exception. System.InvalidOperationException: No instances of MSBuild could be detected.` `Try calling RegisterInstance or RegisterMSBuildPath to manually register one.` `at Microsoft.Build.Locator.MSBuildLocator.RegisterDefaults()` `at Dotnet.Packaging.PackagingRunner..ctor(String outputName, String msbuildTarget, String commandName) in /__w/1/s/dotnet-rpm/PackagingRunner.cs:line 29` `at Dotnet.Packaging.Program.Main(String[] args) in /__w/1/s/dotnet-deb/Program.cs:line 9` I tried to figure out what's happenning but failed. Defintely I have both Microsoft Visual Studio 2022 with MSBuild installed. Could anyone help me wth this issue? Thanks!
Author
Owner

@sbannikov commented on GitHub (Jan 14, 2023):

I made some additional investigation and found, that .NET SDK 6.0 should be installed as a separate installation to use this package. Visual Studio installation isn't sufficient (or maybe I missed some additional component, there so many of them).
I suggest that it should be explicitely noted in readme/manual.

@sbannikov commented on GitHub (Jan 14, 2023): I made some additional investigation and found, that .NET SDK 6.0 should be installed as a separate installation to use this package. Visual Studio installation isn't sufficient (or maybe I missed some additional component, there so many of them). I suggest that it should be explicitely noted in readme/manual.
Author
Owner

@pyking-wang commented on GitHub (May 18, 2023):

Hello, I have also encountered this issue. Have you solved it? thank you

@pyking-wang commented on GitHub (May 18, 2023): Hello, I have also encountered this issue. Have you solved it? thank you
Author
Owner

@atauenis commented on GitHub (May 19, 2023):

I can confirm that Visual Studio 2019 with separately installed .NET SDK 6.0 can work with dotnet-packaging (old Windows & Visual Studio versions are not barriers to work on .NET 6 apps) without problems. How about Win10/11 & default installation of VS2022 I'm don't know at this moment.

@atauenis commented on GitHub (May 19, 2023): I can confirm that Visual Studio 2019 with separately installed .NET SDK 6.0 can work with `dotnet-packaging` (old Windows & Visual Studio versions are not barriers to work on .NET 6 apps) without problems. How about Win10/11 & default installation of VS2022 I'm don't know at this moment.
Author
Owner

@cancelpj commented on GitHub (Jun 8, 2023):

I can confirm that Visual Studio 2019 with separately installed .NET SDK 6.0 can work with dotnet-packaging (old Windows & Visual Studio versions are not barriers to work on .NET 6 apps) without problems. How about Win10/11 & default installation of VS2022 I'm don't know at this moment.

The same on VS2022.

@cancelpj commented on GitHub (Jun 8, 2023): > I can confirm that Visual Studio 2019 with separately installed .NET SDK 6.0 can work with `dotnet-packaging` (old Windows & Visual Studio versions are not barriers to work on .NET 6 apps) without problems. How about Win10/11 & default installation of VS2022 I'm don't know at this moment. The same on VS2022.
Author
Owner

@newtocodeC commented on GitHub (Aug 23, 2023):

Hello, I have also encountered this issue. Have you solved it? thank you

Have you solved it? Same situation,Same error

@newtocodeC commented on GitHub (Aug 23, 2023): > Hello, I have also encountered this issue. Have you solved it? thank you Have you solved it? Same situation,Same error
Author
Owner

@sbannikov commented on GitHub (Aug 24, 2023):

Hello, I have also encountered this issue. Have you solved it? thank you

Have you solved it? Same situation,Same error

You have to install .NET SDK 6.0 as a separate package. Visual Studio by itself isn't sufficient for this command to be runned

https://dotnet.microsoft.com/en-us/download/dotnet/6.0

@sbannikov commented on GitHub (Aug 24, 2023): > > Hello, I have also encountered this issue. Have you solved it? thank you > > Have you solved it? Same situation,Same error You have to install .NET SDK 6.0 as a separate package. Visual Studio by itself isn't sufficient for this command to be runned https://dotnet.microsoft.com/en-us/download/dotnet/6.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#132