Why doesn't CC.net devenv task fail when a project is missing from the solution? - cruisecontrol.net

I've just realised that one of my Cruise Control.net code integration builds has been succeeding despite the fact that a project's missing from the solution (i.e. the solution file points to a project file that's missing from the disk). Does anyone know how to enforce a failure under these conditions?

Related

NUnit azuredevops pipeline

I made some researches but still didn't figured out this problem.
So, I made an NUnit test project, selenium with c#.
Tried to add in AzureDevops pipeline.
here is the configuration in azure
I'm getting the following error -
I Tried to change those parameters. but didn't get any other result/error.
The pipeline configuration is expecting the tests in the dll with the format **\testhost.*test*.dll. But your solution does not have any projects matching that convention.
Either you need to update the pipeline configuration to match the dll's in your project or have your tests in a different project. But you will still need to update the dll pattern as I am not sure what 'testhost' is in that?
Be sure to add the NUnit Test Adapter nuget to your project containing the tests.
See also:
https://stackoverflow.com/a/43008337/736079
When you run the test task initially it will fail. But when you see the error you can get the path of the dll files in working directory/in agent. Add that path in your task and re-run

Unable to check into TFS and Build with Continuous Integration '

I have an Azure Web application that I checked into TFS yesterday with no issues. Upon checking in, the resource manager will inject our nuget packages and deploy if it builds successfully.
I made a few changes (added a class) and checked in today. I received this error on the build:
Here's the quote to help the future search bots:
Exit code 1 returned from process: file name 'tf', arguments 'vc unshelve Gated_xxxxxx;****** /loginType:OAuth /login:.,******** /noprompt'.
I looked into the log response, to see if I get more detail, but it says the exact same thing. I have not changed my password or username.
How can I debug this to figure out the issue?
UPDATE
To save others from the headache. The issue was that we had CI builds per project. A file from another project had snuck in as well. So I was checking in for 2 different projects on 2 different solutions (Which both go to the same TFS server). So make sure you only check in for that one project!
To save others from the headache. The issue was that we had CI builds per project. A file from another project had snuck in as well. So I was checking in for 2 different projects on 2 different solutions (Which both go to the same TFS server). So make sure you only check in for that one project!
You can receive that error as well if you try to check in a file that is in a project that is not mapped in your build definition.
Let's say that you have a file named FileA.cs that is in a project named ProjectA.csproj. If you do changes in FileA.cs and this file is included in your changes, you need to map ProjectA.csproj in the Get source step of the build definition.

CruiseControl.net project that can skip completed tasks?

A common problem I have with CruiseControl.net is when a project encounters an error (either related to the ccnet configuration or build errors) and once I fix the error I must start the project over from the start. But in some cases this means hours of work that doesn't need to be redone.
Is there a method or design philosophy that will allow me to run sections of projects with more granularity?
I was considering passing in a number when force building and using that to determine which "stage" of the build to start at.

Separate TFS Build excluding a single project

I have a solution that currently builds nicely in TFS. I have just added a Sandcastle help File Builder project to it so that the help files can be generated. Now the solutions takes ages to build locally (it has also doubled the build time on the TFS Server).
In practice I'd be happy generating the help files once per day, or only when specifically requested as part of a build.
I tried creating a separate solution (for a new build) which included the Sandcastle project but I got a warning saying that the projects were already under source control.
What is the best way to configure TFS/the solution for this sort of situation? Can I have two builds that run on separate schedules and include/exclude certain projects in the solution?
You can create a new solution configuration that excludes building your help project. Then in your TFS build you can specify which configuration to build. You could have a CI build that doesn't include your help project, and then a nightly build that includes everything.

Does CC.NET detect modification when a build script performs a checkin

I've been doing some research into finally automating our Development builds and still have one nagging question that I'm hoping the StackOverflow community can solve for me.
My understanding is that an IntervalTrigger when setup properly will check VSS every X seconds for changes and if it finds a modified file, will run my tasks. One of my tasks would be to checkout the AssemblyInfo files and update the version numbers. After these files are updated they would be checked back into VSS.
Thinking about this solution it doesn't make much sense because in my mind, I'm forcing the check for changed files to true every time the trigger fires. Am I missing something here? Is there a way of doing this without triggering an automatic build on the AssemblyInfo check-in?
You can use a Filtered Source Control Block to exclude certain files from the trigger.
I just posted a bunch about my default build process here which may be of some interest to you: SVN Website Development and Deployment Solution
The way I usually configure my projects with CC.NET is to have two project blocks per solution. One configured as an interval trigger that does nothing more than get the latest from my repository, build the solution, and run unit tests. The other is a schedule trigger that does all the things the other one does, but actually publishes a build. This includes changing version numbers, publishing files, etc. This might work in your case, since the change in version would cause the interval project to trigger, but only once.
Checking the automatically generated AssemblyInfo into the version control system is a bad idea, don't do it. You'll get a lot of noise (50% of all commits!) in your history. Also, it does not give you any new information - you can always pull this from VCS. Have your build script autogenerate those files is a good practice, but don't push those changes back!

Resources