相关疑难解决方法(0)

Web.config转换:无法识别的属性'xmlns:xdt'.请注意,属性名称区分大小写

我在MVC 3.0项目中遇到这个奇怪的间歇性错误当我构建项目时,有时会收到以下错误消息:

无法识别的属性'xmlns:xdt'.请注意,属性名称区分大小写.

这是指标准的web.config转换文件(下面复制的Web.Release.config)没有其他错误或警告.这是在调试模式和发布中发生的.如果我清理解决方案,有时它会清除

开始更新

发现了这个问题.在MVC项目文件(MyProject.csproj)中,我将构建视图设置为true

<MvcBuildViews>true</MvcBuildViews>
Run Code Online (Sandbox Code Playgroud)

一旦回到,上面的错误消失了.我想建立视图,因为它停止了很多愚蠢的视图代码错误等,并且是性能增强(页面是预编译而不是jit)

有谁知道这是什么导致错误?这是一个错误吗?

结束更新

<?xml version="1.0"?>

<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <!--
    In the example below, the "SetAttributes" transform will change the value of 
    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator 
    finds an atrribute "name" that has a value of "MyDB".

    <connectionStrings>
      <add name="MyDB" 
        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    </connectionStrings>
  -->
  <system.web>
    <compilation xdt:Transform="RemoveAttributes(debug)" />
    <!--
      In the example below, the …
Run Code Online (Sandbox Code Playgroud)

web-config asp.net-mvc-3

44
推荐指数
3
解决办法
2万
查看次数

AppHarbor Web.config转换未应用

我正在ServiceStack中开发一个应用程序,我正在尝试在AppHarbor上进行部署,但是由于某些原因我的web.config转换没有被应用.

我原来是一个Web.AppHarbor.config文件,并将环境设置更改为"AppHarbor" - 一旦在多次更新后无法工作,我放弃并将环境设置更改为"Release"并将所需的转换复制到Web中. Release.Config文件.

应用程序部署正常,但配置设置不反映转换文件中的值(我通过登录使用Twitter验证这一点,并看到Twitter Auth的回调网址仍然尝试将我重定向到localhost,这是我更改的设置之一我的转换文件)

我也尝试过变换测试工具,所有工作都按预期工作.

手动将Web应用程序发布到本地文件夹会根据所选配置正确应用转换

有人有这个工作吗?有什么明显的东西我不见了吗?

谢谢

appharbor

11
推荐指数
1
解决办法
1340
查看次数

标签 统计

appharbor ×1

asp.net-mvc-3 ×1

web-config ×1