Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity - problem with Publish on ASP.net site

Tags:

teamcity

I am trying to configure TeamCity 5.0 to run "Publish" target on one of my projects.

When I load the solution in VS 2008 and click publish on the project the website is being build nicely - files on server appearing by themselves etc. Yet when I run the sln file via TeamCity Sln2008 runner the TeamCity returns:

[Project "Portal.csproj" (Publish target(s)):] Skipping unpublishable project.

Has anyone had the same problem?

Filip

like image 511
Filip Avatar asked Jan 05 '10 16:01

Filip


People also ask

What is publish in asp net?

In ASP.NET when you publish a Visual Studio web project MSBuild is used to drive the entire process. The project file (. csproj or . vbproj) is used to gather the files that need to be published as well as perform any updates during publish (for example updating web. config).

How do I publish in Visual Studio?

To publish from Visual Studio, do the following: Change the solution configuration from Debug to Release on the toolbar to build a Release (rather than a Debug) version of your app. Right-click on the project (not the solution) in Solution Explorer and select Publish. In the Publish tab, select Publish.


1 Answers

You could create your own simple build file. For example:

<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>

    <PropertyGroup>
        <PackageFolder>C:\Builds\AppServer\Actual</PackageFolder>
    </PropertyGroup>

    <Target Name="Build" DependsOnTargets="BeforeBuild">
        <MSBuild Projects="TeamWork-AppServer.sln"
                 Targets="Rebuild"
                 Properties="Configuration=Debug;OutDir=$(PackageFolder)\;"></MSBuild>
    </Target>
</Project>

Or you can use VS 2008 Web Deployment Project. Here is a great turtorial.

like image 181
Martin Fabik Avatar answered Nov 27 '22 10:11

Martin Fabik