Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 09f9513

Browse files
committed
copy dll using the csproj
upgrading dll export target
1 parent f21d4a6 commit 09f9513

File tree

3 files changed

+16
-49
lines changed

3 files changed

+16
-49
lines changed

Demo Plugin/CopyPluginToNpp.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

Demo Plugin/NppManagedPluginDemo/DllExport/NppPlugin.DllExport.targets

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@
2020
LibToolPath="$(DevEnvDir)\..\..\VC\bin"
2121
LibToolDllPath="$(DevEnvDir)"
2222
SdkPath="$(SDK40ToolsPath)"/>
23+
24+
<Copy SourceFiles="$(TargetPath)" DestinationFolder="C:\Program Files (x86)\Notepad++\plugins\" ContinueOnError="false" />
2325
</Target>
24-
</Project>
26+
</Project>
Lines changed: 13 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
4-
<PropertyGroup>
5-
<PostBuildEventDependsOn>
6-
$(PostBuildEventDependsOn);
7-
NppPluginDllExport
8-
</PostBuildEventDependsOn>
9-
</PropertyGroup>
10-
11-
<PropertyGroup>
12-
<BuildDependsOn>
13-
$(BuildDependsOn);
14-
NppPluginDllExport
15-
</BuildDependsOn>
16-
</PropertyGroup>
17-
18-
<UsingTask TaskName="NppPlugin.DllExport.MSBuild.DllExportAppDomainIsolatedTask"
1+
<Project
2+
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<UsingTask TaskName="NppPlugin.DllExport.MSBuild.DllExportTask"
194
AssemblyFile="NppPlugin.DllExport.MSBuild.dll"/>
20-
21-
<Target Name="NppPluginDllExport"
22-
DependsOnTargets="GetFrameworkPaths">
23-
24-
<!--
25-
These properties can still be applied to the task, but upon installation of a
26-
new version of the nuget package, the properties
27-
DllExportAttributeAssemblyName and DllExportAttributeAssemblyName will be removed from the project.
28-
So, if you want to provide an alternative attribute name, the you have to name the property in your project file differently.
29-
30-
e.g.:
31-
DllExportAttributeAssemblyName="$(MyDllExportAttributeAssemblyName)"
32-
DllExportAttributeFullName="$(MyDllExportAttributeFullName)"
33-
-->
34-
<PropertyGroup>
35-
<DllExportLeaveIntermediateFiles Condition="'$(DllExportLeaveIntermediateFiles)'==''">
36-
false
37-
</DllExportLeaveIntermediateFiles>
38-
39-
40-
</PropertyGroup>
41-
42-
<DllExportAppDomainIsolatedTask Platform="$(Platform)"
5+
<Target Name="AfterBuild"
6+
DependsOnTargets="GetFrameworkPaths"
7+
>
8+
<DllExportTask Platform="$(Platform)"
439
PlatformTarget="$(PlatformTarget)"
4410
CpuType="$(CpuType)"
4511
EmitDebugSymbols="$(DebugSymbols)"
46-
LeaveIntermediateFiles="$(DllExportLeaveIntermediateFiles)"
12+
DllExportAttributeAssemblyName="$(DllExportAttributeAssemblyName)"
13+
DllExportAttributeFullName="$(DllExportAttributeFullName)"
4714
Timeout="$(DllExportTimeout)"
4815
KeyContainer="$(KeyContainerName)$(AssemblyKeyContainerName)"
4916
KeyFile="$(KeyOriginatorFile)"
@@ -52,8 +19,8 @@
5219
FrameworkPath="$(TargetedFrameworkDir);$(TargetFrameworkDirectory)"
5320
LibToolPath="$(DevEnvDir)\..\..\VC\bin"
5421
LibToolDllPath="$(DevEnvDir)"
55-
TargetFrameworkVersion="$(TargetFrameworkVersion)"
56-
SdkPath="$(SDK40ToolsPath)"
57-
SkipOnAnyCpu="$(NoDllExportsForAnyCpu)"/>
22+
SdkPath="$(SDK40ToolsPath)"/>
23+
24+
<Copy SourceFiles="$(TargetPath)" DestinationFolder="C:\Program Files (x86)\Notepad++\plugins\" ContinueOnError="false" />
5825
</Target>
59-
</Project>
26+
</Project>

0 commit comments

Comments
 (0)