Adam Friedman

Results 433 comments of Adam Friedman

Thanks, that's super useful! :) I might start experimenting with this on one of my simpler templates for now (a binary PowerShell Core module), which the above should probably cover...

Having done a [bunch of work](https://github.com/tintoy/msbuild-project-tools-vscode) with the MSBuild engine recently, I think I'm fairly confident that I know how to evaluate / compute the project namespace for a given...

`$(RootNamespace)` always has _some_ sort of value in managed projects (anything that imports `Microsoft.Common.CurrentVersion.targets` and friends), and the rules for inferring it otherwise are pretty simple. Root namespace (in fallback...

(and it's not hard to use `Microsoft.Build.Evaluation` to inspect the effective value of the `RootNamespace` property in a project)

> to keep item namespaces consistent with the convention being used in the user's existing artifacts, it should really be looking at the peer code files in the target location...

Ok, so here's a quick proof-of-concept: ```csharp using Microsoft.Build.Evaluation; using System; using System.IO; using System.Linq; using System.Collections.Generic; namespace FileNSDemo { static class Program { static void Main(string[] args) { try...

Yeah, I think I see what you're getting at :) Then again, given that `dotnet new` generates projects files that MSBuild has to be able to parse, isn't it _already_...

Actually, I think I _now_ get where you're coming from - the issue is distributing the MSBuild engine alongside `dotnet new`, correct?

I added this functionality to the client's implementation of [`LspConnection`](https://github.com/OmniSharp/csharp-language-server-protocol/blob/master/src/Client/Protocol/LspConnection.cs) a while back so it shouldn't be _too_ hard retrofit to the server-side `LspConnection`. The tricky part, server-side, would be...

(really, at some point, the 2 implementations of `LspConnection` should be reintegrated - having 2 implementations of the send / receive / serialisation logic just doubles the maintenance workload 😉)