<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Daedilus</id>
	<title>AlliedModders Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Daedilus"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/Special:Contributions/Daedilus"/>
	<updated>2026-05-16T11:17:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6847</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6847"/>
		<updated>2009-01-16T19:21:12Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''This tutorial is for information purposes only. Please, download and install the .rules file from the link, [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio].'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will prevent us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will release a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz. The app&lt;br /&gt;
&lt;br /&gt;
wizards will allow us to easily create projects as well as provide wizards to add new .sp files. Once I get the AppWiz&lt;br /&gt;
&lt;br /&gt;
completed for creating C++ SourceMod extensions, we will have a complete Visual Studio solution for creating plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6846</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6846"/>
		<updated>2009-01-16T19:20:28Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''This tutorial is for information purposes only. Please, download and install the .rules file from the link, SourcePawn for Visual Studio.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will prevent us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will release a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz. The app&lt;br /&gt;
&lt;br /&gt;
wizards will allow us to easily create projects as well as provide wizards to add new .sp files. Once I get the AppWiz&lt;br /&gt;
&lt;br /&gt;
completed for creating C++ SourceMod extensions, we will have a complete Visual Studio solution for creating plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6845</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6845"/>
		<updated>2009-01-16T19:19:38Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''This tutorial is for information purposes only. Please, download and install the .rules file from the link, SourcePawn for Visual Studio'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will prevent us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will release a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz. The app&lt;br /&gt;
&lt;br /&gt;
wizards will allow us to easily create projects as well as provide wizards to add new .sp files. Once I get the AppWiz&lt;br /&gt;
&lt;br /&gt;
completed for creating C++ SourceMod extensions, we will have a complete Visual Studio solution for creating plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6844</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6844"/>
		<updated>2009-01-16T19:18:32Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''This tutorial is for information purposes. Please download and install the .rules file from the link below'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will prevent us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will release a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz. The app&lt;br /&gt;
&lt;br /&gt;
wizards will allow us to easily create projects as well as provide wizards to add new .sp files. Once I get the AppWiz&lt;br /&gt;
&lt;br /&gt;
completed for creating C++ SourceMod extensions, we will have a complete Visual Studio solution for creating plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6843</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6843"/>
		<updated>2009-01-16T18:15:33Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Configuring the Visual Studio Project for SourceMod */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will prevent us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will release a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz. The app&lt;br /&gt;
&lt;br /&gt;
wizards will allow us to easily create projects as well as provide wizards to add new .sp files. Once I get the AppWiz&lt;br /&gt;
&lt;br /&gt;
completed for creating C++ SourceMod extensions, we will have a complete Visual Studio solution for creating plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6842</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6842"/>
		<updated>2009-01-16T17:07:13Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Adding .sp Files to the Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will release a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz. The app&lt;br /&gt;
&lt;br /&gt;
wizards will allow us to easily create projects as well as provide wizards to add new .sp files. Once I get the AppWiz&lt;br /&gt;
&lt;br /&gt;
completed for creating C++ SourceMod extensions, we will have a complete Visual Studio solution for creating plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6841</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6841"/>
		<updated>2009-01-16T17:06:18Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Adding .sp Files to the Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will release a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz. The &lt;br /&gt;
&lt;br /&gt;
app wizards will allow us to easily create projects as well as provide wizards to add new .sp files. Once I&lt;br /&gt;
&lt;br /&gt;
get the AppWiz for creating C++ SourceMod extensions, we will have a complete Visual Studio solution for creating plugins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6840</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6840"/>
		<updated>2009-01-16T17:04:21Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Adding .sp Files to the Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will release a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz.&lt;br /&gt;
&lt;br /&gt;
The application wizards will allow us to easily create projects as well as provide wizards to add new .sp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6839</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6839"/>
		<updated>2009-01-16T17:03:50Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Adding .sp Files to the Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will releasing a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz.&lt;br /&gt;
&lt;br /&gt;
The application wizards will allow us to easily create projects as well as provide wizards to add new .sp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6838</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6838"/>
		<updated>2009-01-16T17:03:34Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Adding .sp Files to the Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will releasing a Visual Studio SourceMod AppWiz to go along with the Visual Studio C++ Metamod AppWiz.&lt;br /&gt;
