!!This is not about custom pipeline!!
I want to know how I can manually specify version for the pipelines that we define using the already provided pipeline components in visual studio?. I am new to BizTalk, and even don't know if we can manually specify version for the pipelines or not. We can specify version for a schema, by specifying the version in version property of a schemas's property. But there is no version property in a Pipeline's property.
Also, I want to know if we can specify version number for a pipeline component, if yes, then how?
Screenshots attached for better understanding.
You version Custom Pipeline Components by setting the Assembly Version Number in the Project the component is in.
When you GAC it and add it to your toolbox in Visual Studio, it will read that Assembly Version Number. So any Pipeline you add it to will be referencing that Version. There is no need to set it manually.
Related
I need to integrate an older VS2008 project for WINCE6, without .NET, into an AzurePipline. This works very well with msbuild. Now I am looking for a way to set the version number in the version info.
Ready-made extensions did not work with the old project.
Probably the best way is to use a property of msbuild. I just don't know how to process the version number in the project.
Has anyone ever done something like this? Thanks for your suggestions.
In your build pipeline on Azure DevOps, you can add an Assembly Info task to set assembly information of your application.
Here I find some Assembly Info task extensions from the Marketplace. You can install one suitable extension from them to your organization and then call the related task in your build pipeline.
Below is a similar topic as reference:
https://stackoverflow.com/a/8452320/14697693
Where can I download the latest version of Microsoft.TeamFoundation.DistributedTask.Task.Deployment.dll for a release on Azure DevOps?
Microsoft-hosted agents are regularly updated to make sure the latest and applicable images of the softwares are applied to the agents.
If you want to use the latest version of softwares to run the related pipeline tasks on DevOps,you can install the latest softwares on the agents which you used .
If the agent you used is privated agent, you need to manually install or upgrade all the softwares you request on the agent machine.By downloading the latest package from Internet or using the related commands to install/upgrade the softwares.
You can refer to this case for details.
For other SO users could get clearly know more details about this issue when they are checking to this ticket, I add the following ticket which relevant with this ticket:
SO forum: Register-Environment Failing
DC forum: Where to download latest versions of deployment utilities for azure pipeline tasks?
When you using the task(such as AzureFileCopy V1.*) which need/import the Microsoft.TeamFoundation.DistributedTask.Task.Deployment.dll file, no matter whether the agent you used is hosted agent or private agent, its version are always be the latest version to the task, because these dll files are all exists depend with task.
According to the content you shared in the DC forum ticket:
I suspect that there's a newer version of these with a newer version
of Register-Environment, because with my version of this PowerShell
module, the following line fails claiming that I'm missing parameters,
specifically a "taskContext."
the error you are facing caused by the configuration of the Microsoft.TeamFoundation.DistributedTask.Task.Deployment.dll file. We did not defined the parameter taskContext in it.
To check and verify it, you can execute the PowerShellOnTargetMachines v2.* task in your private agent, then find the dll file in the path of ~\_work\_tasks\PowerShellOnTargetMachines_3b5693d4-5777-4fee-862a-bd2b7a374c68\2.0.7\DeploymentUtilities. And also, you can see its version is 16.0.0.0.
Then you can use decompile tool, here what I am using is Reflector, to decompile this dll file.
You can see that in the script block of RegisterEnvironmentCmdlet, there does not have parameter taskContext defined in it.
When you use PowerShellOnTargetMachines v2.* task, the parameter for Register-Environment supported only include EnvironmentName, EnvironmentSpecification, UserName, Password, WinRmProtocol, TestCertificate, ResourceFilter, ProjectName, TagsList.
For the parameter taskContext, it is the one which only used in v1.*(See v1.* source code) and does not supported in v2.*. In v1.*, taskContext used for Get-VssConnection cmdlet which dose not used any more in v2.*. That's why you facing the error message in PowerShellOnTargetMachines v2.* task.
I have a standard pipeline agent that works for CI whenever a pull request merged into master. It was working fine until I merged a pull request created by a visual-studio-2019 developed branch. Now I am getting
error CS8107: Feature 'default literal' is not available in C# 7.0. Please use language version 7.1 or greater.
It is working fine when I push any changes with vs2017.
What should I do to avoid this error?
P.S: I want to keep using vs2019
Thanks in advance.
This happen when you have code like the following:
MyType foo = default; // assign the default value for this type
In C# 7, the supported syntax is:
MyType foo = default(MyType);
but the simpler form was added in 7.1.
There are two ways to fix this:
Don't use the newer form. Change any existing instances of default to have a type, and change the settings so that the IDE will prefer the verbose form. Here's a picture with the new form turned on, just change the Yes to a No:
If you're using .editorconfig files, you can configure the csharp_prefer_simple_default_expression setting.
Set the language version for your project to be high enough to support the new syntax. Keep in mind that if you set it to latest it may use a different version between your development box (VS2019) and your build agent (e.g. possibly still on VS2017).
I just solved this issue by updating my Agent Pool in the build pipeline to use "Hosted Windows 2019 with VS2019"
I would like to specify the (SemVer) version number during a (not selfhosted) DevOps release, so that DLLs will have this version number embedded in them, and I can create a release to GitHub + NuGet with the same version.
However, I'm struggling with how to accomplish this with as much automation as possible.
I know I can use the /p:Version=x.y.z during build to set a specific version, but if I build one more time I shouldn't use the same version number again, which could be fixed by appending +buildnumber to the version. This build number is not something I neccessarilly would want in the actual release, though.
So, how should I best handle version numbers during build and deploy, without having to edit some variables every time?
how should I best handle version numbers during build and deploy, without having to edit some variables every time?
If you want to increment the version in build/release automatically, the buildnumber should be a good choice.
In generally, we defined the major.minor.patch in Variables or some config file, and use it with BuildNumber in the Build number format option:
Then, we could use the option use the build number as nuget version when we pack the nuget package:
For the release, we could use the parameter $(Build.buildnumber) to get the build number and set it as release version:
Now, we could handle version numbers with same version during build and release, without having to edit some variables every time.
Hope this helps.
We have many libraries which are build in a CI, which deploy prereleases every time they build. Other projects depend on these and automatically updates them during build.
But the references are set with the Specific Version = true, which means that increasing the version number on these dlls causes the build to fail.
How can I control the setting of the property?
You cannot change NuGet's behaviour without changing its source code. NuGet will always sets SpecificVersion to true when adding a non-GAC assembly from within Visual Studio.
You would need to run some sort of post build script to fix the references or manually change them.
Not sure exactly how you are updating the projects in your CI server. If you use NuGet.exe update project.csproj then that will update to the latest NuGet package and will not set SpecificVersion to true. However the command line application does not support PowerShell scripts or content files, only references will be updated. This also assumes that there is an update available otherwise the reference will not be modified.