Comments (16)
This is happening to me too. I have an app.config in another project that is supposed to be copied on compile and it appears that it is being copied before the transform occurs. I've even tried copying in a post build event and it's not done transforming then either. When I look at the file in the Release folder, it's been transformed, so my guess is that the copy is firing before the transform or replacement is complete.
vs2012 .net 4 MVC3
from slow-cheetah.
For me publishing locally transforms just fine but on the TeamBuild 2012 server nothing happens for web applications. I have a separate web.config and entlib.config. Console applications transform just fine. Please add a web application to your sample apps.
from slow-cheetah.
I'm not sure everyone here is talking about the same thing or not. It sounds in this thread there are the following things being discussed:
- Web App Project doesn't transform non-web.config on publish (kennethito)
- How to copy the transformed file in a post-build event (nixkuroi)
- The transform is not getting invoked in my Team Build 2012 server (seanp789)
Based on the title of this issue lets focus on Web App Project doesn't transform non-web.config on publish. Guys for the other items, if you are still having problems, please open a new issue with more details.
@kennethito are you sure that you are using the latest version of SlowCheetah (version 2.4.1 available here).
I just tried it with the latest version and things look to work. Checkout this video: https://dl.dropbox.com/u/40134810/SlowCheetah/issue-30.wmv.
If you have the latest version but it is still not working, on the original file (i.e foo.xml in the video example) right-click and select Add Transform again. I fixed up some code in that handler so that may do the trick.
@seanp789 checkout the video I linked above. I will add a sample web app to the samples as well. I'd like it to be a bit more functional than what I have in the video though. I've created issue #32 to track this.
from slow-cheetah.
@sayedihashimi Took a look at the video. The xml file needs to be set to copy to the output directory (bin). The copy that goes into the bin is not transformed, while the copy sitting at the original location is.
from slow-cheetah.
@nixkuroi I have came across the exact same issue and was just wondering if you were able to find a resolution for it.
from slow-cheetah.
I believe I eventually just wrote a batch file that I run after publish that copies the transformed file to the correct locations. I never did get it to copy into the right folders during publish, but the transform did happen, so in that it was worth it. Two steps, but still far less manual than before.
On Oct 5, 2012, at 3:00 PM, kamor16 [email protected] wrote:
@nixkuroi I have came across the exact same issue and was just wondering if you were able to find a resolution for it.
—
Reply to this email directly or view it on GitHub.
from slow-cheetah.
thanks. I was actually able to get it to work by updating the .csproj file
to run a copy statement using AfterTargets="TransformAllFiles" instead of a
post build event. on my phone now but when I get back to a computer I can
send along the link I followed.
thanks again for your reply.
On Saturday, October 6, 2012, nixkuroi wrote:
I believe I eventually just wrote a batch file that I run after publish
that copies the transformed file to the correct locations. I never did get
it to copy into the right folders during publish, but the transform did
happen, so in that it was worth it. Two steps, but still far less manual
than before.On Oct 5, 2012, at 3:00 PM, kamor16 <[email protected]<javascript:_e({}, 'cvml', '[email protected]');>>
wrote:@nixkuroi I have came across the exact same issue and was just wondering
if you were able to find a resolution for it.—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-9199836.
from slow-cheetah.
@kamor16 you are correct. If you need to execute any action after files are transformed you should use the technique which you described. Create a target and then add AfterTargets="TransformAllFiles". As you stated a post-build event will not work as it's not specific enough.
I will investigate the issue where non-web.config files are not being transformed when getting into the bin folder. I've slotted it for the next release. I will keep you all posted.
/cc @nixkuroi
from slow-cheetah.
Are you copying it to all other project bin folders from the original project? Is there a way to do that without specifying each of them, or do I need to do it in each csproj copying it to its own bin?
On Oct 6, 2012, at 9:55 AM, kamor16 [email protected] wrote:
thanks. I was actually able to get it to work by updating the .csproj file
to run a copy statement using AfterTargets="TransformAllFiles" instead of a
post build event. on my phone now but when I get back to a computer I can
send along the link I followed.thanks again for your reply.
On Saturday, October 6, 2012, nixkuroi wrote:
I believe I eventually just wrote a batch file that I run after publish
that copies the transformed file to the correct locations. I never did get
it to copy into the right folders during publish, but the transform did
happen, so in that it was worth it. Two steps, but still far less manual
than before.On Oct 5, 2012, at 3:00 PM, kamor16 <[email protected]<javascript:_e({}, 'cvml', '[email protected]');>>
wrote:@nixkuroi I have came across the exact same issue and was just wondering
if you were able to find a resolution for it.—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-9199836.—
Reply to this email directly or view it on GitHub.
from slow-cheetah.
I am probably in error but I cannot get a web app config file to transform when published to a directory. I can preview the transform OK but it does not get published to the folder specified in the profile. Thx
from slow-cheetah.
Can someone give specific step-by-step directions here? Its not clear what us not working.
from slow-cheetah.
FYI I just tried the following and it looks like its working.
- Create a new project
- Add transform details to web.debug.config/web.release.config
- Add foo.xml
- Add Transform on foo.xml
- Add transform details to foo.debug.config/foo.release.config
- Publish to an Azure Web Site using MSDeploy
From what I can see it looks like its working
from slow-cheetah.
Thanks for taking the time to response.
2.5 version of SC
VS 2012
I have not been using MSDeploy, I publish to the file system. Issue??
-
.NET web project
-
Create external files for the web.config, such as “appsettings.config”. web.config uses the configsource to direct to the external file.
-
Add transformations for the external files for release/debug
-
I can preview the transformations OK.
-
Use VS profiles to publish to the files system. The transforms don’t seem to make it to the target folder. The transforms seem make it to the bin folder though.
Any clue ?
Thanks
Glenn
From: Sayed Ibrahim Hashimi [mailto:[email protected]]
Sent: Saturday, November 17, 2012 9:17 PM
To: sayedihashimi/slow-cheetah
Cc: glerler
Subject: Re: [slow-cheetah] Web Application Project - Copy to output directory config files not transformed. (#30)
FYI I just tried the following and it looks like its working.
- Create a new project
- Add transform details to web.debug.config/web.release.config
- Add foo.xml
- Add Transform on foo.xml
- Add transform details to foo.debug.config/foo.release.config
- Publish to an Azure Web Site using MSDeploy
From what I can see it looks like its working
—
Reply to this email directly or view it on GitHub #30 (comment) .
Image removed by sender.
from slow-cheetah.
File System publish for web only supports extensibility from the command line. When publishing from VS the same extensibility doesn't exist in the UI. So there is nothing SlowCheetah can do here. For this the best thing to do is open a bug at connect.microsoft.com.
If you publish from the command line with the profile can be achieved with msbuild.exe /p:DeployOnBuild=true /p:Profile=
from slow-cheetah.
Thanks,
I will give it a shot.
I have something else to add to the list of MS “oh by they way’s”
G
From: Sayed Ibrahim Hashimi [mailto:[email protected]]
Sent: Monday, November 19, 2012 12:21 PM
To: sayedihashimi/slow-cheetah
Cc: glerler
Subject: Re: [slow-cheetah] Web Application Project - Copy to output directory config files not transformed. (#30)
File System publish for web only supports extensibility from the command line. When publishing from VS the same extensibility doesn't exist in the UI. So there is nothing SlowCheetah can do here. For this the best thing to do is open a bug at connect.microsoft.com.
If you publish from the command line with the profile can be achieved with msbuild.exe /p:DeployOnBuild=true /p:Profile=
—
Reply to this email directly or view it on GitHub #30 (comment) .
from slow-cheetah.
If you open the bug I'll do my best to get it implemented.
I'm going to close this item now.
from slow-cheetah.
Related Issues (20)
- VS 2017 extenstion should auto upgrade SlowCheetah NuGet HOT 1
- Add Transform would throw memory exception HOT 2
- Inconsistent line endings on generated transformation files HOT 1
- Doesn't work in WPF HOT 2
- SlowCheetah.Samples need to be updated HOT 1
- Package Not loading VS2012 HOT 5
- Transforms don't apply during build in Visual Studio 2015 HOT 4
- Share Transformation Files HOT 2
- "Add Transform" not appearing in VS2015 HOT 3
- unable to add transforms to web.config file
- Support for publishing on .NET Core HOT 2
- Support MSbuild variables in transforms? HOT 5
- Reminding me of wrong version HOT 3
- TeamCity build (MSBuild) - cannot delete nuget from packages folder - files in use HOT 1
- Transform is not applied when publishing a console application as an Azure Web Job HOT 2
- Warning that I do not have correct version of SlowCheetah nuget package installed HOT 1
- This repository is now depracated HOT 2
- Compilation error: src\Zen.Databases.DbUp\Zen.Databases.Db.csproj in teamcity HOT 2
- Consider to add support other config file,expect release.debug config file. HOT 1
- 'Preview Transform' does nothing when selected. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slow-cheetah.