The application wizards will allow us to easily create projects as well as provide wizards to add new .sp files.&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6837</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6837"/>
		<updated>2009-01-16T16:55:39Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Configuring the Visual Studio Project for SourceMod */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6836</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6836"/>
		<updated>2009-01-16T16:54:38Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded and installed the .rules file, you will still need to set up the environment variables.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6835</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6835"/>
		<updated>2009-01-16T15:58:12Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Setting the path to the SourcePawn Compiler Using Environment Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
Do not include spcomp.exe in the path. ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting&lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6834</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6834"/>
		<updated>2009-01-16T07:30:06Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Adding .sp Files to the Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step31.jpg&amp;diff=6833</id>
		<title>File:Step31.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step31.jpg&amp;diff=6833"/>
		<updated>2009-01-16T07:28:45Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step30.jpg&amp;diff=6832</id>
		<title>File:Step30.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step30.jpg&amp;diff=6832"/>
		<updated>2009-01-16T07:28:32Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6831</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6831"/>
		<updated>2009-01-16T07:28:21Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding .sp Files to the Project==&lt;br /&gt;
To add a new .sp file to the project, right click the “Source Files” folder filter and select Add-&amp;gt;New Item from the menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step30.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Visual C++-&amp;gt;Utility: Text File (.txt) and name the file including the file extension.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step31.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6830</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6830"/>
		<updated>2009-01-16T07:25:20Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and read through the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6829</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6829"/>
		<updated>2009-01-16T06:48:50Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and complete the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6828</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6828"/>
		<updated>2009-01-16T06:48:28Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and complete the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Building_SourceMod_Plugins_With_Visual_Studio Visual Studio]]&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6827</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6827"/>
		<updated>2009-01-16T06:47:57Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and complete the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Building SourceMod Plugins With Visual Studio]]&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6826</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6826"/>
		<updated>2009-01-16T06:46:56Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and complete the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Building_SourceMod_Plugins_With_Visual_Studio title]]&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6825</id>
		<title>Building SourceMod Plugins With Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod_Plugins_With_Visual_Studio&amp;diff=6825"/>
		<updated>2009-01-16T06:44:15Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: New page: By: Cleveland “Daedilus” Raymond  Date: January 15th, 2009  ==Before We Begin== This tutorial will walk you through the process of creating a Custom Build Rule in Vis...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and complete the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Category:SourceMod_VisualStudio&amp;diff=6824</id>
		<title>Category:SourceMod VisualStudio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Category:SourceMod_VisualStudio&amp;diff=6824"/>
		<updated>2009-01-16T06:39:35Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: Removing all content from page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Category:SourceMod_VisualStudio&amp;diff=6823</id>
		<title>Category:SourceMod VisualStudio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Category:SourceMod_VisualStudio&amp;diff=6823"/>
		<updated>2009-01-16T06:26:51Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Before We Begin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Building SourceMod Plugins with Visual Studio===&lt;br /&gt;
&lt;br /&gt;
By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to create a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and complete the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Category:SourceMod_VisualStudio&amp;diff=6822</id>
		<title>Category:SourceMod VisualStudio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Category:SourceMod_VisualStudio&amp;diff=6822"/>
		<updated>2009-01-16T06:26:04Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: /* Building SourceMod Plugins with Visual Studio */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Building SourceMod Plugins with Visual Studio===&lt;br /&gt;
&lt;br /&gt;
By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to setup a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and complete the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Category:SourceMod_VisualStudio&amp;diff=6821</id>
		<title>Category:SourceMod VisualStudio</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Category:SourceMod_VisualStudio&amp;diff=6821"/>
		<updated>2009-01-16T06:25:07Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: New page: ===Building SourceMod Plugins with Visual Studio===  By: Cleveland “~~~” Raymond  Date: January 15th, 2009   ==Before We Begin== This tutorial will walk you through the process of crea...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Building SourceMod Plugins with Visual Studio===&lt;br /&gt;
