<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>BuildCop Forum Rss Feed</title><link>http://www.codeplex.com/BuildCop/Thread/List.aspx</link><description>BuildCop Forum Rss Description</description><item><title>New Post: excludedFiles</title><link>http://buildcop.codeplex.com/discussions/260076</link><description>&lt;div style="line-height: normal;"&gt;This discussion has been copied to a work item. Click &lt;a href="http://buildcop.codeplex.com/workitem/8381"&gt;here&lt;/a&gt; to go to the work item and continue the discussion.&lt;/div&gt;</description><author>jelled</author><pubDate>Mon, 20 Jun 2011 10:53:51 GMT</pubDate><guid isPermaLink="false">New Post: excludedFiles 20110620105351A</guid></item><item><title>New Post: excludedFiles</title><link>http://buildcop.codeplex.com/discussions/260076</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;hi all,&lt;/p&gt;
&lt;p&gt;i have found a bug in file 'BuildCopEngine.cs'. The method GetBuildFiles() adds globally excluded files information to the excluded list by adding a semicolone first.&lt;/p&gt;
&lt;p&gt;If however the field is empty, the exclusion information starts with a semicolone which is wrong. Have a look at the code:&lt;/p&gt;
&lt;p&gt;﻿﻿&lt;/p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;string&lt;/span&gt; excludedFiles = pathConfiguration.ExcludedFiles;&lt;/pre&gt;
&lt;pre&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (!&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(buildFilesConfiguration.ExcludedFiles)) &lt;/pre&gt;
&lt;pre&gt; {&lt;/pre&gt;
&lt;pre&gt; &lt;span style="color: green;"&gt;// Append the globally excluded files.&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style="color: green;"&gt;&amp;nbsp;&lt;/span&gt; excludedFiles += ExclusionSeparator + buildFilesConfiguration.ExcludedFiles;&lt;/pre&gt;
&lt;pre&gt; }&lt;/pre&gt;
&lt;pre&gt;I have changed the code like this:&lt;/pre&gt;
&lt;pre&gt;&lt;div style="color: black; background-color: white;"&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;string&lt;/span&gt; excludedFiles = pathConfiguration.ExcludedFiles;
                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (!&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(buildFilesConfiguration.ExcludedFiles))
                {
                    &lt;span style="color: green;"&gt;// Append the globally excluded files.&lt;/span&gt;
                    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (excludedFiles.Equals(String.Empty))
                    {
                        excludedFiles += buildFilesConfiguration.ExcludedFiles;
                    }
                    &lt;span style="color: blue;"&gt;else&lt;/span&gt;
                    {
                        excludedFiles += ExclusionSeparator + buildFilesConfiguration.ExcludedFiles;
                    }
                }
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;When now i run the console program, the temp-files are excluded and any other file is getting checked.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;bye,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;yb&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>yetibrain</author><pubDate>Fri, 03 Jun 2011 13:31:22 GMT</pubDate><guid isPermaLink="false">New Post: excludedFiles 20110603013122P</guid></item><item><title>New Post: excludedFiles</title><link>http://buildcop.codeplex.com/discussions/260076</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;hi all,&lt;/p&gt;
&lt;p&gt;when i set excludedFiles to &amp;quot;~&amp;quot; in order to exclude temporary files, no file is beeing checked at all.&lt;/p&gt;
&lt;p&gt;Does anyone have the same behaviour? Any hints appreciated.&lt;/p&gt;
&lt;p&gt;bye,&lt;/p&gt;
&lt;p&gt;yb&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>yetibrain</author><pubDate>Fri, 03 Jun 2011 12:52:25 GMT</pubDate><guid isPermaLink="false">New Post: excludedFiles 20110603125225P</guid></item><item><title>New Post: Number of Build Groups analyzed: 0</title><link>http://buildcop.codeplex.com/discussions/258653</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Running fine now.&lt;/p&gt;&lt;/div&gt;</description><author>yetibrain</author><pubDate>Fri, 03 Jun 2011 12:49:40 GMT</pubDate><guid isPermaLink="false">New Post: Number of Build Groups analyzed: 0 20110603124940P</guid></item><item><title>New Post: Number of Build Groups analyzed: 0</title><link>http://buildcop.codeplex.com/discussions/258653</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i tried to examine some csproj-file, configured the config-file and gave it a rootPath, but when i run BuildCop the result says that there&lt;/p&gt;
&lt;p&gt;are 0 build groups analyzed as well as 0 build files analyzed. What do i do wrong? Thanks for any hints.&lt;/p&gt;
&lt;/div&gt;</description><author>yetibrain</author><pubDate>Mon, 23 May 2011 15:06:15 GMT</pubDate><guid isPermaLink="false">New Post: Number of Build Groups analyzed: 0 20110523030615P</guid></item><item><title>New Post: excellent</title><link>http://buildcop.codeplex.com/Thread/View.aspx?ThreadId=53516</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br&gt;
&lt;br&gt;
First, it is an excellent tool, it makes my job much easier! Thank you.&lt;br&gt;
now a quick question, is there any way to report on existance of Style Cop within a project?&lt;br&gt;
Within the csproj file, all we have is this line:&lt;br&gt;
&amp;lt;Import Project=&amp;quot;..\..\..\lib\StyleCop\v4.3\Microsoft.SourceAnalysis.targets&amp;quot; /&amp;gt;&lt;br&gt;
&lt;br&gt;
For FxCop we could do something like this: &lt;br&gt;
&amp;lt;buildProperty name=&amp;quot;RunCodeAnalysis&amp;quot; value=&amp;quot;true&amp;quot; /&amp;gt;&lt;br&gt;
&lt;br&gt;
is there any way / rule to verify styleCop is there?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
aa-
&lt;/div&gt;</description><author>StorageMedia</author><pubDate>Thu, 16 Apr 2009 14:25:40 GMT</pubDate><guid isPermaLink="false">New Post: excellent 20090416022540P</guid></item><item><title>New Post: Potential</title><link>http://www.codeplex.com/BuildCop/Thread/View.aspx?ThreadId=28438</link><description>&lt;div style="line-height: normal;"&gt;Hi there,&lt;br&gt;
&lt;br&gt;
First of all sorry for not responding sooner, but I've been moving house and we still have a lot of work so I'm a bit slow on my &amp;quot;personal projects&amp;quot;... Anyway, I really appreciate the feedback you gave here, you certainly have some good points that I'll address one by one below, but I do want to add that someone else has also been writing an MSBuild task that would enable BuildCop to be run during a daily build scenario for example. Shame on me for not thinking of it myself but I just conceived it as a simple command line tool at first. I &lt;em&gt;definitely&lt;/em&gt; agree, however, that BuildCop should be available as an MSBuild task itself as well, so stay tuned for more (although maybe not in the very near future...)!&lt;br&gt;
&lt;br&gt;
1) It's not very easy to discover in the System.Configuration namespace but it is in fact possible to return a configuration instance from an external XML configuration file with the code below. I'll add an overload to the next release however that will make this accessible at once by just passing the file name. But for now, you can use this:&lt;br&gt;
&lt;br&gt;
System.Configuration.ExeConfigurationFileMap fileMap = new System.Configuration.ExeConfigurationFileMap();&lt;br&gt;
fileMap.ExeConfigFilename = @&amp;quot;&amp;lt;path to config file&amp;gt;&amp;quot;;&lt;br&gt;
System.Configuration.Configuration configFile = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);&lt;br&gt;
BuildCopConfiguration buildCopConfig = configFile.GetSection(BuildCopConfiguration.BuildCopConfigurationSectionName) as BuildCopConfiguration;&lt;br&gt;
&lt;br&gt;
2) The other MSBuild implementation I talked about has the same problem, so I'll definitely work on a clean solution. But in the mean time, you can register your own MSBuild-enabled formatter in the configuration file as well of course...&lt;br&gt;
&lt;br&gt;
3)&amp;nbsp;I didn't (and still don't) want to take a dependency on MSBuild assemblies for reasons of simplicity and versioning: I don't want to drag in a big assembly (and furthermore some specific version of it), just to get access to a simple XML file. If you have a&amp;nbsp;rule implementation that would like to use the Project class&amp;nbsp;to do parsing and provide you all the details that MSBuild cares about, you can reference the assembly and intantiate the Project class yourself with the filename of the BuildFile object.&amp;nbsp;Furthermore, I've tried the Project class approach but it requires MSBuild to be installed on the machine (which I don't want to require) and when loading the project file it will try to parse it in a non-forgiving way. For example, it will try to resolve the referenced targets files (e.g. Microsoft.CSharp.targets) and thrown an exception if it can't find the file. Aggain, I want to avoid that since I don't want to require MSBuild or any of the referenced targets files to be installed. I need it to be light and simple, so that's why I'm just reading the XML myself in a custom class.&lt;br&gt;
&lt;br&gt;
I hope this clarifies some things, let me know if you have additional questions/input/remarks or if you want to help work on the MSBuild integration!&lt;br&gt;
&lt;br&gt;
Cheers,&lt;br&gt;
&lt;br&gt;
Jelle
&lt;/div&gt;</description><author>jelled</author><pubDate>Mon, 30 Jun 2008 15:38:07 GMT</pubDate><guid isPermaLink="false">New Post: Potential 20080630033807P</guid></item><item><title>NEW POST: Potential</title><link>http://www.codeplex.com/BuildCop/Thread/View.aspx?ThreadId=28438</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Firstly I would just like to say what a good idea BuildCop is and how I can see alot of potential benefits from using it. The flip side is that I'm dealing with a number of requirements that cannot be meet with the way certain aspects have been implemented in this first release. &lt;br&gt;
&lt;br&gt;
I'm dealing at the moment with a moderate to large multi solution build using team foundation server that I need to find ways to speed up. This is where BuildCop will help as a pre compile analysis tool to avoid the cost of a compile based on silly mistakes in project file settings. Used in this way BuildCop compliments Code Analysis, FxCop, NDepend as oppose to directly competes with these tools. However as mentioned they are some aspects that make it difficult to incorporate into a TFS team build.&lt;br&gt;
&lt;br&gt;
1) The call to BuildCopEngine requires an instance of BuildCopConfiguration which is a System.Configuration.ConfigurationSection derived class. I'm not overly familiar with the Configuration namespace but there appears to be no way to externalise the Xml associated with the BuildCopConfiguration from the actual configuration file required by the console runner. This really bites when trying to call BuildCopEngine from a custom MSBuild (or even NAnt) task as required to incorporate BuildCop into a CI build. You either have to put the configuration section xml  into the configuration file of msbuild or nant itself or you have to ship an exe (for example the console exe) that exists purely so that you can obtain the configuration section to supply the engine. Then because your running in app domain of nant or msbuild you with need to put the build cop dll in the GAC or in the probing path of msbuild/nant so that BuildCopConfiguration can be instantiated. I'm kinda hopping I've missed something obvious so here is the code from a custom MSBuildTask I've attempted to write.&lt;br&gt;
&lt;br&gt;
&lt;span style="font-family:courier new"&gt;        public override bool Execute()&lt;br&gt;
        {&lt;br&gt;
            if (!File.Exists(ExePath)) throw new FileNotFoundException(&amp;quot;ExePath does not exist!&amp;quot;, ExePath);&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new"&gt;            System.Configuration.Configuration configuration = ConfigurationManager.OpenExeConfiguration(ExePath);&lt;br&gt;
            ConfigurationSection section = configuration.GetSection(&amp;quot;buildCopConfiguration&amp;quot;);&lt;br&gt;
            BuildCopConfiguration buildConfiguration = section as BuildCopConfiguration;&lt;br&gt;
            BuildCopReport buildCopReport = BuildCopEngine.Execute(buildConfiguration);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new"&gt;            foreach (BuildGroupReport groupReport in buildCopReport.BuildGroupReports)&lt;br&gt;
            {&lt;br&gt;
                foreach (BuildFileReport fileReport in groupReport.BuildFileReports)&lt;br&gt;
                {&lt;br&gt;
                    foreach (LogEntry logEntry in fileReport.FindLogEntries(LogLevel.Error))&lt;br&gt;
                    {&lt;br&gt;
                        Log.LogError(string.Format(&amp;quot;{0} - {1}&amp;quot;, fileReport.FileName, logEntry.Detail));&lt;br&gt;
                    }&lt;br&gt;
                    foreach (LogEntry logEntry in fileReport.FindLogEntries(LogLevel.Warning))&lt;br&gt;
                    {&lt;br&gt;
                        Log.LogWarning(string.Format(&amp;quot;{0} - {1}&amp;quot;, fileReport.FileName, logEntry.Detail));&lt;br&gt;
                    }&lt;br&gt;
                }&lt;br&gt;
            }&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new"&gt;            return true;&lt;br&gt;
        }&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
