我没有更改插件源代码。我问了插件的作者https://github.com/mohzy83/NppMarkdownPanel/issues/13但他写道构建是成功的。那为什么会有警告呢?
1>------ Build started: Project: NppMarkdownPanel, Configuration: Debug x64 ------
1>C:\Users\Uzzer\Downloads\NppMarkdownPanel-master\NppMarkdownPanel\MarkdownPanelController.cs(101,30,101,32): warning CS0168: The variable 'ex' is declared but never used
1>C:\Users\Uzzer\Downloads\NppMarkdownPanel-master\NppMarkdownPanel\MarkdigMarkdownGenerator.cs(36,30,36,31): warning CS0168: The variable 'e' is declared but never used
1> NppMarkdownPanel -> C:\Users\Uzzer\Downloads\NppMarkdownPanel-master\NppMarkdownPanel\bin\Debug-x64\NppMarkdownPanel.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========[!
Notepad++ 本身不会引诱内置插件:

也许我没有安装一些组件?这是我的 visual-studio-2017 配置文件:
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"microsoft.net.componentgroup.targetingpacks.common",
"microsoft.componentgroup.blend",
"microsoft.visualstudio.component.entityframework",
"microsoft.visualstudio.component.debugger.justintime",
"microsoft.visualstudio.component.vc.tools.x86.x64",
"microsoft.visualstudio.componentgroup.nativedesktop.winxp",
"microsoft.visualstudio.component.vc.140",
"microsoft.visualstudio.component.diagnostictools"
]
}
从这个文件中,您可以找出组装需要哪些组件?
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="NppPlugin.DllExport.MSBuild.DllExportTask"
AssemblyFile="NppPlugin.DllExport.MSBuild.dll"/>
<Target Name="AfterBuild"
DependsOnTargets="GetFrameworkPaths"
>
<PropertyGroup>
<!-- LibToolPath is optional - it's needed to debug C++, but you can still debug the C# code without it
If you don't have the C++ toolchain installed this is missing, but then you can't' debug C++ anyway -->
<LibToolPath Condition="Exists('$(DevEnvDir)\..\..\VC\bin')">$(DevEnvDir)\..\..\VC\bin</LibToolPath>
</PropertyGroup>
<DllExportTask Platform="$(Platform)"
PlatformTarget="$(PlatformTarget)"
CpuType="$(CpuType)"
EmitDebugSymbols="$(DebugSymbols)"
DllExportAttributeAssemblyName="$(DllExportAttributeAssemblyName)"
DllExportAttributeFullName="$(DllExportAttributeFullName)"
Timeout="$(DllExportTimeout)"
KeyContainer="$(KeyContainerName)$(AssemblyKeyContainerName)"
KeyFile="$(KeyOriginatorFile)"
ProjectDirectory="$(MSBuildProjectDirectory)"
InputFileName="$(TargetPath)"
FrameworkPath="$(TargetedFrameworkDir);$(TargetFrameworkDirectory)"
LibToolPath="$(LibToolPath)"
LibToolDllPath="$(DevEnvDir)"
SdkPath="$(SDK40ToolsPath)"/>
<!-- $(MSBuildProgramFiles32) points to the 32 bit program files dir.
On 32 bit windows usually C:\Program Files\
On 64 bit windows usually C:\Program Files (x86)\
$(ProgramW6432) points to the 64bit Program Files (on 32 bit windows it is blank) -->
<Copy
SourceFiles="$(TargetPath)"
DestinationFolder="C:\npp\npp32\plugins\$(ProjectName)\"
Condition="Exists('C:\npp\npp32\plugins\$(ProjectName)\') AND '$(Platform)'=='x86'"
ContinueOnError="false" />
<Copy
SourceFiles="$(TargetPath)"
DestinationFolder="C:\npp\npp64\plugins\$(ProjectName)\"
Condition="Exists('C:\npp\npp64\plugins\$(ProjectName)\') AND '$(Platform)'=='x64'"
ContinueOnError="false" />
</Target>
</Project>

