Any idea how to use CodeCampServer template? - asp.net-mvc

http://teamcity.codebetter.com/viewLog.html?buildId=11047&tab=artifacts&buildTypeId=bt21
CodeCampServer has two download packages: VisualStudioTemplate and CodeCampServerPackage.
I looked for any idea how to use them, but unfortunately I didn't. So, I ask my questions here:
How to use VisualStudioTemplate? the archive file did not contain any .vstemplate file, so it cannot be used as VisualStudio template. Do I need to rename any $safesolutionname$ manually? It's not make any sense.
What the porpuse of CodeCampServerPackage? This archive file contains a deployment files only.

Thanks to Eric Hexter I have some answers:
The current trunk of CodeCampServer is on CodePlex. The build
server is moving right now from the regular teamcity.codebetter
server here to a new build server of HeadSpring projects:
http://build1.headspringlabs.com/
VisualStudioTemplate is meant to be used with the solution
factory command line tool. This tool basically takes the name of
the new project, the directory of the source template, and the
destination directory of the new project.
CodeCampServerPackage is a ready to use deployment files for site
the power CodeCampServer, like: codecampserver.com,
adnug.org and c4mvc.net.
Again, big credit to Eric Hexter for this answer.

Related

TFS Linked Files Not Found

I have a core project and several sub projects. I link to files in the core project for the sub ones. I righted clicked my csproj and said existing file > add > link. Here is how my project looks:
Here is a picture of my Windows Explorer:
When I check in, I receive this error:
Could not find file C:\Users\joe_a84\Documents\JMASoftware\QuickBooks\Main\Source\Platform Support\NOP\Source\Versions\nop265\Nop265\Module\QuickBooksSettings.cs
The file does not exist there because it is linked. How can I tell TFS that it's a linked file?
There is the following question which states that symbolic links are not supported in TFS 2008 or TFS 2010. Symbolic links in TFS 2010 Source Control?
However, I did find the following ancient blog post which seems to show how to do it for TFS 2005: http://blogs.msdn.com/b/ericlee/archive/2006/07/20/sharing-files-in-team-foundation-server.aspx
That said I would highly recommend that you simply don't do this.
If you really need to share a file between projects then you should be using the branching functionality built into TFS. Typically you don't want just a single code file due to namespace and assembly generation concerns. It is much cleaner, and certainly easier to maintain, by having a separate project for those artifacts that are passed around. This way you either branch the entire assembly project; or just refer to it in it's normal place.
This is a local file level linking by another project. There is only one file at a specific subfolder. Other projects can link to the file via this approach. The problem with this approach is that from TFS viewpoint, you cannot tell if a file is shared by other projects. A good practice will be to keep such files in separate folder with name like Common or Shared etc.
People who have been using File linking across branches in Source Control would have to change their approach quite differently.
Linking between files in TFS is pretty simple. You just open the "Add existing item" dialog and search for the file you want to link in your local workspace. If you would click "Add" now Visual Studio would create a copy of the file in your projects directory. What you do instead is to choose the other option (you have a little drop down menu on the button) and add the item as a link. Thats it.
I faced the same problem. I just did undo on the file which was showing this error in the TFS Pending Changes window and checked-in. This undo did not remove the link that was added in the project. Make sure you do not undo the project file.

Customizing Drop Folder Structure with TFS Team Build