2) In the above example I'm iterating the build report to produce the require msbuild logging. If the BuildEngine accepted report formatters registration programmatically then this could all be written in a report formatter that got instantiated with the msbuild logger and then passed to the engine. At the moment there is no way to do this as report formatter instantiation is encapsulated in the engine.&lt;br&gt;
&lt;br&gt;
3) The rules implementation all looks solid but is highly dependant on the required details being supplied by the BuildFile class. The Microsoft.Build.BuildEngine.Project class can be instantiated and loaded to provide all this information for the rules to be evaluated against so it does raise the question why maintain your own equivalent class that at the moment is not as rich (e.g. All project files must be valid msbuild project files so why not use msbuild to parse it.)&lt;br&gt;
&lt;br&gt;
Again I can see alot of potential in BuildCop to solve some of the build issues I'm dealing with but some aspects of the implementation are causing me some difficulties. Can you see anything that I've missed that would help me out? &lt;br&gt;
&lt;br&gt;
Cheers&lt;/p&gt;
&lt;/div&gt;</description><author>pwistrand</author><pubDate>Tue, 27 May 2008 01:45:31 GMT</pubDate><guid isPermaLink="false">NEW POST: Potential 20080527014531A</guid></item><item><title>NEW POST: nice tool</title><link>http://www.codeplex.com/BuildCop/Thread/View.aspx?ThreadId=24640</link><description>&lt;div class="wikidoc"&gt;
Thanks, glad you like the tool!&lt;br /&gt; &lt;br /&gt;&lt;div class="quote"&gt;
 &lt;br /&gt;but how does it differ from FxCop?&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt; &lt;br /&gt;BuildCop analyses MSBuild project files (that define the compilation settings for a build project), whereas FxCop analyses compiled .NET assemblies (executables and dll's). So they are only related in that sense that they both execute a number of rules on &amp;quot;some target&amp;quot;, but otherwise they don't have much in common.&lt;br /&gt; &lt;br /&gt;&lt;div class="quote"&gt;
 &lt;br /&gt;and does it work on native code to?&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt; &lt;br /&gt;Since it only analyses MSBuild project files, it doesn't have anything to do with compiled code (managed or native). But you can of course use it to analyse your project files if they use MSBuild to compile to native code...&lt;br /&gt;
&lt;/div&gt;</description><author>jelled</author><pubDate>Tue, 25 Mar 2008 14:47:09 GMT</pubDate><guid isPermaLink="false">NEW POST: nice tool 20080325024709P</guid></item><item><title>NEW POST: nice tool</title><link>http://www.codeplex.com/BuildCop/Thread/View.aspx?ThreadId=24640</link><description>&lt;div class="wikidoc"&gt;
but how does it differ from FxCop?&lt;br /&gt;and does it work on native code to?&lt;br /&gt;
&lt;/div&gt;</description><author>kfn</author><pubDate>Tue, 25 Mar 2008 08:32:06 GMT</pubDate><guid isPermaLink="false">NEW POST: nice tool 20080325083206A</guid></item></channel></rss>