October 17, 2012 1 Comment
This is a great example of code style guide used by Microsoft for internal coding. I’ve included a sample of it below. Enjoy!!!
An aficionado of software creation shares his thoughts.
July 6, 2011 1 Comment
So you’re using .vdproj setup projects are you? And you want to automate them with TFS 2010? Well, you’re in the right place, although I would recommend you start moving those setup projects to a msdeploy solution.
First, to automate the building of .vdproj project, you’re going to need to write your own msbuild file because they are not in msbuild format and therefore TFS Build does not know what to do with them. I found some good examples on the net on how to do this, but I updated mine a little for 2010. Here it is:
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <Target Name="Build"> <PropertyGroup> <DevEnv>$(ProgramFiles)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com</DevEnv> <SolutionFile>$(MSBuildProjectDirectory)\MySolution.sln</SolutionFile> <ProjectFile>$(MSBuildProjectDirectory)\MySetupProject\MySetup.vdproj</ProjectFile> <Configuration>Release</Configuration> </PropertyGroup> <Exec Command=""$(DevEnv)" "$(SolutionFile)" /Rebuild "$(Configuration)" /Project "$(ProjectFile)" /ProjectConfig "$(Configuration)" /Log" ContinueOnError="false" IgnoreExitCode="false" WorkingDirectory="$(MSBuildProjectDirectory)" /> </Target> </Project>
After you’ve done that save the msbuild file as, for example, AutomatedSetupBuild.proj and add it to source control at the same level as the solution file you intend to build. Then select it when you are creating your build definition.
One last thing on drops. If you intend to create a drop, there is a twist. TFS Build usually overwrites the “OutputPath” property in msbuild files to the “Binaries” folder on the build agent at build time. Since the “OutputPath” property does not apply here, you will need to overwrite it in the .vdproj file. Simply open the .vdproj file in a text editor and find the word “Release”. Change the “OutputFilename” to “..\\..\\..\\Binaries\\*.msi”. My .vdproj file had an “8:” prefixing the path which I simply left.
You’re done now. Enjoy!
April 26, 2011 Leave a comment
So, you have some old .Net 1.1 apps that you don’t want to upgrade, BUT you want to use TFS 2010 for your source control. Well you are in for a treat! (kidding)
First, you’re condemned to using VS 2003, because VS 2005, 2008, and 2010 only deal with .Net 2.0 and higher.
Second, because of this, you’re condemned to using the TFS 2010 MSSCCI provider; which is a not very well documented, unsupported by MS free tool. (Have fun)
This guy has a great post with screenshots to lead you through the gauntlet!
Third, heaven help you if you’re migrating your source from another source control provider like SourceSafe or PVCS. You’ll need to unbind the code from the old source ccontrol provider and then re-bind it to TFS 2010. A treachous course that shouldn’t be taken lightly.
But otherwise, have fun!
September 17, 2010 Leave a comment
Type sn -v NameOfAssembly.dll at the command line. It will say “NameOfAssembly.dll is valid” if it is strongly named. It will say “NameOfAssemby.dll does not represent a strongly named assembly” if it is not.
c:\>sn -v Microsoft.AnalysisServices.AdomdClient.dll
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly ‘Microsoft.AnalysisServices.AdomdClient.dll’ is valid