slow-cheetah
slow-cheetah copied to clipboard
Multiple app.config related errors
I had successfully implemented SlowCheetah for my app.config and appsettings.json files. For some reason I can't build the project anymore since I'm getting multiple errors related to app.config tasks. Here are the errors:
Project1:
MSB4094 "obj\Debug\net452\win10-x64\Project1.csproj-sc.App.config;obj\Debug\net452\win10-x64\Project1.csproj-sc.App.config" is an invalid value for the "AppConfigFile" parameter of the "GenerateBindingRedirects" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2100
Project2:
MSB4094 "obj\Debug\net452\win10-x64\Project2.config;obj\Debug\net452\win10-x64\Project2.csproj-sc.App.config" is an invalid value for the "AppConfigFile" parameter of the "GenerateBindingRedirects" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2100
MSB3249 Application Configuration file "obj\Debug\net452\win10-x64\Project2.config;obj\Debug\net452\win10-x64\Project2.csproj-sc.App.config" is invalid. Could not find a part of the path 'D:\Project2\obj\Debug\net452\win10-x64\Project2.csproj-sc.App.config;obj\Debug\net452\win10-x64\Identity.Services.Api.csproj-sc.App.config'. D:\Identity.Services.Api\obj\Debug\net452\win10-x64\Identity.Services.Api.csproj-sc.App.config;obj\Debug\net452\win10-x64\Identity.Services.Api.csproj-sc.App.config 1
Cleaning bin and obj folders before build doesn't help. I have no custom code for app.config in csproj files.
Any idea of what's wrong here?
I've got the same error for one project (the only .Net Core project) of my Visual Studio solution. Any ideas on how to fix this?
I've seen this turning up as well once I added a transformation for the debug configuration.
I can confirm the problem, too. However, my project can be built successfully despite having the same error showing up. It happens every time when I build the project after cleaning the solution. I can no longer add new controllers (I am developing asp.net core in full framework) by scaffolding as if the project has some build errors. But if I clean the project only and build, everything goes normal and there is no error. When I try removing the SlowCheetah nuget package, the whole nuget list in Solution Explorer disappears entirely. Then the project cannot be built anymore as if there are no nuget packages installed. Luckily I can revert the project file from my TFS to temporarily hide the problem.
Same problem here. Some help would be appreciated. This is a really annoying error.
SlowCheetah: 3.0.61 Visual Studio: 15.5.1 New csproj format (Sdk="Microsoft.NET.Sdk.Web")
I'm also experiencing this error. Could it please be resolved!
Hi,
Any update on this one? This is a major problem!
I am also seeing this issue on two of the projects in my solution. Has anyone found a workaround or proper solution yet?
This just started happening to me out of the blue. I made a minor change to my production branch and pushed the changes. The solution builds locally, but not on VSO / MSBuild. I am not sure how to fix it. I suppose I may have to ditch slow cheetah?
Hi @davilimap, @sayedihashimi and @jviau I've noticed you're with Microsoft and have worked with this code quite a bit. Is this an issue you may be able to look into or request someone else at Microsoft to investigate? We're a Microsoft Partner and are heavily dependent on slow-cheetah. Unfortunately this error is causing us and other people in the community alot of pain.
This GitHib project seems to be dead :(
Unfortunately slow-cheetah is critical to the transform of our config files.
Does anyone know of any alternative solutions?
I stumbled upon this article some days ago: https://johan.driessen.se/posts/Applying-MSBuild-Config-Transformations-to-any-config-file-without-using-any-Visual-Studio-extensions And this extension which looks better: https://marketplace.visualstudio.com/items?itemName=GolanAvraham.ConfigurationTransform
Actually there are many more tutorials on the web that are doing more or less the same thing: Add a new build target, reference Microsoft.Web.Publishing.Tasks.Dll, and use TransformXml tag. Unfortunately I don't have time to test it out. Anyone interested?
GolanAvraham.ConfigurationTransform only supports XML files and doesn't support JSON files.
What if you disable automatically generating binding redirects?
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
</Project>
I've tried to reproduce this issue, but couldn't. I've seen people using .NET 4.5.1 and 4.6.2 and also people using .Net Core projects. Can someone provide me a clean repro so I can test this problem and make the fix?