Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9084549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:01:33+00:00 2026-06-16T21:01:33+00:00

I have two projects that need to use EF 4.3.1 migrate.exe tool during a

  • 0

I have two projects that need to use EF 4.3.1 migrate.exe tool during a build script. It would be a pain to point to the transformed web.config, which is deployed on a server different than my build server, so I want to pass in the connection string as a flag.

I’ve tried every variation I can think of (different computers, SQL Server 2008, just a command line and not a .bat, running as an administrator, etc.), but I always get the error:
ERROR: Exception has been thrown by the target of an invocation.

Here is an example of a .bat file I have tried on my local computer:

@rem run_db_migrations.cmd
SET StartUpDirectory=%CD%\MyProject.MVC\bin 
SET ConnectionString=Data Source=.\SQLEXPRESS;Initial Catalog=MyProject;Integrated Security=True
SET ConnectionStringProvider=System.Data.SqlClient
SET MigrateExe=.\packages\EntityFramework.4.3.1\tools\migrate.exe

%MigrateExe% MyProject.MVC.dll /StartUpDirectory:"%StartUpDirectory%" /ConnectionString:"%ConnectionString%" /connectionProviderName:%ConnectionStringProvider%
pause

I’ve seen other posts similar to this and they say this just works, but curiously their flags are slightly different, so I wonder if something has changed or if they mis-typed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:01:35+00:00Added an answer on June 16, 2026 at 9:01 pm

    I answered a similar question here on how to override connectionstring through parameters to migrate.exe. However, I have yet to get it working without specifying a web/app.config file.

    https://stackoverflow.com/a/14138797/134761

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose you have two seperate ASP.NET Web Application projects that both need to use
We have two projects that are both class libraries. Project 1 is a VS
I have two different projects and in one, I have a class that defines
I have a list that has two items: projects and groups. Projects can go
I have two projects in the same Subversion repository. They both use some standard
I have a massive, unfamiliar Java codebase that I need to use in one
I have two projects; A and B, where B needs to use some classes
I've got question to you. I have got two project in PHP that uses
I have a project that uses two third party libraries, both of which make
I have a project that generates applications for two targets. One of the targets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.