analyzing changesets on checkin with teamcity - visual-studio-2012

Our project uses visual studio 2012 with TFS, resharper, and teamcity. We are using MS build too.
We already have a CI build configured to run on every checkin with teamcity.
I'm looking for a way to get a report or warning (not a build failure) if anyone checks in a file with the string "debugger;" in it.
Any thoughts on how to do this? Is there a plugin or off the shelf tool that will do this? There are so many different tools available I'm not sure where to start.

Technically a custom PowerShell script will be able to do this.
I'm not sure what you're really trying to achieve. Why are you searching for files containing "debugger" in their content?

Related

Not able to execute selenium test cases via Azure Devops release pipeline

I am trying to configure and run selenium test cases from Azure Devops Release pipeline. I did configure Visual studio Test Platform installer followed by Visual studio test. However, while running the 'test task', its erroring out stating
2019-12-22T11:31:50.7602521Z ##[warning]No test sources found matching the given filter '**\*csproj'
Am I missing something here or not doing proper configuration?
My main test case is being written in .cs file and tried including it in path as well but still same error.
Can someone please guide me?
thanks,
Pankaj
You have to add the path to the assemblies - dll. cs files are not used here as they are not compiled.
Provide the search pattern in the Test files field
Example search pattern:
**\publish\Test.Project.Name.dll
!**\*TestAdapter.dll
!**\obj\**
Have you built your project? Since you said you can see only files which are .cs or .csproj. You should first build your project to generate .dll files which are used in your vstest test files.
You can add the Visual Studio Build Task above the Visual Studio Test Task, then choose your project(.csproj or .sln) in the Solution Tag.
After building, you will see the .dll files in your Artifact, then, as Jonah said, you need to specify the location of the .dll file in Test files.

CMAKE changing Visual Studio Settings

I've been using CMAKE recently on Linux and Windows and I really like it. Its a great way of spinning up a project and organizing your builds. There are just a few things that are bugging me and I'm hoping to get help here.
Visual Studio Settings
Everytime CMAKE generates a project it will be a fresh solution and will not maintain any of the settings you applied to the Visual Studio project. I know that many things such as CMAKE_CXX_FLAGS, etc can change the properties. But what if I want to change settings such as "Suppress Startup Banner", "Environment", Enabling Microsoft Symbol Server, Enabling Native Code Debugging. How do I force CMAKE to set the options I want for fields like these?
Combining Debug/Release/Etc into one solution
It seems that with CMAKE you have to do separate generations for Debug/Release/etc. But in typical manually created Visual Studio projects you can combine the profiles and just change a project setting to get your new settings. Is it possible to generate a single solution file from CMAKE?
Okay so I scoured the CMAKE boards as well. Here are the answers I found.
Visual Studio Settings
For this one CMAKE can't modify the *.user files at all. However what was proposed was to make a user file template and then use CMAKE to supply all the paths and such that you are concerned with. This worked very well for me.
Combining Debug/Release/Etc into one solution
To change various settings on a per configuration basis. It seems like it is best to use fields like CMAKE_CXX_FLAGS_ and most importantly generator expressions. Generator expressions allow you to test for the build type and then generate whatever include, libraries, etc that you need.
Take a look at "Generator Expressions" here

Running an MSBuild project from TFS

I am have built an MSBuild project that has
the main .proj file with several Targets inside,
several .targets files
and several .rsp response files to run this project in several ways. Such as
Build, Clean/Build/Deploy, Clean/Build/Test/Deploy.. You get the idea.
What I now want to do is take this MSBuild and run it in TFS scheduler after I pull the source code. So the workflow should be
1. Pull the source code in TFS
2. Run MSBuild project in the scheduler so I might set up tasks to run hourly and nightly.
The MSBuild will take care of Deploying to IIS, unless someone has a more efficient way of deploying after an hourly build.
How can I accomplish this in TFS?
Thank you
You can use the Team Explorer UI in Visual Studio to define a "scheduled" build definition.
http://visualstudiomagazine.com/articles/2012/04/11/creating-a-build-definition-in-tfs.aspx
If you want to take this to the next level, research "continuous integration" which is also a built in capability.

TFS2010 with VS2012 workflow build process templates

It's known that Visual Studio 2010 works extremely slow with build process templates using Visual Designer for editing the XAML file (more info at: Why is the Workflow Designer so extremely slow when editing build process templates?). For this reason, I started to use Visual Studio 2012 with very good results. Each file saving takes 2 seconds instead of the 40 I got with Visual Studio 2010. In order to make it work, I had to clean-up versioned assemblies and change my custom ones to .NET 4.5 framework.
Once I got everything sorted out (load the workflow in the Visual Designer without errors), I launched a build definition with that workflow against our TFS2010 server and I got the next error message:
TF215097: An error occurred while initializing a build for build definition \MyProject\MyBuildDefinition: Cannot set unknown member '{http://schemas.microsoft.com/netfx/2009/xaml/activities}TextExpression.NamespacesForImplementation'.
Is it possible to run VS2012 edited build templates in a TFS2010? If so, how can I resolve that issue?
I tried the following blog suggestions with no results.
It's definitely possible. My team was running VS2012 edited workflows on TFS2010 for a good 6 months or so. Are you sure you tried the solution in the blog post? Your error message specifically references a "TextExpression.NamespacesForImplementation" section, which if you followed the blog post should have been removed entirely.. Sometimes I've found that after checking in a new version of the workflow XAML, I have to open up the build definition, fiddle with some parameters, and then save and close it.
Also for good measure, make sure your build machine (controllers and agents) are updated to the latest version (should be update 3, I think?).

Can I use WSPBuilder in a sharepoint continuous integration system?

We use a teamcity server to do CI for some things, we have started with some sharepoint web part development (again) and would like to integrate this into our CI system
Using WSPBuilder on the desktop works really well but I am not sure how to fire off the tasks on the CI server. Has anyone done this? Are there MSbuild targets around to do it... or how would I go about writing my own? (is that even possible!?)
Thanks
edit: if it is not clear I want WSPBuilder on the CI server to do the building of the WSP (ideally automating the desktop experience also so the CI server and developers machines are doing the same thing)
Yes - WSPBuilder was originally a command line tool and the VS plugin part of WSPBuilder is still just an interface on top of that without much functionality of its own - install WSPBuilder on your build server and you should be able to do everything you need with Exec tasks.

Resources