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

Commit d000f00

Browse files
author
Joakim Wennergren
committed
x86 and x64 works, including debugging
1 parent 8898006 commit d000f00

File tree

2 files changed

+39
-13
lines changed

2 files changed

+39
-13
lines changed

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

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,15 @@
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6-
<SchemaVersion>2.0</SchemaVersion>
7-
<ProjectGuid>{E56F6E12-089C-40ED-BCFD-923E5FA121A1}</ProjectGuid>
6+
<ProjectGuid>{$guid1$}</ProjectGuid>
87
<OutputType>Library</OutputType>
98
<AppDesignerFolder>Properties</AppDesignerFolder>
109
<RootNamespace>$safeprojectname$</RootNamespace>
1110
<AssemblyName>$safeprojectname$</AssemblyName>
1211
<OutputPath>bin\Debug\</OutputPath>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14-
<FileUpgradeFlags>
15-
</FileUpgradeFlags>
16-
<UpgradeBackupLocation>
17-
</UpgradeBackupLocation>
18-
<OldToolsVersion>3.5</OldToolsVersion>
12+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1913
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
2115
<DebugSymbols>true</DebugSymbols>
2216
<DefineConstants>DEBUG;TRACE</DefineConstants>
2317
<DebugType>full</DebugType>
@@ -27,7 +21,7 @@
2721
<PlatformTarget>x86</PlatformTarget>
2822
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
2923
</PropertyGroup>
30-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
3125
<DefineConstants>TRACE</DefineConstants>
3226
<Optimize>true</Optimize>
3327
<OutputPath>bin\Release</OutputPath>
@@ -36,6 +30,30 @@
3630
<PlatformTarget>x86</PlatformTarget>
3731
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
3832
</PropertyGroup>
33+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
34+
<DebugSymbols>true</DebugSymbols>
35+
<DefineConstants>DEBUG;TRACE</DefineConstants>
36+
<DebugType>full</DebugType>
37+
<ErrorReport>prompt</ErrorReport>
38+
<Optimize>false</Optimize>
39+
<OutputPath>bin\Debug-x64</OutputPath>
40+
<PlatformTarget>x64</PlatformTarget>
41+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
42+
</PropertyGroup>
43+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
44+
<DefineConstants>TRACE</DefineConstants>
45+
<Optimize>true</Optimize>
46+
<OutputPath>bin\Release-x64</OutputPath>
47+
<DebugType>pdbonly</DebugType>
48+
<ErrorReport>prompt</ErrorReport>
49+
<PlatformTarget>x64</PlatformTarget>
50+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
51+
</PropertyGroup>
52+
<PropertyGroup>
53+
<StartAction>Program</StartAction>
54+
<StartProgram Condition="'$(Platform)'=='x64'">$(ProgramW6432)\Notepad++\notepad++.exe</StartProgram>
55+
<StartProgram Condition="'$(Platform)'=='x86'">$(MSBuildProgramFiles32)\Notepad++\notepad++.exe</StartProgram>
56+
</PropertyGroup>
3957
<ItemGroup>
4058
<Reference Include="System" />
4159
<Reference Include="System.Drawing" />

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<Target Name="AfterBuild"
66
DependsOnTargets="GetFrameworkPaths"
77
>
8+
<PropertyGroup>
9+
<LibToolPath Condition="Exists('$(DevEnvDir)\..\..\VC\bin')">$(DevEnvDir)\..\..\VC\bin</LibToolPath>
10+
</PropertyGroup>
811
<DllExportTask Platform="$(Platform)"
912
PlatformTarget="$(PlatformTarget)"
1013
CpuType="$(CpuType)"
@@ -17,14 +20,19 @@
1720
ProjectDirectory="$(MSBuildProjectDirectory)"
1821
InputFileName="$(TargetPath)"
1922
FrameworkPath="$(TargetedFrameworkDir);$(TargetFrameworkDirectory)"
20-
LibToolPath="$(DevEnvDir)\..\..\VC\bin"
23+
LibToolPath="$(LibToolPath)"
2124
LibToolDllPath="$(DevEnvDir)"
2225
SdkPath="$(SDK40ToolsPath)"/>
2326

2427
<Copy
2528
SourceFiles="$(TargetPath)"
26-
DestinationFolder="C:\Program Files (x86)\Notepad++\plugins\"
27-
Condition="Exists('C:\Program Files (x86)\Notepad++\plugins\')"
29+
DestinationFolder="$(MSBuildProgramFiles32)\Notepad++\plugins\"
30+
Condition="Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\') AND '$(Platform)'=='x86'"
31+
ContinueOnError="false" />
32+
<Copy
33+
SourceFiles="$(TargetPath)"
34+
DestinationFolder="$(ProgramW6432)\Notepad++\plugins\"
35+
Condition="Exists('$(ProgramW6432)\Notepad++\plugins\') AND '$(Platform)'=='x64'"
2836
ContinueOnError="false" />
2937
</Target>
3038
</Project>

0 commit comments

Comments
 (0)