ReplacableToken_ when using web.config transform?

前端 未结 2 1355
梦谈多话
梦谈多话 2020-12-24 04:29

I have a web.config with 2 transforms - for debug and release.

web.config:


    
    

        
相关标签:
2条回答
  • 2020-12-24 05:03

    If you want to build with Visual Studio 2010, add the following line to your configuration PropertyGroup in your .csproj:

    <AutoParameterizationWebConfigConnectionStrings>False</AutoParameterizationWebConfigConnectionStrings>
    

    More details here: How to get rid of "$(ReplacableToken...)" in web.config completely

    0 讨论(0)
  • 2020-12-24 05:09

    If, like me, you're running up against this problem while trying to automate your build process using msbuild from the command line, the correct answer can be found in this blog entry:

    http://www.zvolkov.com/clog/2010/05/18/how-to-packagepublish-web-site-project-using-vs2010-and-msbuild/

    Specifically, the parameter you need to set is:

    /p:AutoParameterizationWebConfigConnectionStrings=False
    

    This is most likely what VS is doing on your behalf when you publish to the filesystem

    0 讨论(0)
提交回复
热议问题