我正在尝试为 Revit 创建一个简单的多版本hello World
插件,并且我找到了我正在尝试跟进的这篇文章。但是,我并没有走得太远。我不太熟悉 .csproj 文件的工作原理。我之前为各个 Revit 年创建了插件,但没有为多个版本创建插件。
下面是我的 .csProj 代码。我试图从小处着手,只处理 Revit 2018 的 .net 框架 4.5.2。您还可以在底部找到我的项目属性的片段。不再有一个开放的,Start External Application:
所以我不知道如何通过 Revit 调试它。
任何和所有的帮助/方向表示赞赏。
使用下面的当前 .csproj 代码,我收到此弹出错误:
.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net452<!--;net46;net47--></TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<!--<Platforms>x64</Platforms>-->
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Any CPU' ">
<DefineConstants>DEBUG</DefineConstants>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<PlatformTarget>x64</PlatformTarget>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
<DefineConstants>$(DefineConstants);REVIT2018</DefineConstants>
<!--<AssemblyName>helloWorld</AssemblyName>-->
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<!--<Reference Include="AdWindows">
<HintPath>......\2018\AdWindows.dll</HintPath>
<EmbedInteropTypes>false</EmbedInteropTypes>
<Private>false</Private>
</Reference>-->
<Reference Include="RevitAPI">
<HintPath>C:\Program Files\Autodesk\Revit 2018\RevitAPI.dll</HintPath>
<EmbedInteropTypes>false</EmbedInteropTypes>
<Private>false</Private>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>C:\Program Files\Autodesk\Revit 2018\RevitAPIUI.dll</HintPath>
<EmbedInteropTypes>false</EmbedInteropTypes>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</Project>