&lt;br /&gt;
By: Cleveland “[[User:Daedilus|Daedilus]]” Raymond&lt;br /&gt;
&lt;br /&gt;
Date: January 15th, 2009&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Before We Begin==&lt;br /&gt;
This tutorial will walk you through the process of creating a Custom Build Rule in Visual Studio for SourcePawn. Once you have completed&lt;br /&gt;
&lt;br /&gt;
the following steps, you will be able to setup a Custom Build Rule for any tool that you may wish to integrate into Visual Studio.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
To learn more about custom build rules, go to http://msdn.microsoft.com/en-us/library/03t8bzzy.aspx &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In order for all of us to be able to share our projects, it is important that we use the same Custom Build Rules. I have provided the following&lt;br /&gt;
&lt;br /&gt;
link to the [http://members.cox.net/cleveraymond/SourceModVS/SourcePawn.rules SourcePawn for Visual Studio] Custom Build Rule file that was created during the process of making this tutorial. Save the file to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Visual Studio Path&amp;gt;\VC\VCProjectDefaults and complete the tutorial. This link, [http://members.cox.net/cleveraymond/SourceModVS/SourceModVS.zip MyPlugin], is where you can grab my test project.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note: .rules files are compatible with both, VS 2005 Pro and VS 2008 Pro (These are the only versions I have to test with.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting the path to the SourcePawn Compiler Using Environment Variables==&lt;br /&gt;
Bring up the “System Properties” dialog and press the “Advanced” tab and then press the “Environment Variables” button.&lt;br /&gt;
&lt;br /&gt;
(To open the “System Properties” dialog, right click “My Computer”, choose “Properties” from the menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New” button in the “System Variables” group.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the variable, “SourcePawn” and set value to the path to spcomp.exe (without the trailing ’\’)&lt;br /&gt;
&lt;br /&gt;
ex. G:\Valve\HLServer\orangebox\dod\addons\sourcemod\scripting &lt;br /&gt;
&lt;br /&gt;
[[Image:Step3.jpg]]&lt;br /&gt;
&lt;br /&gt;
If you want to be able to use spcomp from cmd.exe, add the newly created environment variable, '''%SourcePawn%''', to the Path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating the Visual Studio Solution==&lt;br /&gt;
To create a blank Visual Studio Solution, select File-&amp;gt;New-&amp;gt;Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step5.jpg]]&lt;br /&gt;
&lt;br /&gt;
Name the solution and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding the Visual Studio Project for SourceMod to the Solution==&lt;br /&gt;
To add the Visual Studio Project for SourceMod to the Solution, right click the Solution, Add-&amp;gt;New Project…&lt;br /&gt;
&lt;br /&gt;
[[Image:Step7.jpg]]&lt;br /&gt;
&lt;br /&gt;
Create a Win32 C++ Project. This will be used as the base for our SourceMod Plugin Project and press OK.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step8.jpg]]&lt;br /&gt;
&lt;br /&gt;
Choose “DLL” for the application type and check “Empty project” under additional options and press Finish.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step9.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Visual Studio Project for SourceMod==&lt;br /&gt;
To configure the Visual Studio Project for SourceMod, right click the Project, and choose “Properties” from the menu.&lt;br /&gt;
&lt;br /&gt;
Note: I removed “Header Files” and “Resource Files” filters since they are no longer needed. You can setup your own folder filters to how you see fit.&lt;br /&gt;
&lt;br /&gt;
(I modified my menu graphic to reduce the image size. “Properties” will be found at the bottom of the context menu)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step10.jpg]]&lt;br /&gt;
&lt;br /&gt;
Set the Configuration to “All Configurations” and set the properties for “General” settings as defined below. Under&lt;br /&gt;
&lt;br /&gt;
“Project Default”, make sure the “Configuration Type” is set to “Utility”. This will keep us from building a DLL.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step11.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''(The next steps are optional. You can skip this and go to the next section, “Creating a Custom Build Rule for SourcePawn“.)'''&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Press the “Configuration Manager…” button located at the top right and edit the “Active solution configuration”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step12.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step13.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the “Active solution platform”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step14.jpg]]&lt;br /&gt;
&lt;br /&gt;
Rename the “Win32” platform to “SourcePawn”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step15.jpg]]&lt;br /&gt;
&lt;br /&gt;
Edit the project’s configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step16.jpg]]&lt;br /&gt;
&lt;br /&gt;
Remove the “Debug” configuration and rename the “Release” configuration to “Build” (Yes we already did this for the solution, not the project).&lt;br /&gt;
&lt;br /&gt;
[[Image:Step17.jpg]]&lt;br /&gt;
&lt;br /&gt;
We are finished setting up the Visual Studio Project. Now on to configuring the custom build options for SourcePawn (Unfortunately you can’t edit the project’s platform to change its name).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating a Custom Build Rule for SourcePawn==&lt;br /&gt;
To create a Custom Build Rule for SourcePawn, right click the Project, and choose “Custom Build Rules…” from the menu&lt;br /&gt;
&lt;br /&gt;
[[Image:Step18.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the “New Rule File…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step19.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “New Rule File” dialog with the settings below and press the “Add Build Rule…” button.&lt;br /&gt;
&lt;br /&gt;
(Note: The default path for C++ .rules files is, “&amp;lt;Visual Studio Install Path&amp;gt;\VC\VCProjectDefaults”)&lt;br /&gt;
&lt;br /&gt;
[[Image:Step20.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add Custom Build Rule” dialog with the settings below and press the “Add Build Rule…” button. The “Command Line”&lt;br /&gt;
&lt;br /&gt;
property has three entries separated by newlines. (Note: this is where we use the environment variable we made in the beginning)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''$(SourcePawn)\spcomp.exe &amp;quot;$(ProjectDir)[InputFile].sp&amp;quot; [CmdLine]'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].smx&amp;quot; &amp;quot;$(OutDir)\[OutputFile].smx&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''if exist &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; move &amp;quot;$(ProjectDir)[InputFile].asm&amp;quot; &amp;quot;$(OutDir)\[OutputFile].asm&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have filled in the settings, press the “Add Property…” button.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step21.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fill out the “Add User Property” dialog with the settings below. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the input (.sp) file relative to the project directory. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step22.jpg]]&lt;br /&gt;
&lt;br /&gt;
Add another property. This will allow us to specify the output .smx file name In the project properties dialog.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies the output (.smx) file name. Do not include the file extension in the name.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step23.jpg]]&lt;br /&gt;
&lt;br /&gt;
Let’s add one more property to handle additional command line options.&lt;br /&gt;
&lt;br /&gt;
The “Description” property is set to: '''Specifies additional command line arguments.  ex. -a'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Step24.jpg]]&lt;br /&gt;
&lt;br /&gt;
Keep pressing the ok buttons until you are back to the main window.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have setup SourcePawn to work with Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Syntax Highlighting for .sp and .inc Files==&lt;br /&gt;
To add syntax highlighting, go to Tools-&amp;gt;Options.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step25.jpg]]&lt;br /&gt;
&lt;br /&gt;
Select Text Editor-&amp;gt;File Extension and add .inc and .sp to the “Extension” list. Choose “Microsoft Visual C++” for the editor.&lt;br /&gt;
&lt;br /&gt;
Don’t close the “Options” dialog cause we need to tell Visual Studio where to find SourceMod’s .inc files.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step26.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: You will have to restart Visual Studio for the highlighting to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enable #include &amp;lt;file&amp;gt; Navigation==&lt;br /&gt;
Visual Studio will try to open any included file if you right click the file name and choose “Open Document &amp;lt;file name&amp;gt;”.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step27.jpg]]&lt;br /&gt;
&lt;br /&gt;
However, Visual Studio doesn’t know where to look for  SourceMod’s .inc files. So, let’s tell Visual Studio where to find them. Select Projects and&lt;br /&gt;
&lt;br /&gt;
Solutions-&amp;gt;VC++ Directories and then select “Include files” from the “Show directories for:” combo. Press the ‘folder’ button and enter the path.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step28.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Visual Studio will not navigate to an include file without the file extension. ex. #include &amp;lt;sourcemod&amp;gt; cannot be found.&lt;br /&gt;
&lt;br /&gt;
This is because we are piggy backing on a Visual Studio C++ Project and Visual Studio only knows how to open .h and .hpp files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Visual Studio will open the include file if you include the file extension: ex. #include &amp;lt;file.sp&amp;gt; or #include &amp;lt;sourcemod.inc&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SourcePawn Custom Build Project Settings==&lt;br /&gt;
Reopen the project’s properties and check out the new “SourcePawn” options. The “Input File” and “Output File”, default to the project’s name. This means that I would have&lt;br /&gt;
&lt;br /&gt;
to have a MyPlugin.sp file in the project’s directory and the build would produce a MyPlugin.smx file in the location defined Configuration Properties-&amp;gt;General: Output Directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Step29.jpg]]&lt;br /&gt;
&lt;br /&gt;
Happy Coding, Daedilus…&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step29.jpg&amp;diff=6820</id>
		<title>File:Step29.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step29.jpg&amp;diff=6820"/>
		<updated>2009-01-16T05:59:41Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step28.jpg&amp;diff=6819</id>
		<title>File:Step28.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step28.jpg&amp;diff=6819"/>
		<updated>2009-01-16T05:59:35Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step27.jpg&amp;diff=6818</id>
		<title>File:Step27.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step27.jpg&amp;diff=6818"/>
		<updated>2009-01-16T05:59:29Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step26.jpg&amp;diff=6817</id>
		<title>File:Step26.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step26.jpg&amp;diff=6817"/>
		<updated>2009-01-16T05:59:23Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step25.jpg&amp;diff=6816</id>
		<title>File:Step25.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step25.jpg&amp;diff=6816"/>
		<updated>2009-01-16T05:59:17Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step24.jpg&amp;diff=6815</id>
		<title>File:Step24.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step24.jpg&amp;diff=6815"/>
		<updated>2009-01-16T05:59:05Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step23.jpg&amp;diff=6814</id>
		<title>File:Step23.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step23.jpg&amp;diff=6814"/>
		<updated>2009-01-16T05:58:57Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step22.jpg&amp;diff=6813</id>
		<title>File:Step22.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step22.jpg&amp;diff=6813"/>
		<updated>2009-01-16T05:58:51Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step21.jpg&amp;diff=6812</id>
		<title>File:Step21.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step21.jpg&amp;diff=6812"/>
		<updated>2009-01-16T05:58:45Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step20.jpg&amp;diff=6811</id>
		<title>File:Step20.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step20.jpg&amp;diff=6811"/>
		<updated>2009-01-16T05:58:32Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step19.jpg&amp;diff=6810</id>
		<title>File:Step19.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step19.jpg&amp;diff=6810"/>
		<updated>2009-01-16T05:58:26Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step18.jpg&amp;diff=6809</id>
		<title>File:Step18.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step18.jpg&amp;diff=6809"/>
		<updated>2009-01-16T05:58:20Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step17.jpg&amp;diff=6808</id>
		<title>File:Step17.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step17.jpg&amp;diff=6808"/>
		<updated>2009-01-16T05:58:12Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step16.jpg&amp;diff=6807</id>
		<title>File:Step16.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step16.jpg&amp;diff=6807"/>
		<updated>2009-01-16T05:57:42Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step15.jpg&amp;diff=6806</id>
		<title>File:Step15.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step15.jpg&amp;diff=6806"/>
		<updated>2009-01-16T05:57:35Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step14.jpg&amp;diff=6805</id>
		<title>File:Step14.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step14.jpg&amp;diff=6805"/>
		<updated>2009-01-16T05:57:28Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step13.jpg&amp;diff=6804</id>
		<title>File:Step13.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step13.jpg&amp;diff=6804"/>
		<updated>2009-01-16T05:57:20Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step12.jpg&amp;diff=6803</id>
		<title>File:Step12.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step12.jpg&amp;diff=6803"/>
		<updated>2009-01-16T05:57:14Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step11.jpg&amp;diff=6802</id>
		<title>File:Step11.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step11.jpg&amp;diff=6802"/>
		<updated>2009-01-16T05:57:08Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step10.jpg&amp;diff=6801</id>
		<title>File:Step10.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step10.jpg&amp;diff=6801"/>
		<updated>2009-01-16T05:57:02Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step9.jpg&amp;diff=6800</id>
		<title>File:Step9.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step9.jpg&amp;diff=6800"/>
		<updated>2009-01-16T05:56:55Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step8.jpg&amp;diff=6799</id>
		<title>File:Step8.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step8.jpg&amp;diff=6799"/>
		<updated>2009-01-16T05:56:10Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=File:Step7.jpg&amp;diff=6798</id>
		<title>File:Step7.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=File:Step7.jpg&amp;diff=6798"/>
		<updated>2009-01-16T05:55:56Z</updated>

		<summary type="html">&lt;p&gt;Daedilus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Daedilus</name></author>
		
	</entry>
</feed>