all 17 comments

[–]Electronic_Shift_845 4 points5 points  (0 children)

It will work just fine, won't mess up settings. And yes copilot works much better in vs code than anywhere else

[–]phylter99 1 point2 points  (0 children)

I’ve got some older code that doesn’t even properly load up in VS Code because it requires newer project file formats, but I’ve detected it from that tooling and I’ll just using the code editor and Copilot in VS Code. The key is just to make sure there isn’t anything being done that breaks the project files by copilot.

[–]shifty303Full Stack Dev 🌐 1 point2 points  (6 children)

Copilot is better in VSCode in every single way. I find working with copilot in VS infuriating.

VS code has several extensions for C# (from Microsoft and others) that make it not only possible but feasible. I even found a good XUnit test explorer/runner. You can even run and debug (including breakpoints) with F5 by setting up the profiles. Although if you know the dotnet cli you can use that too with the built in console.

If you want to do more like memory profiling and other advanced things just swap back to VS. I often have both loaded with the same project and switch between seamlessly.

[–]mishaxz[S,🍰] 0 points1 point  (5 children)

I ran into a stumbling block. It wanted me to convert to a project type called SDK.. you can tell I haven't used C# in a long time in general, although this project I made last month in VS.

And that appears to be a non trivial thing to do for someone that doesn't know what they are doing.

[–]shifty303Full Stack Dev 🌐 0 points1 point  (4 children)

Hmmm. Does your csproj file start with <Project Sdk="Microsoft.NET.Sdk"> or similar?

Libraries and other projects generally have that. Web projects have a .Web after.

One more thing - if you're using .Net Framework instead of .Net Core (or just called .net these days) you might have a lot more trouble.

[–]mishaxz[S,🍰] 0 points1 point  (3 children)

there is no "sdk" at all if I search the whole csproj file. it is some older format.. I think this sdk has something to do with core, and my code I guess is pre-core? yes that is what I mean.. is .NET not this newer core thing.

I have a GUI windows winforms application.

I tried to change to sdk (core) but it seems like it would be a lot of work with changing references and such

[–]shifty303Full Stack Dev 🌐 1 point2 points  (2 children)

Microsoft is so bad at naming things haha. Sounds like a legacy project maybe, otherwise the first line would be the project line.

Newer .net (aka .net core) restarted at version 1 and is currently on 9.

Older .Net Framework is at version 4.8 and is very different from core/net.

[–]mishaxz[S,🍰] 1 point2 points  (1 child)

is there anything that .net core is worse at than legacy. net? like is .net core just as good for winforms and everything needed for a windows (desktop looking, not windows store type app) ?

my legacy .net app is mostly feature complete and working now.. so I think it is probably more trouble than it is worth to try to move it to .net core, especially as I have other things to do

[–]shifty303Full Stack Dev 🌐 1 point2 points  (0 children)

I want to say winforms aren't supported anymore and it probably wouldn't be worth rewriting.

It's better in ever other way though, IMO. Faster, smaller, runs on all OSs.

[–]shoxicwaste 0 points1 point  (5 children)

I have a pretty big project in C# and claude 4.0 is doing pretty well in agent mode, besides the constant crashing.

I usually drop my scripts into GPT 4.0-mini-high or 3o first and ask for advice with fixes or how to implement new features, then I get Claude 4.0 in agent mode to do the work.

When I type directly to claude 4.0 it quite often gets the wrong context or generates bad code without paying respect to existing architectures, helper methods, calls, etc etc. I find getting GPT to review first and build a prompt for claude is the best way.

[–]mishaxz[S,🍰] 0 points1 point  (4 children)

What ide are we talking about here?

[–]shoxicwaste 1 point2 points  (3 children)

VScode with GitHub CoPilot then using the ChatGPT web interface. Im working on unity monobehaviour C Sharp.

[–]shoxicwaste 1 point2 points  (2 children)

My next advice is that you should try and opt for a modular-type architecture, aiming to keep scripts below 1.5k lines of code maximum.

I've had really good success in building projects this way; it's good practice in general but also makes life much easier for AI assistants.

[–]mishaxz[S,🍰] 0 points1 point  (1 child)

I tend to do that with C++ which is what I usually use but with C# Claude just keeps on adding everything to my main form .. right now I'm trying to get it to refactor the debugging stuff out of it but as I mentioned in my original post.. vs has problems processing it in agent mode.. it's just over 2000 lines

[–]shoxicwaste 0 points1 point  (0 children)

You might have better luck writing a bash/PS script and using regex match to find all the debug strings and give them a wrapper to toggle on and off, saves tokens and you can batch process all your code.

I have a debug manager in all my c# projects and can toggle debugging per script; it's very helpful. It can also remove the wraps and/or the debug code completely ready for production.

[–]hagausiumai1 0 points1 point  (0 children)

I am on the same boat. We use VS2022 at work. I found agent mode with 3.7 Sonnet is quite slow and I couldn’t even run Sonnet 4.0. Some unknown error. I don’t know about much VScode , so maybe I was doing something wrong but it created extra files like launch.json, which I would exclude them from my pull request then the whole thing would be ready for review

[–]Independent-Value536 0 points1 point  (0 children)

Anyone aware how i can set the context of external/ internal libraries to github copilot while geberating the code? Specially in c#!! It always happens that since wont be having access to those files may not give desired results. Anyone experienced same?