当前位置: 首页 > ops >正文

trae开发c#

安装插件C# Dev Kit,使用的版本是1.41.11

.NET Install Tool一般会自动安装,安装C# dev kit的时候,版本2.3.7

C# 插件,版本2.87.31

https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime

https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp

https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit

在这里插入图片描述
下载vsix然后拖拽到侧边栏即可自动安装

与操作系统平台相关,可在下载链接后增加:“?targetPlatform={platform}”,如:
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/csharp/2.63.32/vspackage?targetPlatform=win32-x64

platform选项:

win32-x64: Windows 64-bit
win32-ia32: Windows 32-bit
win32-arm64: Windows ARM64
darwin-x64: macOS Intel
darwin-arm64: macOS Apple Silicon
linux-x64: Linux 64-bit
linux-arm64: Linux ARM64
alpine-x64: Alpine Linux

下载地址如下

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/vscode-dotnet-runtime/2.3.7/vspackage

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/csharp/2.87.31/vspackage?targetPlatform=win32-x64

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-dotnettools/vsextensions/csdevkit/1.41.11/vspackage?targetPlatform=win32-x64

在这里插入图片描述

安装顺序安装即可,如果版本不支持就降低一个版本

ctrl+shift+p

在这里插入图片描述

在这里插入图片描述

选择保存的文件夹,然后输入项目名称即可
在这里插入图片描述

选择解决方案格式
在这里插入图片描述
确认路径之后创建成功
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

配置如下

{// 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387"version": "0.2.0","configurations": [{"name": "WebApplication1","type": "dotnet","request": "launch","projectPath": "${workspaceFolder}/WebApplication1/WebApplication1.csproj"},]
}

在这里插入图片描述

微软做了限制,可以愉快写代码,如果可以接受两个编辑器调试建议vs或者vs code,不接受的话可以接入三星的netcoredbg

https://github.com/Samsung/netcoredbg
在这里插入图片描述

解压到E:\Software\netcoredbg

在这里插入图片描述

新建tasks.json

{"version": "2.0.0","tasks": [{"label": "build","command": "dotnet","type": "process","args": ["build","${workspaceFolder}/WebApplication1"],"problemMatcher": "$msCompile"}]
}

修改launch.json

{"version": "0.2.0","configurations": [{"type": "coreclr","request": "launch","preLaunchTask":  "build","name": ".NET Core Launch (console)","program": "${workspaceFolder}/WebApplication1/bin/Debug/net9.0/WebApplication1.dll","args": [],"cwd": "${workspaceFolder}","stopAtEntry": false,"internalConsoleOptions": "openOnSessionStart","pipeTransport": {"pipeCwd": "${workspaceFolder}","pipeProgram": "cmd","pipeArgs": ["/c"],"debuggerPath": "E:\\Software\\netcoredbg\\netcoredbg.exe","debuggerArgs": ["--interpreter=vscode"],"quoteArgs": true},}]
}

开始调试

在这里插入图片描述
在这里插入图片描述

代码
链接:https://pan.quark.cn/s/45dedc25c5b4
提取码:7H7s

参考

https://github.com/Trae-AI/Trae/issues/311
https://blog.csdn.net/wzl644/article/details/146067628
https://engincanveske.substack.com/p/debug-your-net-apps-in-cursor-code

http://www.xdnf.cn/news/17248.html

相关文章:

  • Vue3 计算属性与监听器
  • 【MATLAB例程】联邦卡尔曼滤波,主滤波与子滤波融合GPS、IMU、里程计多传感器数据。提供源代码下载链接
  • Zabbix网络发现:自动化监控新利器
  • apiSQL网关调优:释放单节点的最大潜能
  • Trackio:面向机器学习者的本地优先、开源免费的轻量级实验追踪新工具
  • (Arxiv-2025) CINEMA:通过基于MLLM的引导实现多主体一致性视频生成
  • Docker 从入门到实战(一):全面解析容器化革命 | 2025 终极指南
  • Vue 3.2+ 引入的指令 v-memo 性能优化
  • 书生浦语第五期-L1G3-LMDeploy 课程
  • Mac 电脑放在环境变量中的通用脚本
  • Mac下安装Conda虚拟环境管理器
  • 2025小程序怎么快速接入美团核销,实现自动化核销
  • 防火墙概述
  • GPT-OSS重磅开源:当OpenAI重拾“开放”初心
  • 新手向:Python实现图片转ASCII艺术
  • Cell-cultured meat: The new favorite on the future dining table
  • 【昇腾】基于RK3588 arm架构Ubuntu22.04系统上适配Atlas 200I A2加速模块安装EP模式下的驱动固件包_20250808
  • [202403-E]春日
  • Function + 异常策略链:构建可组合的异常封装工具类
  • 智慧社区(十)——声明式日志记录与小区地图功能实现
  • Go通道操作全解析:从基础到高并发模式
  • 智能厨具机器人的革命性升级:Deepoc具身模型外拓板技术解析
  • 第六章第四节 PWM驱动LED呼吸灯 PWM驱动舵机 PWM驱动直流电机
  • Kotlin反射
  • 暴力解决MySQL连接失败
  • 从0配置yolo实例分割(ubuntu)
  • springBoot集成minio并实现文件的上传下载
  • OpenAI 开源模型 GPT-OSS MCP服务器深度解密:从工具集成到系统提示全自动化,浏览器+Python无缝协同的底层逻辑
  • 轻松实现浏览器自动化——AI浏览器自动化框架Stagehand
  • 【R语言】重新绘制高清MaxEnt的单因素响应曲线图像