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

Issues when using DNT with newest Visual Studio Build Tools 17.8.0 #136

Open
meister-d opened this issue Nov 21, 2023 · 6 comments
Open

Comments

@meister-d
Copy link

Hi, we're using dnt to switch our solution from packages to projects in a Azure DevOps Build Pipeline.
After updating the VS Build Tools to version 17.8.0 (.net 8) DNT is failing with the message below:

DNT (DotNetTools, https://github.com/RSuter/DNT, v1.8.3.0)
Binary: C:\Windows\ServiceProfiles\NetworkService\.dotnet\tools\.store\dnt\1.8.3\dnt\1.8.3\tools\net7.0\any\dnt.dll

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 Dnt.Program.Main(String[] args) in C:\projects\dnt\src\Dnt\Program.cs:line 29

Is there a new version for .net 8 already planned?
Can't wait to update my Self Hosted Build agent to the newest version :-)

Regards meister-d

@hardikce015
Copy link

I am also facing similar problem
is it due to VS update?

@mcretief
Copy link

Having the same problem after updating to VS 17.8.0. Seems the issue is DNT is specifically only targeting up to .net 7 currently.

@hardikce015
Copy link

it is possible that the environment variables are affected and DNT is not able to locate the path of the same

@ssteiner
Copy link

I managed to do a .NET 8 build. changed the TargetFrameworks to net8.0 in both projects (Dnt.Commands and Dnt), adapted to changes when removing the outdated Nuget packages. Not too hard, if it helps I can fork and upload my changes.

@lucaritossa
Copy link

Waiting for a new version of DNT with .NET 8 target.

In the meantime I found a workaround in my machine:
since DNT currently is targeting <TargetFrameworks>netcoreapp3.1;net6.0;net7.0</TargetFrameworks> I decided to install .NET6 SDK.

After that DNT returned to work.

@thedacheng
Copy link

I am having the same issue. @ssteiner can you share your changes with a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants