We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a folder structure like:
Foo/ ├─ Foo.csproj ├─ Web.config Bar/ ├─ Bar.csproj ├─ Web.Debug.config
And with Bar.csproj including ../Foo/Web.config as a linked file, Slow Cheetah does not apply transforms from Bar's Web.Debug.config file.
../Foo/Web.config
Web.Debug.config
Here's Bar.csproj:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net472</TargetFramework> <OutputType>Library</OutputType> </PropertyGroup> <ItemGroup> <None Include="..\Foo\Web.config"> <Link>Web.config</Link> <TransformOnBuild>true</TransformOnBuild> </None> <None Update="Web.Debug.config"> <IsTransformFile>True</IsTransformFile> <DependentUpon>Web.config</DependentUpon> </None> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Bar\Bar.csproj" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.VisualStudio.SlowCheetah" Version="4.0.8"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> </ItemGroup> </Project>
When running MSBuild with diagnostic verbosity, I can see that it's looking for the TransformFile in the Foo folder instead of Bar:
TransformFile
Added Item(s): _ScNoneFilesToTransform= ..\Foo\Web.config CopyToOutputDirectory=PreserveNewest DestinationFile=obj\Debug\net472\Web.config Link=Web.config OriginalItemSpec=..\Foo\Web.config SourceFile=c:\SomePath\Foo\Web.config Subtype=Designer TargetPath=Web.config TransformFile=..\Foo\Web.Debug.config TransformOnBuild=true _BuildAction=None
I've worked around this for now by adding a custom target that runs after ScCollectTransformFiles:
ScCollectTransformFiles
<Target Name="FixSlowCheetahTransformFile" AfterTargets="ScCollectTransformFiles"> <ItemGroup> <ScFilesToTransform Update="..\Foo\Web.config"> <TransformFile>Web.$(Configuration).config</TransformFile> </ScFilesToTransform> </ItemGroup> </Target>
Is there a supported way to run transforms using the linked file location?
The text was updated successfully, but these errors were encountered:
Bump dotnet-coverage from 17.10.1 to 17.10.2 (#250)
e4fed75
Bumps [dotnet-coverage](https://github.com/microsoft/codecoverage) from 17.10.1 to 17.10.2. - [Commits](https://github.com/microsoft/codecoverage/commits) --- updated-dependencies: - dependency-name: dotnet-coverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
No branches or pull requests
Given a folder structure like:
And with Bar.csproj including
../Foo/Web.config
as a linked file, Slow Cheetah does not apply transforms from Bar'sWeb.Debug.config
file.Here's Bar.csproj:
When running MSBuild with diagnostic verbosity, I can see that it's looking for the
TransformFile
in the Foo folder instead of Bar:I've worked around this for now by adding a custom target that runs after
ScCollectTransformFiles
:Is there a supported way to run transforms using the linked file location?
The text was updated successfully, but these errors were encountered: