Code Monkey home page Code Monkey logo

devenvbuild's People

Contributors

dependabot[bot] avatar mmajcica avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

devenvbuild's Issues

Error creating window handle

When trying to build a solution/project of SQL Server Integration Services projects in a pipeline using this task I receive the error "Error creating window handle" for certain projects in my solution.

##[section]Starting: Build project: $/Data Warehouse/Main/Packages/Packages.sln
==============================================================================
Task         : DevEnv build (Visual Studio)
Description  : Build a project via the visual studio command-line invocation, devenv.cmd
Version      : 1.2.0
Author       : Mario Majcica
Help         : Build your project via the visual studio command-line invocation, devenv.cmd
==============================================================================
##[command]"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com" "C:\agent\_work\27\s\Packages.sln" /Build Dev

Microsoft Visual Studio 2015 Version 14.0.25420.1.
Copyright (C) Microsoft Corp. All rights reserved.
C:\agent\_work\27\s\SexualHealth.Pathology\Packages.SexualHealth.Pathology.dtproj : error  : Error creating window handle.


One or more projects in the solution were not loaded correctly.
##[error]Process 'devenv.com' exited with code '255'.
##[section]Finishing: Build project: $/Data Warehouse/Main/Packages/Packages.sln

Running the equivalent via the Command Line task in Azure DevOps produces the same error, if I use the /Project switch to specify a project different to the one that errors I still get the same error.

This only occurs when trying to build from Azure DevOps using the private agent. Executing the same command when logged onto the server where the agent is hosted produces no error when I build the solution or a specific project.

Visual Studio 2015 Community Update 3 is installed on the server along with SQL Server Data Tools 2015 17.4

I'm struggling to identify what the issue could be, any suggestions on how to diagnose further?

No applicable SKUs exception

Installation of extensions fails. Tried on 3 machines running win10 and Visual studio 2019, as well as 2017 with no success. Trying to run as C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe also did not bring any other result. Below there is the content of log:

