I was recently asked to create an installer for a Windows Forms application that uses Entity Framework to comunicate to a database. I modified my program to create the database if it doesn't exist on the final user's computer, so it should work without problems. Problem is, I'm using installshield for Visual Studio 2012, and after building my installer, only 2 files were generated inside the install directory:
MyProgram.exe & MyProgram.exe.config
Problem is, I believe a EntityFramework.dll file should also be included for the program to work, but apparently, Visual Studio doesn't want to include it. I tried everything. I clicked on the properties of the EF model and selected the "Copy to Output" or "Copy if Newer", and nothing. I also tried to change my .edmx file´s properties where I switched Build Action: None to Build Action: Compile...but after that, my whole program wouldn't even build! It threw the following error:
A namespace cannot directly contain members such as fields or methods
And after double clicking the error to check where it happened, it opened the EDMX file in code, and apparently wanted me to add a namespace at the start of it...but this whole thing looks like XML...so why does it ask me for a namespace?
All I want to do is add my Entity Framework Model to my Primary Output, but nothing works. Or it doesn't appear in installshield at least. I know I can manually add "EntityFramework.dll" the file from the debug or release folder in my project/bin, but that just doesn't feel right. Should I just do that, or is there a reason why my Entity model isn't being added to my project output? Or why did my EDMX file threw a namespace error when I tried to switch the compile option from None->Compile???
Please help guys...I know it's a dumb mistake, but all I want is that the files required for my entity model to work on another PC be copied (As far as I know, all I need is that EntityFramework.dll and maybe EntityFramework.xml). Help?