TFS Builds does not find _PublishedWebsites / Web.Config

After moving the source to a different collection (one team project for all files) and manually re-creating the assemblies, I get the following build error.

C:\b\1\1\src\Src\Case\Case.UI\Case.UI.csproj(803,5): error : Could not write Destination file: Could not find a part of the path 'C:\b\1\1\src\Src\Case\Case.UI\bin\_PublishedWebsites\Case.UI\Web.config'.

This only applies when using MS-Build arguments:

/p:DeployOnBuild=True /p:TransformConfigFiles=True

The matching string "apparently" is associated with the Web.config transforms (which we need) and refers to the project file here:

<TransformXml Source="Web.config" Transform="$(ProjectConfigTransformFileName)" Destination="$(WebProjectOutputDir)\Web.config" />

+3


source to share


2 answers


The problem is MSBUILD is trying to convert your config files to the wrong directory.



Remove the argument / p: TransformConfigFiles = True and just set it to transform in the solution itself.

+3


source


try removing $ (WebProjectOutputDir) from Destanation:



<TransformXml Source="Web.config" Transform="$(ProjectConfigTransformFileName)" Destination="Web.config" />

      

+1


source







All Articles