Home

LinqPad 8 & MvsSln - ..NET MSBuild usage

edited August 20

Version: LInqPad 8
Library MvsSln (NuGet)
Full .NET 8 SDK installed
Using MvsSln looks pretty straightforward, but it is not.
using Sln slnCurrent = new Sln(@C:\GIT\MyRepo\AAAA.sln, SlnItems.All);
results in error: The SDK 'Microsoft.Build.NoTargets/3.7.56' specified could not be found.
The line that causes the problem is the first in the .csproj file:

If I try to workaround by using "SlnItems.Projects | SlnItems.AllNoLoad" instead of "SlnItems.All", then another project is causing a problem complaining about Microsoft.CSharp.Targets:
The imported project "C:\Users\xxxx\AppData\Local\LINQPad\8.5.5\ProcessServer\8.0.8\Microsoft.CSharp.targets" was not found. Confirm that the expression in the Import declaration "C:\Users\xxxxx\AppData\Local\LINQPad\8.5.5\ProcessServer\8.0.8\Microsoft.CSharp.targets" is correct, and that the file exists on disk.
Indeed, there are no .target files there, but how can I make LinqPad 8 resolve those?

Previously I tried using Roslyn with similar issues. Am I missing something general?
If there is a workaround (or setting), please share!

Thanks in advance!

Sign In or Register to comment.