Tfs 2017 Publish buid artifacts - build

I've been working on a project under TFS 2017 and i want to publish build artifacts in the source directory. Any help? Thank you!

Generally it will copy files from $(build.sourcesdirectory) to $(build.artifactstagingdirectory), then publish artifacts to Server or File Share.
So ,not sure why you want to publish the build artifacts back to the source directory.
Whatever, you can simply select File Share as the Artifact Type and change the path to $(build.sourcesdirectory) in Publish Build Artifacts task.

Related

Issue downloading dependency from Amazon S3

I am currently trying to download a dependency from an Amazon S3 bucket for a maven framework project but Intellij is unable to download when I compile. In the .m2 repository it shows the folder for the dependency, it just doesn't contain the required information. There is also a settings file in the .m2 providing a username and password to the S3. In the Intellij console all dependencies are underlined in red in the maven window but only the two dependencies relying on the S3 are not being imported. Also, when I install the locally they are found and work fine.
Some of the actions I have taken:
Deletion of the repository
Deletion of the .m2 folder
Invalidate and cache
Reloading all projects
Downloading sources and documentation
Rebuilding
Installing locally (as mentioned above)
Reinstalling Intellij
Deleting the project and re-loading from code commit
If anyone has any ideas then I would be very grateful to try them out!
You can locate the proper Maven dependencies in the POM file that is located in the AWS Example Github located here:
https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2/example_code/s3
This POM file is valid within an INtelliJ project:

Azure devops to reuse the artifacts already download in previous runs

Currently we are using Nugget packages as our Azure artifacts and during the release process we download the artifact using "Download Package" task . It is working perfectly. But we noticed that even though we have downloaded the package already,during the next run of the pipeline in the same agent, again we have to download it. This is taking lot of time. So we want to prevent the package from getting download if it already present. Could you provide a way to reuse the already downloaded package.
In release pipeline, the System.DefaultWorkingDirectory (Example: C:\agent\_work\r1\a. Same as Agent.ReleaseDirectory and System.ArtifactsDirectory) is the directory to which artifacts are downloaded during deployment of a release. The directory is cleared before every deployment if it requires artifacts to be downloaded to the agent. This is a default behavior, we can not change it unfortunately.

WSO2 Carbon Identity Server - Build and run

I've modified a .jsp file in the org.wso2.carbon.identity.entitlement.ui package, in order to customize the server for my purposes.
The problem is that when I build the project with Eclipse, the build is successful, but I don't understand how I can actually run the compiled code. How can I do it?
Once you build the project with maven, in the target directory you will find the jar (OSGi bundle). In your IS Server under /repository/component/patches, create a new directory something similar to "patch0100". Copy the jar inside this "patch0100" directory and restart the IS server.
The number in the patch directory (0100 in this case) is important. If you put the same jar to a patch directory with a higher number, say pactch0200, that particular jar with override the earlier one. That's how patching works in WSO2 Carobon Server, which is the platform on which the products are built.

Team Build ignores MSBuild arguments

I have created a new team build definition. On every checkin, the build happens on a TFS server (another build controller). After the build completes, I want to publish the files. The MSBuild input arguments used are /p:DeployOnBuild=true;PublishProfile=QADeploy. QADeploy is the publishing profile created.
I expect the team build to succeed which happens. But the successful build does not publish or attempt to publish the files to the destination folder. Any ideas why, the publish via publish profile is not triggered?
Weird, but adding the Visual Studio Version resolved the problem:
/p:DeployOnBuild=true /p:PublishProfile=QADeploy /p:VisualStudioVersion=11.0
I had the same issue and was pulling my hair out. Check out this Similar Problem, it helped me.
I fixed it via copying both WEB and WEB APPLICATION web build targets from this path on a PC with VS installed into the matching path on the build server:
C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0
(path for VS 2012)
I am not sure if their suggestion of using the full installer for web deploy helps. I tried both suggestions at the same time and it worked there after.
Also it only works on a Web Project

Customize web deployment package in Visual Studio 2010

I have a WCF DataService build in VS 2010, targetting .Net 4.0. This all works fine. I've created a deployment package and have the application deployed to a web server using MSDeploy and a zip file. When I set up an automated build on a TFS Build Agent the contents of the deployment package changed. I no longer get the strong named assemblies in my deployment package. These excluded assemblies are projects within the solution and are built on the Build Server.
I don't see a lot of configuration options for the deployment package, but I would like to know why the build server creates a different package than my workstation, using the same settings.
I am using "Only files needed to run this application", I have ticked "Exclude generated debug symbols" and "Exclude files from App_Data folder". I _do_not_ include database packages. I do create a zip file (which is missing the strong named assemblies)
Thanks for any information you may have explaining why this occurs. Then maybe I can solve the problem.
Beezler
On the build server I've ungaced the assemblies I was concerned about and that got my deployment package to the state I want it. So it appears the deployment package does not include the GACed assemblies, which is a good thing. I would still like to know how to override this behavior on certain referenced assemblies.
Thanks,
If you want to include a DLL files for a GAC assembly do the following:
In your project, expand the "References" folder
right-click on the reference you want to include the DLL and click "properties" to bring up the properties pane
set "Copy Local" to "True"
That's it! When publishing your project, it will include the DLL in the bin folder for that reference!