Question

J'invoque tâche Dotfuscator via TFS Construire alias construire l'équipe, prise - = Dotfuscator Tâche avec = Créer une équipe - et la réception de l'erreur suivante:

Build FAILED.


(AfterCompile target) -> 

error MSB4061: The "Dotfuscate" task could not be instantiated from the assembly "C:\Program Files\MSBuild\PreEmptive\Dotfuscator\4.0\PreEmptive.Dotfuscator.Tasks.dll". 

error MSB4061: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

error MSB4061:    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

error MSB4061:    at System.Windows.Forms.Form.ShowDialog()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate.b()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate.a()
error MSB4061:    at PreEmptive.Tasks.Dotfuscate..ctor()
error MSB4060: The "Dotfuscate" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.

    0 Warning(s)
    2 Error(s)

Le code correspondant à Dotfuscator en Dotfuscator est comme suit:

  <!---
  All Dotfuscation Stuff here...
  -->

  <PropertyGroup>
    <ConfigPath>$(SolutionRoot)\..\$(BuildDefinitionPath)\BuildType\dotfuscator.xml</ConfigPath>
    <!--<InputPath>$(OutDir)</InputPath>-->
    <InputPath>\\Dev-6\TempBuild\Output\</InputPath>
  </PropertyGroup>

  <ItemGroup>
    <InputAssembly Include="$(InputPath)\*.dll;$(InputPath)\*.exe" Exclude="$(InputPath)\*.vshost.exe"/>
  </ItemGroup>

  <Target Name="AfterCompile">

    <!--Perform obfuscation steps after assemblies are compiled.-->

    <Dotfuscate InputAssemblies="@(InputAssembly)" Properties="$(DotfuscatorProperties)" ConfigPath="$(ConfigPath)">
      <Output TaskParameter="MappingFile" ItemName="DotfuscatorMappingFile"/>
      <Output TaskParameter="ReportFiles" ItemName="DotfuscatorReportFiles"/>
      <Output TaskParameter="OutputAssemblies" ItemName="DotfuscatedAssemblies"/>
      <Output TaskParameter="SatelliteAssemblies" ItemName="DotfuscatedSatelliteAssemblies"/>
      <Output TaskParameter="DebugSymbols" ItemName="DotfuscatedDebugSymbols"/>
    </Dotfuscate>
  </Target>
  <!-- End of dotfuscation Stuf....-->

J'utilise la tâche Dotfuscator suivante:

<Import Project="$(MSBuildExtensionsPath)\PreEmptive\Dotfuscator\4.0\PreEmptive.Dotfuscator.Targets" />

La machine de construction a Dotfuscator professionnel installé. Son entièrement fonctionnel et fonctionne très bien quand il est utilisé manuellement.

Aide Veuillez à ce problème.

Cordialement

Était-ce utile?

La solution

Ceci est habituellement causé par le service en cours d'exécution de construction sous un autre compte. Dotfuscator exige l'acceptation du CLUF lors de son exécution initiale pour chaque compte utilisateur, il est exécuté.

Vous pouvez vous connecter sur le serveur de build en utilisant le compte que votre build utilise, exécutez Dotfuscator et accepter le contrat de licence. Une fois que vous avez fait que les exécutions futures dans le cadre de ce compte fonctionnera très bien.

Si vous ne parvenez pas à vous connecter au serveur de compilation avec les informations d'identification de service de support technique de construction préemptif peut vous fournir une autre méthode pour travailler autour de cela. Vous pouvez contacter le support support@preemptive.com ou déposer un ticket de support directement à http://preemptive.com/support.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top