sayedihashimi / slow-cheetah

XML Transforms for app.config and other XML files
Other
242 stars 54 forks source link

SlowCheetah does not transform during build #91

Closed FreakinWard closed 7 years ago

FreakinWard commented 11 years ago

Slow Cheetah has worked perfectly for over a month. Now, all of the sudden, my builds are not transforming. I do have the configuration setup on multiple projects within the solution. Both projects have the associated Debug & Release configuration files associated with the parent app.config file.

Here is an example of my transformation statement.

<connectionStrings>
    <add name="MSSQL" connectionString="ConnectionStringHere" xdt:Transform="Replace" xdt:Locator="Match(name)"/>
  </connectionStrings>

After building in either Debug or Release, I am checking the (ApplicationName).exe.config file. Here, the values do not change. I have even selected the "Preview Transformation" and the preview works without failure. It seems like Slow Cheetah is not getting the call during build.

I have uninstalled and re installed the Slow Cheetah extension. No luck.

Any recommendations on how to fix this problem?

***Update I am able to create an entirely new project and the transforms work fine. It would appear something became corrupt or missing altogether. It seems odd that both projects would do this simultaneously.

jonstelly commented 11 years ago

Out of curiosity, do you see an app.config in your bin folder after building? Did you just update Microsoft.net.Http or some other Nuget package which depends on Microsoft.Bcl.Build?

I just submitted This Issue

FreakinWard commented 11 years ago

There was not an app.config file in the bin directory at all. Additionally, no updates were applied at all. I did end up fixing the problem manually. I had to re-reference the slow-cheetah settings in the .proj file. I did this by copying the settings from a newly created project.

legomind commented 11 years ago

I am having the same issue @aaronward how exactly did you fix the problem?

FreakinWard commented 11 years ago

Legomind.

I was not able to FULLY correct the problem using the standard functionality. What I did do was create a new project, add the transformations config files, etc. Then, I referenced the .proj file. I review the xml configuration and copied the structure from the "new" project to my current working project.

This worked perfect. Now, how the xml was disappeared, I just don't know.

The second project I was working with failed as well. After numerous attempts to do as I mentioned above, I simply couldn't get it to work. So, I recreated the application into a new project. Then, it worked fine.

After doing these "hacks", I can say that I have not had any problems since.

nikatdk commented 10 years ago

I had this issue after upgrading from 2.5.10.2 to 2.5.10.3.

Manage to fix it without having to recreate the project after reading the comments above from aaronward.

I checked the changed that was made to the .csproj file after updating and found that the PropertyGroup section with Label="SlowCheetah" was moved. After manually moving it back to the original place before the update it now works. I have not looked any deeper into the problem as my problem now seems to be solved.

mani0070 commented 9 years ago

Hi Nikatdk

Can you please share where did you move the label to?

THanks, Mani

simonjlawson commented 9 years ago

Confirmed, my publish profiles stopped transforming after upgrading to 4.5, the property group was moved to the bottom of the .proj, moving the section back to above the publish profiles fixes the issue.

davilimap commented 7 years ago

This is similar to #183 and for is closed for the same reason. All of the build logic is handled by the NuGet package.

gurunathchoukekar commented 7 years ago

For me app.Release.Config file was missing Appsettings open and close tags due to which transformation was not happening