Adam Douglass
Adam Douglass

Reputation: 355

TeamCity AssemblyInfo Patcher for use with website project?

I have a VS2010 solution that includes a website project (not web application). In the App_Code folder, I have an AssemblyInfo.cs file that contains my version information.

I build this solution using TeamCity 7.0.2 and have configured the "Additional Build Feature" AssemblyInfo patcher. The patcher works properly for Class Library projects in the solution, but seems to have no effect on the website project.

The TeamCity 7.x documentation states:

This feature will work only for "standard" projects, i.e. created by means of Visual Studio wizard.

I'm hoping there's some way to leverage this on my website project.

Upvotes: 2

Views: 601

Answers (2)

skalinkin
skalinkin

Reputation: 1064

  1. Create Folder Properties in the root of website.
  2. Create AssemblyInfo.cs in new folder
  3. First Step in TC make Copy AssemblyInfo to App_Code.
  4. Check version on App_Code.dll file BestRegards.

P.S. Do not use WebSite, if you grew up to TC you have to use WebApp.

Upvotes: 1

wal
wal

Reputation: 17739

from the docs:

this feature will work only for "standard" projects, so that all the AssemblyInfo files and content have standard location.

have you tried moving your AssemblyInfo into the standard location for that project, which I'm guessing is YourProj/Properties/AssemblyInfo ?

Either way, I dont think you should do this. You should have a single AssemblyInfo file and the other projects should reference (Add as Link) to this AssemblyInfo. (unless you have a good reason for the assembly information to be different)

So in your case I would remove the AssemblyInfo.cs from your Web project and as it back as a link from one of the other Projects thats is being picked up from TC.

Upvotes: 0

Related Questions