How to Replace DTE2 in .NET Standard
Asked Answered
J

1

6

It's been a while since .NET Standard is introduced by Microsoft. Earlier, if I wanted to obtain information about Project, Solution and other related objects (e.g solution path, projects in a solution, etc), I used DTE2 type which is an interface inside EnvDTE80 assembly. But EnvDTE80 isn't compatible with .NET Standard. Any idea how to turn around this problem? Is there a replacement at all?

By the way, I'm currently using .NET Standard 2.0, if it matters.

Jest answered 28/1, 2018 at 9:2 Comment(3)
This is related: #46574302 with a relevant comment, but no answer.Hanni
As Visual Studio is clearly Windows only, like .NET Framework, there is no significant need to develop DTE related things to .NET Standard. To process projects or solutions, you can also use MSBuild/Roslyn instead.Sosa
@LexLi Could you please describe more and give me some information about how to use MSBuild in my code? For example, how to get the solution's path using MSBuild.Jest
W
2

This is a very late answer, but for anyone needing to do this in 2022 there are now compatible NuGet packages for this:

enter image description here

Wreckage answered 3/5, 2022 at 20:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.