LocalDb for Unit Testing with Entity Framework 5.0 deployed to AppHarbor - visual-studio

Is it possible to run unit tests in Visual Studio 2012 against a localDb that is built with Entity Framework 5.0 Code-First? Currently our development is against a SQL Express Server Instance but this will not work with AppHarbor deployments since the Db is unavailable.

I'm not sure that using LocalDB would solve your problem. To use LocalDB, LocalDB still has to be installed on the machine running your unit tests and that may not be the case on AppHarbor.
Consider these resources for alternatives:
Integration Testing Entity Framework code first with in-memory database (use SQL Server CE using a file in unit test directory)
Effort (let's you create schema and run unit tests in memory without touching the file system - probably preferable)

Related

What use as Database for developing asp.net vNext + Entity Framework 7 on OSX

I'm trying to set up my environment for developing asp.net vNext + Entity Framework 7 on my OSX.
Apparently, there is no provider for MySQL neither PostgreSQL yet. Thus, what can be used as database for developing on OSX?
What you folks have been doing for develop asp.net vNext on OSX? Or should I set up a Windows VM?
Any suggestion?
I've got even an open issue on Github on this topic.
Cheers
We will have a PostgreSQL and/or MySQL provider for EF7 (either delivered by our team or we'll work with a provider writer to help them build it). Work hasn't started on them yet though.
We haven't been focusing on EF7 on Mono at this stage, so there are likely some rough edges. We do have some folks who have successfully used it to connect to a remote SQL Server though.
To date, no RDBMS is supported on OSX for EF7.
Since (LocalDB)\v11.0 doesn't allow remote access and run on OSX/LNX, I've setup a SQLServer2012 Express and SQLServer 2012 Standard Edition hosted on a local Windows VM to establish a remote DB connection from my Visual Studio Code project.
From Visual Studio Code running on OSX, EF7 fails to successfully connect and interact with those local SQL Servers. In this instance, I was using the ASP.NET 5 Music Store example project: GitHub Source
Oh, and with all the SSL requirements, AZURE SQL Server is out of the question as an option.
Microsoft is heading in the right direction, we'll get there, but you're dealing with bleeding edge EF7 at the moment which is a complete reengineering from EF6.

Deploying MVC/Entity Framework application using Oracle

One of my colleagues needs an application deployed on a web server. However, the application uses MVC and Entity framework (which are both new technologies for me.)
I have done a straight 'bin copy' deployment. Part of the application seems to function properly, but other parts are not. I believe the application is failing when accessing the database.
Here are the application particulars:
- Visual Studio 2010
- MVC 4
- Entity Framework 5
- Database being accessed: Oracle 11gR1
The machine the application is being deployed on:
- Windows Server 2008 with IIS 7
- An existing Oracle 11.2.0 full client (for use with other applications on the server)
My question: Am I doing this right? Is it necessary to do a separate install of ODAC? And if I do, will it mess up my existing Oracle 11 client?
Yes, you have to install ODAC components on the server.
Please check below link for more info.
Cannot Deploy MVC Project with Entity Framework and Oracle ODAC

Start ASP.NET Development Server automatically in unit tests

In Visual Studio, if you begin debbuging on a webservice, the ASP.net Development Server will start up for you.
I have a series of unit tests that rely on this server being here. How can I find out how this Development Server is invoked? I would like to start it up automatically.

Visual Studio on Production

Does Visual Studio need to be installed on a production server?
My question is I need it to perform some task like (providers to connect to oracle for example) or only .net framework?
You would need only the appropriate .NET framework version on the production server. Then you can deploy your code, which was developed in some internal server, to the production server.
It's not needed at all. In fact, at most places I've seen Visual Studio is either implicitly or explicitly forbidden from production servers.
Apps that won't seem to run without VS having been installed usually just need some runtimes.

How to use CruiseControl.NET for database and windows service deployment?

I have a VS 2008 solutions that includes a number of projects including a couple of class libraries, a web application, a windows service and a SQL 2008 database project. The build server currently has CruiseControl.NET version 1.5.0.6237, command-line subversion client and .NET framework 3.5 SP1 installed (Windows Server 2008 R2, no Visual Studio). I was able to configure ccnet to retrieve get latest from svn repository, build the solution using an MSBuild task and deploy the web application using robocopy. Now I'm struggling to make ccnet deploy the database script and I also need get the windows service deploy and start on the build/dev server. The latest error is that the assembly Microsoft.Data.Schema.Tasks is missing on the build server (I had to add Microsoft.Data.Schema.Common.targets and Microsoft.Data.Schema.SqlTasks.targets files to the solution and modify the database project file to get this far).
What would be the best CI/deployment approach in my scenario? Am I using the right tools for the job, or should I be using something other than ccnet? Do I need to install anything else on the build/dev server to make my life easier?
Please be very specific since I'm new to CruiseControl.NET and MSBuild tasks.
You can use nant.
For a jump start you can use
nantbuilder.
For service install
read this
For a DB deploy read this

Resources