如何调试VisualStudio Mac 2022扩展名?

发布于 2025-01-30 06:18:39 字数 233 浏览 5 评论 0原文

我已经构建了一个非常简单的.net6库,其中添加了一个Hello World Pad。

我如何运行/调试此 project

I've build a very simple .net6 library with a visual-studio-mac extension that adds a hello world kind of Pad.

How can I run/debug this project in a new instance of VSMac?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉薄对峙 2025-02-06 06:18:39

您必须将此ProjectTypeguid添加到项目文件中,以便AddinMaker扩展名可以将“ Execute”添加到支持的项目功能并创建Execute命令以运行扩展名。

<ProjectTypeGuids>{86F6BF2A-E449-4B3E-813B-9ACC37E5545F}</ProjectTypeGuids>

尽管这允许运行扩展名,但它不是VSMAC 2022的正确解决方案。
为了使您的扩展名与新版本的Visual Studio完全兼容,您需要参考新库(17.x)。要这样做,包括您的.csproj中的以下内容:

 <ItemGroup>
    <PackageReference Include="Microsoft.VisualStudioMac.Sdk" Version="17.0.0-preview.7955" />

    <Reference Include="Xamarin.Mac">
        <HintPath>\Applications\Visual Studio %28Preview%29.app\Contents\MonoBundle\Xamarin.Mac.dll</HintPath>
        <Private>False</Private>
    </Reference>
 </ItemGroup>

You have to add this ProjectTypeGuid to the project file so that the AddInMaker extension can add "Execute" to supported project features and create the execute command to run your extension.

<ProjectTypeGuids>{86F6BF2A-E449-4B3E-813B-9ACC37E5545F}</ProjectTypeGuids>

Although this allows to run your extension, it's not the correct solution for vsmac 2022.
For your extension to be fully compatible with the new version of visual studio, you need to reference the new libraries (17.x). To do this include the following in your .csproj:

 <ItemGroup>
    <PackageReference Include="Microsoft.VisualStudioMac.Sdk" Version="17.0.0-preview.7955" />

    <Reference Include="Xamarin.Mac">
        <HintPath>\Applications\Visual Studio %28Preview%29.app\Contents\MonoBundle\Xamarin.Mac.dll</HintPath>
        <Private>False</Private>
    </Reference>
 </ItemGroup>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文