Skip to content

Specify SolidWorks install location

Johannes Egger edited this page Jun 13, 2016 · 1 revision

By default we assume that SolidWorks is installed to C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\. If you have multiple installations of SolidWorks or just specified a different installation location you have to specify the correct path in order to get the build working. You can do so by placing a custom <project-name>.csproj.user file in the same folder as the main <project-name>.csproj file. A typical *.csproj.user file looks like:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
    <!-- For addin projects only -->
    <StartProgram>C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS %284%29\SLDWORKS.exe</StartProgram>
    <!-- For all projects that reference the SolidWorks DLLs -->
    <SolidWorksLocation>C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS (4)\</SolidWorksLocation>
  </PropertyGroup>
</Project>

Thanks to @trootcode for figuring this out.

Clone this wiki locally