locked
Problems with Packaging VS2010 Web Apps after VS2015 install RRS feed

  • Question

  • User-1266548990 posted

    I have a build server which originally had Framework through 4.5.1 and VS2010/VS2012 installed. I routinely built and packaged VS2010 and VS2012 web apps using the following MSBuild command:

    "C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" Hartford.Pace.sln /nologo /v:n /p:Configuration=Release /p:DeployOnBuild=True /p:CreatePackageOnPublish=True /p:AutoParameterizationWebConfigConnectionStrings=False /p:EnableNuGetPackageRestore=True 

    I recently upgraded the build server to include Frameworks through 4.6.1 and VS2013/VS2015. I modified the MSBuild command to the latest version:

    "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" Hartford.Pace.sln /nologo /v:n /p:Configuration=Release /p:DeployOnBuild=True /p:CreatePackageOnPublish=True /p:AutoParameterizationWebConfigConnectionStrings=False /p:EnableNuGetPackageRestore=True 

    And now I get the following error trying to package my VS2010 web apps after the build completes (successfully):

    "d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.sln" (default target) (1) ->
    "d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.Services\Hartford.Pace.Services.csproj" (default target) (2) ->
    (PackageUsingManifest target) -> 
      C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009,5): error : Web deployment task failed. (Unknown ProviderOption:DefiningProjectFullPath. Known ProviderOptions are:.) [d:\a5\bi_hartsource_pace\Microsoft_Build_Web_App\trunk\Hartford.Pace.Services\Hartford.Pace.Services.csproj]
    

    I verified the targets files for MSBuild/VS2010 were still there and unmodified. I tried rolling back to the 12.0 version of MSBuild and got the same error. From the error it looks like it's having an issue resolving something related to MSDeploy at line 3009 of Web.Publishing.targets:

        <VSMSDeploy Condition="!$(UseMsdeployExe)"
           MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
           Source="@(MsDeploySourceProviderSetting)"
           Destination="@(MsDeployDestinationProviderSetting)"
           DeploymentTraceLevel="$(PackageTraceLevel)"
           DisableLink="$(PackageDisableLinks)"
           EnableLink="$(PackageEnableLinks)"
           DeclareParameterItems="@(_Package_MsDeployDeclareParameters)"
           OptimisticParameterDefaultValue="$(EnableOptimisticParameterDefaultValue)"
           ImportDeclareParametersItems="$(_VsPackageParametersFile)"
           ReplaceRuleItems="@(MsDeployReplaceRules)"
           RetryAttempts="$(RetryAttemptsForDeployment)">
          <Output TaskParameter="Result" PropertyName="PackageResult" />
        </VSMSDeploy>

    I have to be able to build existing Solutions (VS2010 and up) without modification so I'm looking for a way to fix my Build workflow to enable building and packaging web apps regardless of the Visual Studio version.

    1. Are the parameters on my MSBuild command correct for packaging? They've always worked in the past, but I can't tell from the docs if anything has changed.
    2. Are there any alternative packaging methods I can use to create a package after build that I can store for later deployment?

    TIA

    Thursday, March 3, 2016 4:17 PM

All replies