Question

This code fails when run from VisualStudio 2010 csproj file. Please help.

<PropertyGroup>
    <IntelliLockLocation>"C:\Program Files (x86)\Eziriz\IntelliLock\INTELLILOCK.exe"</IntelliLockLocation>
    <IntelliLockProject>"C:\Downloads\intellilock.ilproj"</IntelliLockProject>
  </PropertyGroup>

<Target Name="AfterCompile">
    <Exec Command="$(IntelliLockLocation) -project $(IntelliLockProject) -file &quot;$(ProjectDir)$(IntermediateOutputPath)$(TargetFileName)&quot; -targetfile &quot;$(ProjectDir)$(IntermediateOutputPath)$(TargetFileName)&quot;" />
  </Target>
Was it helpful?

Solution

The solution is to use custom Microsoft.VisualStudio.Tools.Office.targets without problematic targets.

<Import Project="..\Microsoft.VisualStudio.Tools.Office.targets" />
<Target Name="AfterCompile">
    <Exec Command="$(IntelliLockLocation) -project $(IntelliLockProject) -file &quot;$(ProjectDir)$(IntermediateOutputPath)$(TargetFileName)&quot; -targetfile &quot;$(ProjectDir)$(IntermediateOutputPath)$(TargetFileName)&quot;  -snkeypair &quot;$(ProjectDir)$(AssemblyOriginatorKeyFile)&quot; -snpassword *****" />
  </Target>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top