trail version of smart assembly on devops pipe line

AkshayAkshay Posts: 7 New member
Hi Team,
 I am unable to download trail version of smart assembly on devops pipe line. I am looking for license key to test some scenarios..if everything works then thinking to but the product..could you please help me.

Thanks
Akshay
Tagged:

Answers

  • Hi Akshay,

    You should be able to download it from the below link:


    Let me know if that doesn't work for you.

  • AkshayAkshay Posts: 7 New member
    thanks .I tried to download nuget package on devops pipline and giving me below error.
    where can I get $(SA_KEY)` for trai version?
    do i need do self hosting agent on our machine or azure pipeline agent ? please do suggest.

    Error message
    PowerShell exited with code '1'.

    $p = Start-Process -FilePath msiexec -Args "/qn /i `"$msiPath`" INSTALLDIR=`"$saInstallLocation`" RG_LICENSE=`"$(SA_KEY)`" RG_WARNING=`"Ignore`" REBOOT=`"ReallySuppress`" RG_I=`"Red Gate Software Ltd.`"" -Wait -Verbose -PassThru

    if ($p.ExitCode -ne 0) {
    throw "SmartAssembly installation failed. Installer exited with code: $($p.ExitCode)"
    }
  • AkshayAkshay Posts: 7 New member
    thanks .I tried to download nuget package on devops pipline and giving me below error.
    where can I get $(SA_KEY)` for trai version?
    do i need do self hosting agent on our machine or azure pipeline agent ? please do suggest.

    Error message
    PowerShell exited with code '1'.

    $p = Start-Process -FilePath msiexec -Args "/qn /i `"$msiPath`" INSTALLDIR=`"$saInstallLocation`" RG_LICENSE=`"$(SA_KEY)`" RG_WARNING=`"Ignore`" REBOOT=`"ReallySuppress`" RG_I=`"Red Gate Software Ltd.`"" -Wait -Verbose -PassThru

    if ($p.ExitCode -ne 0) {
    throw "SmartAssembly installation failed. Installer exited with code: $($p.ExitCode)"
    }
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @Akshay!

    We've opened a ticket for you (#161538) and I will send you a trial key there.

    Regarding the agent, you can use either a self-hosted or Microsoft-hosted agent. (If the latter, you need to make sure to use the steps here https://documentation.red-gate.com/sa7/building-your-assembly/using-smartassembly-with-azure-pipelines. If the former, you can just add a task to call on the SmartAssembly command line on the local hosted machine: https://documentation.red-gate.com/sa/building-your-assembly/using-the-command-line-mode)

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • AkshayAkshay Posts: 7 New member
    Thanks for the infromation. I did same what it been there in link and on devops pipleline I could see exe obsacation. But not those exe published by clickonce.
    Please see the below screen shot artificate s and yaml script.
    Please help me on this.



    yaml Script:

    # .NET Desktop
    # Build and run tests for .NET Desktop or Windows classic desktop solutions.
    # Add steps that publish symbols, save build artifacts, and more:

    trigger:
    - master

    pool:
      vmImage: 'windows-latest'
      name: Azure Pipelines

    variables:
      solution: '**/*.sln'
      buildPlatform: 'Any CPU'
      buildConfiguration: 'Release'

    steps:
    - task: NuGetToolInstaller@1

    - task: NuGetCommand@2
      inputs:
        restoreSolution: '$(solution)'

    ### SmartAssembly start ###
    - task: NuGetCommand@2
      displayName: 'SmartAssembly download'
      inputs:
        command: 'custom'
        arguments: 'install RedGate.SmartAssembly.Installer /OutputDirectory $(System.DefaultWorkingDirectory)'

    - task: PowerShell@2
      displayName: 'SmartAssembly installation'
      inputs:
        targetType: 'inline'
        script: |
          $saExtractPath = "$(System.DefaultWorkingDirectory)\RedGate.SmartAssembly.Installer*\tools\"
          $saInstallLocation = "$(System.DefaultWorkingDirectory)\tools\SA\"
           "##[debug] Installing SmartAssembly..."
          $msiPath = (Get-ChildItem "$saExtractPath\SmartAssembly_*_x64.msi").FullName
          echo $msiPath
          $p = Start-Process -FilePath msiexec -Args "/qn /i `"$msiPath`" INSTALLDIR=`"$saInstallLocation`" RG_LICENSE=`"862-753-061946-92B4`" RG_WARNING=`"Ignore`" REBOOT=`"ReallySuppress`" RG_I=`"Red Gate Software Ltd.`"" -Wait -Verbose -PassThru
          if ($p.ExitCode -ne 0) {
            throw "SmartAssembly installation failed. Installer exited with code: $($p.ExitCode)"
          }
          "##[debug] Installing SmartAssembly Done..."

    - task: VSBuild@1
      inputs:
        solution: '$(solution)'
        msbuildArgs: '/target:publish'
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'

    - task: PowerShell@2
      displayName: 'SmartAssembly execution'
      inputs:
        targetType: 'inline'
        script: |
          $saInstallLocation = "$(System.DefaultWorkingDirectory)\Tools\SA\"
          $saComPath = "$saInstallLocation\SmartAssembly.com"
          echo $(Build.SourcesDirectory)
          echo $(Build.SourcesDirectory)\ClickOnceWindows.saproj
          "##[debug] Executing SmartAssembly..."
          & $saComPath /build "ClickOnceWindows/ClickOnceWindows.saproj" # replace with path to your .saproj file  
          "##[debug] Executing SmartAssembly done..."

    - task: CopyFiles@2
      displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
      inputs:
        SourceFolder: '$(system.defaultworkingdirectory)'
        Contents: '**\bin\$(BuildConfiguration)\**'
        TargetFolder: '$(build.artifactstagingdirectory)'
      condition: succeededOrFailed()      

    - task: PublishBuildArtifacts@1
      displayName: 'Publish Artifact: drop'
      inputs:
        PathtoPublish: '$(build.artifactstagingdirectory)'
      condition: succeededOrFailed()  

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @Akshay!

    ClickOnce will use the assembly built in the obj/release folder, so you need to make sure that the SmartAssembly project's input assembly comes from that obj/release folder, and that your csproj/vbproj file has OverwriteAssembly = "True" as described here: https://documentation.red-gate.com/sa7/building-your-assembly/using-smartassembly-with-clickonce-and-msi

    Can you please give this a try? I hope that helps!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • AkshayAkshay Posts: 7 New member
    Manually  i have tried using click once publish, I able to obfuscate the exe.B
    But if I run build and publish pipeline is self hosting still it is not obfuscating. please suggest.


    <!-- SmartAssembly task -->
    <UsingTask TaskName="SmartAssembly.MSBuild.Tasks.Build" AssemblyName="SmartAssembly.MSBuild.Tasks, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7f465a1c156d4d57" />
    <Target Name="BuildWithSmartAssembly" AfterTargets="CoreCompile" Condition=" '$(Configuration)' == 'Release' ">
    <SmartAssembly.MSBuild.Tasks.Build ProjectFile="$(ProjectDir)$(AssemblyName).saproj" OverwriteAssembly="True" />
    </Target>
    <!-- /SmartAssembly task -->
     

  • AkshayAkshay Posts: 7 New member
    Or can we have call any day after 5.30 PM UK time. i walk throught and share my screen. thanks 
Sign In or Register to comment.