-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
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
Transform is previewed but not applied on publish #195
Comments
The same problem |
@francofs Is the project repo available somewhere for me to verify the problem? If not, can you give specific steps to reproduce the issue starting from a new project? |
@davilimap Same issue here using:
Here is a fresh .NET Core web project. SlowCheetah is not working correctly in it. TestOfSlowCheetah.zip 1.) I get no Add Transform option in the menu. I have to manually create the file. This kind of makes the extension pretty useless, so any help you can offer would be greatly appreciated. PS: The module seems to work as expected on an older MVC5 ASP.NET Framework project. It just seems to be failing on the .NET Core project. If you are going to list that it works with VS 2017 you should be sure to include the major framework-variants. |
@davilimap I can't share the project repo, but it's easily reproduced: 1 - Create a new Web API Project in Visual Studio 2015 (SP3) You'll realize that the file is not transformed. You can try to transform other files in the root folder, like transforming an app.config and it will work. I think it may be related to the fact it's in a subfolder or something about its name. Not really sure. Thanks for getting back to me. |
I'm not sure is it expected behaviour or not but eventually I found out what's happening here. My config is transformed (yes it is), but a transformed file is not placed under a project folder and is only in bin. What I did is put some post-build script to copy from my binaries back to the project. @davilimap have you ever considered an option to put the transformed config directly to the project folder instead of binaries? |
@iamkarlson This behavior has been considered previously, especially because of the how web.config works for debugging. Unfortunately, doing this can cause some problems for a lot of users as they might not be aware of the change to their project. Also, if the altered files are checked in, that might cause problems with version control. @francofs Following your steps, I got to publishing the project and indeed it did not work as intended. Then, I realized that VS defaults your publish to use the Release configuration. When I went back to the publish settings, I switched the configuration to my created one (which I called Test). Can you try doing that to see if it works? I'm adding a pic below to show where I changed the configuration. |
@davilimap Does it work as expected for you in the TestOfSlowCheetah.zip I attached in my prior response? |
@eat-sleep-code Your case is a bit different for two reasons. |
Hi @davilimap <https://github.com/davilimap>, yes my publish settings are
correct and the configuration is fine. Have you successfully transformed
the /newrelic/newrelic.config file? I think it has to do with the fact it's
in a subfolder. Please confirm if it's the same case. Also, try my sample
and the transformation I provided in the beginning of the thread.
Thank you
…On Mon, Mar 20, 2017 at 8:02 PM, Davi Paulino ***@***.***> wrote:
@eat-sleep-code <https://github.com/eat-sleep-code> Your case is a bit
different for two reasons.
First, the current version of SlowCheetah purposefully ignores web.config
files in all projects (the next version will ignore only for web projects)
because transforms for that file are not handled by SlowCheetah. For more
information on why this is, see #39
<#39>. This is why
the Add Transform option does not show up for web.config.
The second reason this does not work is that the publish pipeline for .NET
Core projects is completely different than for previous projects,
especially web. Even the way the web project is identified in .NET Core is
different from older projects, which used an extra GUID to signal web apps.
This means that the current version of SlowCheetah does not identify the
project as web, but even if it did, it cannot insert itself into the
publish process because of the differences in .NET Core.
I opened #235 <#235>
to track this issue and put it in the backlog for now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGveQ5menQ55pW8ci157KYurvmlTVAxPks5rnwWYgaJpZM4J5ZN_>
.
|
@francofs Yes, I successfully transformed the |
@davilimap thanks. It appears that MS short-sightedly dropped the web.config transform functionality on .net Core project because .net Core does not rely on web.config. That is all fine and great, but IIS does still rely on web.config so it wasn't very bright for them to drop support. So my particular issue doesn't appear to be related to slow-cheetah at all. |
Hi,
I ran into an issue that has been bugging me for some time now, so I think maybe it is a bug.
I added transformation one the nuget packages of our project: NewRelic.Azure.WebSites.x64
It creates a configuration file in \newrelic\newrelic.config
Using the context menu, I add the transformations. (Dev, Hml, Prd).
The Transformation is on the Prd configuration (newrelic.Prd.config).
The original file:
The transform file:
If I preview the change, I see the transformation applied, however, when i publish it, the file is not transformed:
I have tried many things, including transforming not only the configuration transformation file as the publish profile transformation file. Neither worked. That's why I think I may have hit an unknown bug.
Below is the transformation preview:
Thank you for looking into it.
The text was updated successfully, but these errors were encountered: