1

I have deleted some old old publish profiles (including the one named 'Package') via the publish GUI in VS2012. When I check the code in and run a build via TeamCity I get the following error.

Rebuild MSBuild 
trunk\SomeService\SomeService.csproj 
ValidatePublishProfileSettings 
GetPublishingLocalizedString 
C:\Program Files     (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4253, 5): The value     for PublishProfile is set to 'Package', expected to find the file at     'E:\BuildAgent2\work\6ec5bd58ee82179a\trunk\SomeService\Properties\PublishProfiles\Package.pubxml'     but it could not be found.
GetPublishingLocalizedString 
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4260, 4): PublishProfile(Package) is set. But the $(WebPublishMethod) does not have a valid value.  Current     Value is "". 
Error 
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4267, 5): Target ValidatePublishProfileSettings Failed 
Project trunk\SomeService\SomeServiceService.csproj failed. 
trunk\SomeService\SomeServiceTests.csproj 
Project trunk\SomeServiceTests\SomeServiceTests.csproj failed. 
Project trunk\SomeService.sln failed. 

For some reason I cannot seem to get ride of the reference to this old web deploy publish profile ('Package.pubxml'). I cannot see anything obvious in the .proj files.

The build is vanilla VS build in TeamCity

Runner: Visual Studio Step name: build
Solution File: trunk/SomeService.sln
Visual Studio: VS 2012
Targets: Rebuild
Configuration: Release
Command line params: 'emtpy'

Any suggestions on how I can clear down this old publish profile? Or why it is even called in the first place when I am just doing a simple build? Everything works fine when I call MSBuild locally via command prompt.

Any help greatly appreciated

will webster
  • 574
  • 5
  • 11
  • Still stuck on this. Any suggestions appreciated. VS does not want to loose this old publish profile. Have tried a few things, solution clean, looked for references in the proj files, deleted all the publish profiles and started again.. – will webster Jan 02 '14 at 11:06

2 Answers2

0

Try changing your runner type to MSBuild. Your "Build File Path" will be your solution path and set all other fields appropriately.

Adarsh Shah
  • 6,755
  • 2
  • 25
  • 39
  • Thanks Adarsh. Some good suggestions. I have another build running on that set up. Cannot recall if I change this build to match. Will have a look Monday. Hoping I forgot to change the build runner to MSBuild. – will webster Jan 04 '14 at 12:35
  • No joy. Get the same error when using the MSBuild runner. I believe this is what the VS runner uses under the hood. The strange this is, I have moved all the files to a new solutions with new project files and clean publish profiles and I still get the error. Why wont it forget this old publish profile? Very odd. – will webster Jan 06 '14 at 10:55
  • 1
    Try to create a new project in teamcity and then create a build configuration there. It will assign a new GUID and have a new path on the build box. – Adarsh Shah Jan 06 '14 at 11:17
  • Thanks for the suggestion Adarsh. Tried a new project in TC and still no joy. I even copied the files over to a fresh VS solution and the build still picks up this old profile. Would make sense if something was caching at the TC end. – will webster Jan 13 '14 at 16:33
0

Turns out I had set up some System Parameters previously which where forcing a publish using the old publish profile!

system.DeployOnBuild    true
system.PublishProfile   package

Adarsh thanks for you assistance. Your advise to create a new project was sound. Seems the params were set up at the root level so where still being picked up.

will webster
  • 574
  • 5
  • 11