Open trousyt opened 1 year ago
For anyone experiencing the same issue, I started importing the following targets file to fix it.
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="FixSlowCheetahFileSystemPublish" BeforeTargets="BeforeResolveReferences">
<PropertyGroup>
<PipelinePreDeployCopyAllFilesToOneFolderDependsOn>
$([MSBuild]::Unescape($(PipelinePreDeployCopyAllFilesToOneFolderDependsOn.Replace('ScApplyWebTransforms', ''))))
</PipelinePreDeployCopyAllFilesToOneFolderDependsOn>
</PropertyGroup>
</Target>
</Project>
I'm using SlowCheetah 4.0.50 and msbuild 17.5.1 on a project using PackageReference.
I'm using msbuild from the command line and publishing to the file system and it seems as though the target
ScApplyWebTransforms
runs before the files have been copied to obj{Config}\Publish\PublishTmp. Then when theScApplyWebTransforms
target runs, it's unable to find the files to transform in PublishTmp and errors with a FileNotFoundException.The target depends on
PipelinePreDeployCopyAllFilesToOneFolder
which looks like it should run before, not afterScApplyWebTransforms
to give it a chance to copy the files.Target "ScApplyWebTransforms: (TargetId:89)" in file "C:\Users\trparkin\.nuget\packages\microsoft.visualstudio.slowcheetah\4.0.50\build\Microsoft.VisualStudio.SlowCheetah.Web.targets" from project "C:\Project s\TFS-Git\HNVOD\src\VODTime\VODTime.csproj" (target "PipelinePreDeployCopyAllFilesToOneFolder" depends on it):
If I modify the Microsoft.VisualStudio.SlowCheetah.Web.targets file and comment out 'ScApplyWebTransforms;' in the
PipelinePreDeployCopyAllFilesToOneFolderDependsOn
property everything works: