Вопрос

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>
Это было полезно?

Решение

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>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top