c# - SlowCheetah not transforming for EntityFramework Migrations -


i'm using ef code-first migrations: https://msdn.microsoft.com/en-us/data/jj591621.aspx add-migration, update-database, etc. called package manager console in vs.

i'm using slowcheetah manage various environments have, notably including managing fact each developer has own copy of database can update model changes without locking else out of db. 1 of config values changes target db name.

(for reasons won't go we're not using connectionstrings .config settings such, rather having db names in appsettings blocks)

my project contains models , migrations thecustomer.database project.

if manually change appsetting value in thecustomer.database/app.config, , run migrations uses config value correctly - config fundamentally working.

but if set slowcheetah transform modify value given build config, select config, rebuild code , run migrations doesn't apply transform; uses value in base app.config, not app.selectbuildconfig.config

slowcheetah working fine in general - when run sln website it's using correct db determined vs build config.

any thoughts?

edit:

configfile:

<?xml version="1.0" encoding="utf-8"?> <configuration>   <configsections>      <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" />   <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 --></configsections>   <appsettings>     <add key="dbname" value="this default value shouldn't work - should using value specific build" />     <add key="dbpassword" value="somepassword" />   </appsettings>   <entityframework>     <defaultconnectionfactory type="system.data.entity.infrastructure.localdbconnectionfactory, entityframework">       <parameters>         <parameter value="mssqllocaldb" />       </parameters>     </defaultconnectionfactory>     <providers>       <provider invariantname="system.data.sqlclient" type="system.data.entity.sqlserver.sqlproviderservices, entityframework.sqlserver" />     </providers>   </entityframework> <startup><supportedruntime version="v4.0" sku=".netframework,version=v4.5" /></startup></configuration> 

and transform

<?xml version="1.0" encoding="utf-8" ?> <!-- more information on using transformations       see web.config examples @ http://go.microsoft.com/fwlink/?linkid=214134. --> <configuration xmlns:xdt="http://schemas.microsoft.com/xml-document-transform">     <appsettings>         <add key="dbname" value="localdev_mdm" xdt:transform="setattributes" xdt:locator="match(key)"/>     </appsettings> </configuration> 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -