Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
vb.net app.config xml转换不起作用_Vb.net_Xslt_App Config - Fatal编程技术网

vb.net app.config xml转换不起作用

vb.net app.config xml转换不起作用,vb.net,xslt,app-config,Vb.net,Xslt,App Config,我想在我的app.config中添加一些设置。通过预览,可以正确添加设置,但不能在生成后添加 我的App.config <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFram

我想在我的app.config中添加一些设置。通过预览,可以正确添加设置,但不能在生成后添加

我的App.config

    <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
    <!--<providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>-->
  </entityFramework>
  <connectionStrings>
    <add name="BackOfficeEntities" connectionString="metadata=res://*/DAL.BackOfficeDAL.csdl|res://*/DAL.BackOfficeDAL.ssdl|res://*/DAL.BackOfficeDAL.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=MySource;initial catalog=***;persist security info=True;user id=***;password=***;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <appSettings />
</configuration>
我的App.Debug.config

<?xml version="1.0" encoding="utf-8" ?>
<!-- For more information on using transformations 
     see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <appSettings>
    <add key="inputDirectory" value="C:\Dev\Intranet_MISC\" xdt:Transform="Insert"  />
    <add key="outputDirectory" value="C:\Dev\Intranet_MISC\Traites\" xdt:Transform="Insert"  />
    <add key="historyDirectory" value="C:\Dev\Intranet_MISC\XmlHistory\" xdt:Transform="Insert"  />
    <add key="MH_ID_MOTIF_REPOS_HEBDO" value="16" xdt:Transform="Insert" />
  </appSettings>
</configuration>
生成后的最终app.config:

<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using transformations 
     see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <appSettings>
    <add key="inputDirectory" value="C:\Dev\Intranet_MISC\" xdt:Transform="Insert"  />
    <add key="outputDirectory" value="C:\Dev\Intranet_MISC\Traites\" xdt:Transform="Insert"  />
    <add key="historyDirectory" value="C:\Dev\Intranet_MISC\XmlHistory\" xdt:Transform="Insert"  />
    <add key="MH_ID_MOTIF_REPOS_HEBDO" value="16" xdt:Transform="Insert" />
    <add key="inputDirectory" value="C:\Dev\Intranet_MISC\"/>
    <add key="outputDirectory" value="C:\Dev\Intranet_Dekra_MISC\Traites\"/>
    <add key="historyDirectory" value="C:\Dev\Intranet_MISC\XmlHistory\"/>
    <add key="MH_ID_MOTIF_REPOS_HEBDO" value="16"/>
  </appSettings>
</configuration>

你对问题的起因有什么看法吗?

我发现了。在vbproj中,我修改了一个属性:

发件人:

致:

在ohters vbproj中没有此propertyGroup

<PropertyGroup>
    <AppConfig>App.$(Configuration).config</AppConfig>
  </PropertyGroup>
<PropertyGroup>
    <AppConfig>App.config</AppConfig>
  </PropertyGroup>