Moving Mod And Source Files

From Valve Developer Community
Revision as of 15:54, 17 September 2009 by Grash (talk | contribs) (Draft - Work In Progress)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Fix file copying in Visual Studio Solution

Right-click > Properties on the Server and Client projects. You will need to do this for both the Release and the Debug configuration; four times in all.

  1. Navigate to Configuration Properties > Custom Build Step.
  2. Click on Command Line, then click on the ... button that appears on the right.
  3. Replace the contents of the new dialogue with the first code block below.
  4. Click on Outputs and paste in the second code block below.
Warning.pngWarning:Remember to change "client" to "server" in the code blocks below when appropriate, and, of course, to fill in the actual target destination.
Note.pngNote:The "<YOUR MOD PATH>" is the path of your "..steamapps\SourceMods\<Your Mod>" directory, and not the directory of your Visual Studio Project.

Command Line

if exist "<YOUR MOD PATH>\bin\client.dll" attrib -r "<YOUR MOD PATH>\bin\client.dll"
copy "$(TargetDir)"client.dll "<YOUR MOD PATH>\bin\"
if exist "<YOUR MOD PATH>\bin\client.pdb" attrib -r "<YOUR MOD PATH>\bin\client.pdb"
if exist "$(TargetDir)"client.pdb copy "$(TargetDir)"client.pdb "<YOUR MOD PATH>\bin\"

Outputs

<YOUR MOD PATH>\bin\client.dll;<YOUR MOD PATH>\bin\client.pdb


If errors persist is possible that you have a corrupted bin file instead a bin folder at you steam mod path, delete it and recompile or create your mod project again.