4

I am having a build machine where I dont have Visual Studio 2010 installed. I am trying to use the ms build to publish an ASP.net MVC project, but unfortunately it is not working. Only the bin is published into the output directory, but not the Views and other related files. Following is my ms build project.

<Project ToolsVersion="4.0"  xmlns = "http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="BuildRegistration">
    <Exec Command="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild /t:Rebuild /p:OutDir=..\..\..\BuildOutput\Registration\;Configuration=Release;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False Registration\ASP.MVC\Registration\Fenix.Registration.csproj" />
  </Target>
</Project>

2 Answers 2

0

you have so many too defind paths in there, look at this snippet, we use it in production and works like a charme!

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <PropertyGroup />

    <Target Name="EndToEndIteration" Condition=" '$(IsDesktopBuild)'!='true' " DependsOnTargets="$(EndToEndIterationDependsOn)" >    
        <CallTarget Targets="Build"/>
    </Target>

    <Target Name="Build">

            <MSBuild Projects=".\RWS.Core\RWS.Core.sln" Properties="Configuration=Debug;OutDir=bin\" />

        </Target>

</Project>

P.S. you do need the .NET framework full install to be available on the build machine, also notice my solution relative path, which is relative to the folder from where my TfsBuild.proj is located. I have this file configured in an automated build of TFS and just works :)

also have a look at this question and answer: Is a separate Visual Studio license required for a build machine?

0

I'm running MSBuild to build and deploy an mvc 3 app on a 2008 server. I am using the following Build script

msbuild.exe {solution file} /p:Configuration=Release;DeployOnBuild=true;DeployTarget=Package;_PackageTempDir={location for build}

I believe I had to copy some files over or maybe install some iis publishing thing... I'm sorry I don't remember it's been a while, but I do not have visual studio on the machine.

2
  • I didn't have to edit the solutions or project file to do it that way but like I said I did have to put some dependencies on the machine.
    – Casey
    Sep 14, 2011 at 12:55
  • If you run that script, it should give you errors that you can google and figure out what you need to install...
    – Casey
    Sep 14, 2011 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.