03.08.2021 13:17:00 - Microsoft VSIX Installer 03.08.2021 13:17:00 - ------------------------------------------- 03.08.2021 13:17:00 - vsixinstaller.exe version: 03.08.2021 13:17:00 - 16.11.9 03.08.2021 13:17:00 - ------------------------------------------- 03.08.2021 13:17:00 - Command line parameters: 03.08.2021 13:17:00 - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\<user>\Downloads\mmajcica.devenv-build-2.0.3.vsix 03.08.2021 13:17:00 - ------------------------------------------- 03.08.2021 13:17:00 - Microsoft VSIX Installer 03.08.2021 13:17:00 - ------------------------------------------- 03.08.2021 13:17:01 - Initializing Install... 03.08.2021 13:17:01 - Extension Details... 03.08.2021 13:17:01 - Identifier : devenv-build 03.08.2021 13:17:01 - Name : Build with devenv (Visual Studio) 03.08.2021 13:17:01 - Author : mmajcica 03.08.2021 13:17:01 - Version : 2.0.3 03.08.2021 13:17:01 - Description : Build a project using devenv.com 03.08.2021 13:17:01 - Locale : en-US 03.08.2021 13:17:01 - MoreInfoURL : 03.08.2021 13:17:01 - InstalledByMSI : False 03.08.2021 13:17:01 - SupportedFrameworkVersionRange : [0.0,2147483647.2147483647] 03.08.2021 13:17:01 - 03.08.2021 13:17:01 - SignatureState : Unsigned 03.08.2021 13:17:01 - Supported Products : 03.08.2021 13:17:01 - Microsoft.VisualStudio.Services 03.08.2021 13:17:01 - Version : 03.08.2021 13:17:01 - 03.08.2021 13:17:01 - References : 03.08.2021 13:17:01 - Signature Details... 03.08.2021 13:17:01 - Extension is not signed. 03.08.2021 13:17:01 - 03.08.2021 13:17:01 - Searching for applicable products... 03.08.2021 13:17:01 - Found installed product - Global Location 03.08.2021 13:17:01 - Found installed product - Visual Studio Professional 2019 03.08.2021 13:17:01 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products. at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable1& skuData)
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable1& skuData) at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported) at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported) at VSIXInstaller.App.Initialize(Boolean isRepairSupported) at VSIXInstaller.App.Initialize() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
`

Rebuild, not build

Hello,

my build fails with IIS, but rebuild works from devenv from my localhost, how to make rebuild through azure devops, not build?

Error: Microsoft.PowerShell.Commands.WriteErrorException Devenv.com

I'm using devenv task to test SSIS package to build through VSTS. I created private agent to build.
Its giving me error
Internal Error: Microsoft.PowerShell.Commands.WriteErrorException Devenv.com in C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Devenv.com not found .

Thanks.

Unable to add task once installed

Once I have installed the extension, I'm not able to pick it as a build event - there is no "Add" button - am I missing something?

image

Need to modify UTILS.PSM1 to allow for VS 2022 builds.

I modified the file 'utils.psm1' in the 'ps_modules' folder to allow for builds on VS2022. See comments in code below:

#Get-VSPath new code
function Get-VSPath {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$Version)
    BEGIN { Import-Module -Name $PSScriptRoot\VSSetup\Microsoft.VisualStudio.Setup.PowerShell.dll }
    PROCESS {
        Trace-VstsEnteringInvocation $MyInvocation
        try {
	     ##Added this section to cover VS2022
	    if ($Version -eq "17.0" -and
                ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[17.0,)') -and
                $instance.installationPath) {
				Write-Verbose "Using v17.0 path: $instance.installationPath"
                return $instance.installationPath
            }
            ##Added above section to cover VS2022

            if ($Version -eq "16.0" -and
                ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[16.0,)') -and
                $instance.installationPath) {
				Write-Verbose "Using v16.0 path: $instance.installationPath"
                return $instance.installationPath
            }
            
            # Search for a 15.0 Willow instance.
            #Modified the '-Version' argument from '[15.0,16.0,)' to '[15.0,)' to prevent duplicates.
            if ($Version -eq "15.0" -and
                ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[15.0,)') -and
                $instance.installationPath) {
				Write-Verbose "Using v15.0 path: $instance.installationPath"
                return $instance.installationPath
            }

            # Fallback to searching for an older install.
            if ($path = (Get-ItemProperty -LiteralPath "HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\$Version" -Name 'ShellFolder' -ErrorAction Ignore).ShellFolder) {
				Write-Verbose "Using fallback path: $path"
                return $path
            }
        }
        finally {
            Trace-VstsLeavingInvocation $MyInvocation
        }
    }
    END { }
}

Not properly handling "Project up to date"

Experimentation with direct invocation of DevEnv.com seems to indicate that VcVars32.bat must be invoked. If that happens (I use the simply CmdTask) then things work, without it (Still CmdTask) they do not..... Clearly the Task here will not....

The killer is that getting this functionality is for speed (yes, seconds count) and invocation fo VcVars32 for hundreds or thousands of solutions (yes, I am serious) it really adds up.

Solution SSIS with Password (EncryptSensitiveWithPassword)

Hi

I have an solution SSIS with password; and I am using in the Configuration field:

Method 1
/p:ProtectionLevel="EncryptAllWithPassword",ProjectPassword="xxx"

Method 2
/p:SSISProj=”ERMX.FuelRoute.SSIS”,Configuration=”Development”,ProtectionLevel=”EncryptAllWithPassword”,ProjectPassword=”xxx″,ProjectName=”ERMX.FuelRoute.SSIS”

But The build does not working

If the solution has not password, the DevEnv Works very well !!!!

How can I setting the configuration if the solution has password "EncryptAllWithPassword"

Best regards

Argument transformation error

Hi,
We have been using this Azure task for several months and it was working fine, but then suddenly it started failing on all our builds with the same error:

##[error]Cannot process argument transformation on parameter 'FileName'. Cannot convert value to type System.String.

Do you know what could be causing this issue? We have not changed the build definition, we are still sending the same parameters as before.

image

Error after installing VS 2022 and updating OS to Win 10 20H2

I have build tasks that use devenv and they were working, but after installing VS 2022 and also updating Windows 10 from 1803 to 20H2 version and also WSL 2.0 if it has any impact.

I am getting error:

Description : Build a project via the visual studio command-line invocation, devenv.cmd. Used for building eg. SSIS projects.
Version : 2.0.5
Author : Mario Majcica
Help : Build your project via the visual studio command-line invocation, devenv.cmd

##[error]Cannot process argument transformation on parameter 'FileName'. Cannot convert value to type System.String.

image

Error when both VS2017 and VS2019 are installed on same server

The task started to fail after VS2019 was installed on the build-agent, By looking at the debug-output, it looks like the Get-VsPath method returns paths to both versions, instead of just the Latest. We've tried to specify a specific version, but with same result. Attached is a screenshot of the debug-output

image

Field for additional build parameters

Excellent extension. One thing I miss is to be able to pass additional parameters for build.
It would be good (and IMHO easy) to add a field similar to MSBuild and VSBuild tasks - additional MSBuild parameters.

Azure Pipeline SSIS Build Failing

I have an SSIS project that uses the Azure Storage Connection Manager from SSIS Azure Feature Pack. When this connection is included in the project, the Azure Pipeline Build fails with the following message:

System.ArgumentException: Value does not fall within the expected range. at Microsoft.SqlServer.Dts.Runtime.Interop.ProjectInterop.ReferencePackage(Package package, String packageLocation) at Microsoft.SqlServer.Dts.Runtime.PackageItem.Load(IDTSEvents events) at Microsoft.SqlServer.Dts.Runtime.PackageItem.get_Package() at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.IncrementalBuildThroughObj(IOutputWindow outputWindow) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.BuildIncremental(IOutputWindow outputWindow)

When the Azure Storage Connection Manager is removed the the project, the Azure Pipeline Build is successful.

Microsoft Visual Studio Community 2019 Version 16.3.9 VisualStudio.16.Release/16.3.9+29509.3
SQL Server Data Tools 16.0.61908.27190
SQL Server Integration Services 15.0.1900.73

Task in timeout, no Exit Code: 0 found

Hi, we have an issue with a DevEnvBuild@2 step that goes to timeout repeatedly since a few days, while we haven't change anything in the repository and in the pipeline. Sometimes the step works....
The issue seems to be that sometimes the task does not return the expected Exit Code 0, so the pipeline goes to timeout.
I include below an extract of the pipeline and a copy of the logs for both a working build step and a timed out build step (both run on the same code!)

Any idea?

Extract of pipeline
- task: DevEnvBuild@2
displayName: Building setup solution (unencrypted installer)
inputs:
solution: '***SetupAzure.sln'
buildCfg: '$(buildConfiguration)'
buildPlatform: '$(buildPlatform)'
vsVersion: '16.0'

Extract of log for working build step

2021-09-03T09:32:59.8088225Z ##[debug]Evaluating condition for step: 'Building setup solution (unencrypted installer)'
2021-09-03T09:32:59.8089915Z ##[debug]Evaluating: SucceededNode()
2021-09-03T09:32:59.8090362Z ##[debug]Evaluating SucceededNode:
2021-09-03T09:32:59.8091195Z ##[debug]=> True
2021-09-03T09:32:59.8091633Z ##[debug]Result: True
2021-09-03T09:32:59.8092201Z ##[section]Starting: Building setup solution (unencrypted installer)
2021-09-03T09:32:59.8202659Z ==============================================================================
2021-09-03T09:32:59.8202973Z Task : DevEnv build (Visual Studio)
2021-09-03T09:32:59.8203296Z Description : Build a project via the visual studio command-line invocation, devenv.cmd. Used for building eg. SSIS projects.
2021-09-03T09:32:59.8203577Z Version : 2.0.5
2021-09-03T09:32:59.8203763Z Author : Mario Majcica
2021-09-03T09:32:59.8204045Z Help : Build your project via the visual studio command-line invocation, devenv.cmd
2021-09-03T09:32:59.8204353Z ==============================================================================
2021-09-03T09:33:02.0957771Z ##[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
2021-09-03T09:33:02.2285458Z ##[debug]Entering D:\a_tasks\DevEnvBuild_ea543240-b4a8-11e5-8761-bb4cd4a06cfc\2.0.5\task.ps1.
2021-09-03T09:33:02.2564882Z ##[debug]INPUT_SOLUTION: 'D:\a\1\s***SetupAzure.sln'

[...]

2021-09-03T09:34:48.7360572Z Packaging file 'NLua.dll'...
2021-09-03T09:34:48.7593754Z Packaging file 'TMS.3.9.3604.0.t.zip'...
2021-09-03T09:34:48.7701502Z Packaging file 'vcinet4.dll'...
2021-09-03T09:34:48.8741909Z Packaging file 'TMS.3.3.3604.0.t.zip'...
2021-09-03T09:34:49.5218229Z Starting post-build events...
2021-09-03T09:34:49.6328973Z D:\a\1\s\StandAloneTMSController\StandAloneControllerSetup..\Properties\Update.manifest
2021-09-03T09:34:49.6335034Z 1 File(s) copied
2021-09-03T09:34:49.6345705Z
2021-09-03T09:34:49.6432657Z D:\a\1\s\StandAloneTMSController\StandAloneControllerSetup....\RELEASENOTES.md
2021-09-03T09:34:49.6440460Z 1 File(s) copied
2021-09-03T09:34:49.6445733Z
2021-09-03T09:34:49.6456593Z Post-build events finished
2021-09-03T09:34:49.6985687Z ========== Build: 8 succeeded, 0 failed, 5 up-to-date, 0 skipped ==========
2021-09-03T09:34:51.5073750Z ##[debug]Exit code: 0
2021-09-03T09:34:51.5147165Z ##[debug]Leaving Invoke-VstsTool.
2021-09-03T09:34:51.5211496Z Build succeeded.
2021-09-03T09:34:51.5224930Z ##[debug]Leaving D:\a_tasks\DevEnvBuild_ea543240-b4a8-11e5-8761-bb4cd4a06cfc\2.0.5\task.ps1.
2021-09-03T09:34:51.5702845Z ##[section]Finishing: Building setup solution (unencrypted installer)

Extract of log for failing (timeout) build step

2021-09-03T10:01:53.3944625Z ##[debug]Evaluating condition for step: 'Building setup solution (unencrypted installer)'
2021-09-03T10:01:53.3946361Z ##[debug]Evaluating: SucceededNode()
2021-09-03T10:01:53.3946842Z ##[debug]Evaluating SucceededNode:
2021-09-03T10:01:53.3947756Z ##[debug]=> True
2021-09-03T10:01:53.3948261Z ##[debug]Result: True
2021-09-03T10:01:53.3949223Z ##[section]Starting: Building setup solution (unencrypted installer)
2021-09-03T10:01:53.4059504Z ==============================================================================
2021-09-03T10:01:53.4059856Z Task : DevEnv build (Visual Studio)
2021-09-03T10:01:53.4060248Z Description : Build a project via the visual studio command-line invocation, devenv.cmd. Used for building eg. SSIS projects.
2021-09-03T10:01:53.4060612Z Version : 2.0.5
2021-09-03T10:01:53.4060820Z Author : Mario Majcica
2021-09-03T10:01:53.4061145Z Help : Build your project via the visual studio command-line invocation, devenv.cmd
2021-09-03T10:01:53.4061545Z ==============================================================================
2021-09-03T10:01:55.6362144Z ##[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4
2021-09-03T10:01:55.7425229Z ##[debug]Entering D:\a_tasks\DevEnvBuild_ea543240-b4a8-11e5-8761-bb4cd4a06cfc\2.0.5\task.ps1.
2021-09-03T10:01:55.7727051Z ##[debug]INPUT_SOLUTION: 'D:\a\1\s***SetupAzure.sln'

[...]

2021-09-03T10:05:21.6263494Z Packaging file 'NLua.dll'...
2021-09-03T10:05:21.6414747Z Packaging file 'TMS.3.9.3604.0.t.zip'...
2021-09-03T10:05:21.6508284Z Packaging file 'vcinet4.dll'...
2021-09-03T10:05:21.7742129Z Packaging file 'TMS.3.3.3604.0.t.zip'...
2021-09-03T10:05:22.3418775Z Starting post-build events...
2021-09-03T10:05:22.9249078Z D:\a\1\s\StandAloneTMSController\StandAloneControllerSetup..\Properties\Update.manifest
2021-09-03T10:05:22.9251303Z 1 File(s) copied
2021-09-03T10:05:22.9272574Z D:\a\1\s\StandAloneTMSController\StandAloneControllerSetup....\RELEASENOTES.md
2021-09-03T10:05:22.9273738Z 1 File(s) copied
2021-09-03T10:05:22.9273999Z
2021-09-03T10:05:22.9274377Z Post-build events finished
2021-09-03T10:05:22.9684663Z ========== Build: 8 succeeded, 0 failed, 5 up-to-date, 0 skipped ==========
2021-09-03T10:59:41.9311836Z ##[debug]Re-evaluate condition on job cancellation for step: 'Building setup solution (unencrypted installer)'.
2021-09-03T10:59:42.0564850Z ##[debug]Leaving Invoke-VstsTool.
2021-09-03T10:59:42.0590577Z ##[debug]Leaving D:\a_tasks\DevEnvBuild_ea543240-b4a8-11e5-8761-bb4cd4a06cfc\2.0.5\task.ps1.
2021-09-03T10:59:42.2392029Z ##[error]The operation was canceled.
2021-09-03T10:59:42.2397470Z ##[debug]System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at Microsoft.VisualStudio.Services.Agent.Util.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.PowerShell3Handler.RunAsync()
at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync()
at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
2021-09-03T10:59:42.2402065Z ##[section]Finishing: Building setup solution (unencrypted installer)

Vdproj failures

we usually get an error saying unable to open project when we build .vdproj locally, we just ignore it and still get the .msi output. But as this extension does not have a 'continueonerror:true' option, any suggestion on how to get success on building this task?
 
Error in UpgradeLog file:
path to vdproj\filename.vdproj:
Unable to open project '$(Build.SourceDirectory\filename.vdproj'.

Build is Succesful but build artifact are not genarating

Hi,

I am trying to build .sln file which have SSIS project using build task. I have provided path of .sln file which is on TFS to Solution / Project field and kept rest of the fields blank. Now build pipeline is running fine but no artifact is generating and I am seeing warning message "Directory 'D:\buildagent_1_work\58\a' is empty. Nothing will be added to build artifact 'drop'."

Can you please guide me on the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.