I'm using TFS 2012 to automate a build of a solution which contains multiple windows services and two web applicaitons.
I've used the guide I found here to customize the build process template so that the windows services are put in a folder structure that I like. Specifically:
\dropserver\droproot\MyApp\BuildNumber\
\Service1
\Service2
\Service3
\Service4
This works great, but unfortunately it doesn't work for web applicaitons. If I used the same strategy for those, I just get the contents of /bin for each web app, rather than the full site contents.
MSBuild typically uses the web application targets to handle this, but for some reason, this doesn't work when you customize the build as I have. I no longer get the _PublishedWebSites folder in the build output. (I'm guessing that's because I cleared our the OutDir property of the MSBuild task.)
Has anybody done something like this and gotten it to work with web applications as well?
I think I can help with this, it looks like in the build targets that the published websites folder isn't created if the OutDir is the same as the OutputPath.
So this isn't perfect, but if you add the following into the csproj file in the first property group, you'll get everything deployed into "\bin\deploy\" including the _PublishedWebsites folder
<DeployOnBuild>True</DeployOnBuild>
<OutDir>bin\deploy\</OutDir>
With a bit of customization, this solution ended up working for me:
http://www.edsquared.com/2011/01/31/Customizable+Output+Directories+For+TFS+2010+Build.aspx
Basically, did what that link recommended, but also leveraged a new solution configuration (which I called TeamBuild) rather than conditional property definitions.
I believe the key to making this all work was the passing of the outputDirectory as the TeamBuildOutDir argument to MSBuild. Embedding this variable reference in the OutDir or OutputPath variable was allowed Team Build to build to the correct staging location and then automatically copy files from that location to the drop folder.
I'm going to take this a little futher and get rid of the whole _PublishedWebSites thing, but that will be done entirely in the build workflow.
EDIT: TFS 2013 supports this natively with a simply build configuration option:
Take a look at this thread as this post as well.
Team Build: Publish locally using MSDeploy
Since you need all the files for your web projects, you need to trigger the publishing process, and by tweaking the destination of that process, you can have all of your files copied where you need them.
I think option (2) from his answer will work for you.
I hope that helps.
As I can see in your reference link, it will just compile and package the binaries. It does not deploy the website by the steps mentioned in that.
If you want to get the .html, .css, .js etc. under the _PublishedWebSites folder, you need to do a Web Deployment. This manually we can do by clicking the publish option from right click menu of your VS project and by selecting Publish Method as File System.
But, since you need to automate this in your build and drop it in custom drop folder, you may need to manipulate your MSBuild script by calling a AspNetCompiler task. You can get more information on this at the MSDN link. By specifying the TargetPath while you call this target you can get your Web files deployed at the appropriate custom drop folder.
Happy Scripting.
Have you check this blog, this solved my problem where I wanted customized TeamBuild Ouput Directory.
Customizable O/P with TFS 2013
Customizaable O/P with TFS 2012 and .NET Framework 4.5

Access/Find project folder in TFS 2010 build

What I want
I need to find out the project folder paths in a solution (.sln) during TFS 2010 build.
Why I want this
I need to search for files with extension ‘.mc’. These files are present in project folders.
Why not use solution path variable in TFS 2010 build
I cannot use solution path variable. The reason for this is that my solution path contains 100 folders, each containing files with ‘.mc’ extension. The solution (.sln) only contains 10 visual studio projects, each in its own folder. I want to search for files in these project folders.
Is there a simple solution that you know of? Thanks in advance.
Use the InvokeProcess activity, combined with the FIND command line utility on your solution file
I don't think something out-of-the-box exists for something like that.I would go for a custom build activity (see here for a classic resource on that), that works along the lines of crawling the SLN in order to retrieve the file paths.A possibly useful resource on that could be this post, but, since you are also using TFS as source control, it might be a good idea to search for SccProjectUniqueName: each line of the SLN containing this - has a path to a project.

prevent Team Build dropping all binaries to the root of the drop folder

The default configuration of the Team Build Number Format is:
$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)
It drops all output to \\foo\bar\MyBuildDef_20111031.1 Great stuff so far!
The small problem is that it drops all binaries in that directory without a good indication of the dependencies of the binaries.
How can you modify this property, or otherwise, to have the solution's binaries dropped in their respective project directories?
In the case above, I had expected the MVC website (complete with its bin directory) to be dropped. Instead, we got that PLUS the extra drop of the binaries in the root.
In other words: TFS, please stop dropping all binaries in the root; it looks messy, and it's confusing on which files belong/associated with what.
How can this be achieved with Team Build 2010?
This blog post should help you out: http://blogs.msdn.com/b/willbar/archive/2011/02/05/splitting-team-build-outputs-into-folders.aspx
Essentially, you create a new 'Platform' for each project. Team Build will put each platform in a different directory by default, so you get a different directory for each of your projects.
Build configuration dialog:
Drop folder output:
Unfortunately I have not found a good way to do this yet, though it has been a while since I tried to find a better solution then what I settled on.
Current have solutions for each desktop application, and one with all the websites. I then followed the instructions here to make each solution output into a separate folder.

How-to Keep Projects Structure with TFS Team Build

I've a Solution structure as below :
Solution 1 (Solution1.sln)
Project 1
Project 2
Project 3
I created a Team Build definition working with Solution1.sln.
My problem is that compiled binaries are stored into a single flat output folder : BuildName\Release
But I want to keep my project structure :
BuildName\Project 1\Release
BuildName\Project 2\Release
BuildName\Project 3\Release
See Preserving Output Directory Structures in Orcas Team Build. It's pretty irritating that this is neccesary, and it's a per-project tweak, but it can be made to work.
The default for Team Build is as you've seen - binaries in one folder, web sites each in a folder structure of their own; one per configuration being built. If you're just getting started with TFS, I suggest you try to use the default. You're more familiar with separate folders, but almost everything you read about Team Build will use a single output folder.
Other than familiarity, is there a reason you want separate folders?

Resources