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

Commit ba0d1a3

Browse files
author
Joakim Wennergren
committed
Documented all changes in previous commit
1 parent d000f00 commit ba0d1a3

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This is a fork of UFO's plugin package updated for VS2015
1313
## Getting started
1414
1. Download a [release](https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/releases/)
1515
2. Place the visual studio project template (the `NppPlugin.zip`) in the visual studio path (typically `"My Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#\"`)
16-
3. Ensure you have installed **Visual C++** from the visual studio installer otherwise your project wont build<br>
16+
3. If you intend to debug Notepad++ itself (and not just the plugin) ensure you have installed **Visual C++** from the visual studio installer<br>
1717
![install CPP](/documentation/installcpp.png)
1818
4. Create a new project inside Visual studio using `file -> new -> project -> visual C# -> Notepad++ project`
1919
5. Build (building will copy the dll to the `Notepad++/plugins` folder)
@@ -39,6 +39,7 @@ This is a fork of UFO's plugin package updated for VS2015
3939
* https://github.com/kbilsted/NppPluginRebaseAssister
4040
* https://github.com/nea/MarkdownViewerPlusPlus
4141
* https://github.com/AnnaVel/RtfHelper
42+
* https://github.com/jokedst/CsvQuery
4243

4344
If your plugin is not on the list, please make a PR with a link to it.. :-)
4445

@@ -76,9 +77,17 @@ The architecture of the plugin is.
7677
+-----------+
7778

7879
### How to debug plugins
79-
80+
* Install both 32 bit and 64 bit versions of Notepad++ (if you intend to publish for both)
81+
* Give yourself write permissions to the Notepad++ plugin folders
82+
* Usually `C:\Program Files (x86)\Notepad++\plugins\` (for 32 bit) and `C:\Program Files\Notepad++\plugins\` (for 64 bit)
83+
* Or run Visual Studio as administrator (not recommended)
84+
* In Visual Studio, choose Platform to debug (x86 or x64)
85+
* Make sure Notepad++ is not running
86+
* Start Debugging (F5 by default)
87+
88+
Or you can attach to a running process:
8089
* start notepad++
81-
* in Visualstudio: debug -> attach to process... -> notepad++.exe
90+
* in Visual Studio: debug -> attach to process... -> notepad++.exe
8291

8392
you can now set breakpoints and step-execute. (currently not working in v6.9.2 https://github.com/notepad-plus-plus/notepad-plus-plus/issues/1964)
8493

@@ -107,6 +116,14 @@ The best way is to install [MSBuild.ILMerge.Task][1] via NuGet in your plugin pr
107116

108117
*Note: To use ILMerge in your plugin you have to change the **Target Framework** of your plugin project to at least .NET Framework 4.0 (CP). ILMerge can work with .NET 3.5 and below, but requires additional configuration and adaptation. If you do not required the extreme backwards compatibility, upgrade the .NET Framework target as quick and easy solution.*
109118

119+
### 32 vs 64 bit
120+
Notepad++ comes in two versions, 32 bit and 64 bit. Unfortunately this means plugins need to create two versions as well.
121+
122+
Using this template you can switch between the two using the Visual Studio "Target Platform" drop-down.
123+
124+
When publishing your plugin you should build in Release mode for both x86 and x64 and publish both resulting dll's (e.g. `bin/Release/myPlugin.dll` and `/bin/Release-x64/MyPlugin.dll`)
125+
126+
110127
## Versioning
111128
Until we reach v1.0 expect a bit of chaos and breaking changes.
112129

Visual Studio Project Template C#/$projectname$.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
5151
</PropertyGroup>
5252
<PropertyGroup>
53+
<!-- Default values for debugging sso it start correct version of Notepad++
54+
$(ProgramW6432) and $(MSBuildProgramFiles32) points to the 64 and 32 bit "Program Files" directories -->
5355
<StartAction>Program</StartAction>
5456
<StartProgram Condition="'$(Platform)'=='x64'">$(ProgramW6432)\Notepad++\notepad++.exe</StartProgram>
5557
<StartProgram Condition="'$(Platform)'=='x86'">$(MSBuildProgramFiles32)\Notepad++\notepad++.exe</StartProgram>

Visual Studio Project Template C#/PluginInfrastructure/DllExport/NppPlugin.DllExport.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
DependsOnTargets="GetFrameworkPaths"
77
>
88
<PropertyGroup>
9+
<!-- LibToolPath is optional - it's needed to debug C++, but you can still debug the C# code without it
10+
If you don't have the C++ toolchain installed this is missing, but then you can't' debug C++ anyway -->
911
<LibToolPath Condition="Exists('$(DevEnvDir)\..\..\VC\bin')">$(DevEnvDir)\..\..\VC\bin</LibToolPath>
1012
</PropertyGroup>
1113
<DllExportTask Platform="$(Platform)"
@@ -24,6 +26,10 @@
2426
LibToolDllPath="$(DevEnvDir)"
2527
SdkPath="$(SDK40ToolsPath)"/>
2628

29+
<!-- $(MSBuildProgramFiles32) points to the 32 bit program files dir.
30+
On 32 bit windows usually C:\Program Files\
31+
On 64 bit windows usually C:\Program Files (x86)\
32+
$(ProgramW6432) points to the 64bit Program Files (on 32 bit windows it is blank) -->
2733
<Copy
2834
SourceFiles="$(TargetPath)"
2935
DestinationFolder="$(MSBuildProgramFiles32)\Notepad++\plugins\"

0 commit comments

Comments
 (0)