Trying and failing to get .NET Duplicates checking going

Hi There,

Hopefully somebody can help, even if its pointing out something obvious I have missed. I have managed to get our .NET 1.1 web app building succcessfully under TeamCity using our existing Nant build scripts. I am now trying out a .NET duplicates checking job running over the same code base - which is driven by a VS2003 solution.

Everytime I am getting the following error:

[17:53:56]: System.IO.FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
at System.Reflection.AssemblyName.nToString()
at JetBrains.Util.AssemblyIdentity..ctor(AssemblyName assemblyName)
at JetBrains.ProjectModel.Impl.AssemblyReference.Init(AssemblyName assemblyName, IProject containingProject, FileSystemPath location)
at JetBrains.ProjectModel.Impl.Import.ProjectImporterBase.CreateAssemblyReference(IProject containingProject, FileSystemPath hintPath, AssemblyName assemblyName)
at JetBrains.ProjectModel.Impl.Import.VS7CSharpProjectImporter.ImportProject(FileSystemPath path, XmlDocument projectFileXmlDocument)
at JetBrains.ProjectModel.Impl.ProjectImporterImpl.ImportProject(FileSystemPath path)
at JetBrains.ProjectModel.Impl.ProjectImporterImpl.ImportSolution(FileSystemPath solutionFilePath)
at JetBrains.ProjectModel.Impl.SolutionManagerImpl.OpenSolution(FileSystemPath solutionFilePath, ITaskExecutor executor)
at JetBrains.CodeDup.Lib.Util.SolutionLoader.LoadSolution(String path)
at JetBrains.CodeDup.Lib.Util.SolutionLoader..ctor(String path)
at JetBrains.CodeDup.RCodeDupTeamCity.RCodeDupTeamCityApplication.Run2(String[] args)
at JetBrains.CodeDup.RCodeDupTeamCity.RCodeDupTeamCityApplication.Run(String[] args)



As far as I can tell it should be possible to do the .NET duplicates checking over .NET 1.1 / VS2003 solutions? The solution consists of separate website and webservices projects, plus a half dozen dependency projects (data access, busines logic etc).


As I said above this is building cleanly under TeamCity when we use our existing Nant scripts.


Kind regards,


Edward
4 comments
Comment actions Permalink

Okay, let me take this down a notch.  Has anyone successfully run a duplicates check job over a .NET 1.1/VS2003 solution? If so did you have to do anything beyond the obvious steps outlined in setting up the job to get it to work?

Our solution is big, with multiple projects, and a lot of duplicate 'code and paste' code. If I can get the duplicates checker working in TeamCity it will really help us in refactoring the code base towards a more healthy future.

Cheers,

Edward

0
Comment actions Permalink

Do you have references to GAC assemblies or may be to COM interop assemblies? If so, please check those assemblies are available on the build agent machine(s).

0
Comment actions Permalink

Unfortunately, one of the references are failed to load.
Such situation was fixed for MSBuild-based projects, but not for VS7 yet.
It will be fixed in new duplicates runner in upcoming TC 5.0.

Right now I can propose next solutions:

  • Automatically remove references from every project (they are not required for duplicates search)
  • Detect failed project and thus failing reference by removing projects from solution
  • Convert (automatically?) projects to VS8-9 format
  • Use another duplicates search tool (such as simian)
    See http://www.buzzuti.com/post/TeamCity-2-Using-Simian-with-MSBuild.aspx for TeamCity integration
0
Comment actions Permalink

Hi Guys,

Thanks for your feedback. The problem was caused by external dependencies. I was able to do some duplicate checking by building up a new solution project by project.  In the end we have decided to take the plunge and upgrade to .NET 3.5 and VS 2008. It was probably about time we took the plunge!

Thanks Again,

Edo

0

Please sign in to leave a comment.