I'm creating a Silverlight project in VS 2012.
I have a simple data source provided by a .cs class and I would like to create a Domain Service Class and add it to the project.
Sadly, there is no such entry when I try to add an element to the project.
I'm sure the entry was there is VS 2010, why did it disappear in VS 2012?
How can I create a Domain Service Class in VS 2012?
You have added an EDMX already? I believe this is because of the change from ObjectContext to dbContext, and there are now a few extra steps to go through if you want to do things the older way ...
http://thedatafarm.com/data-access/vs2012-edmx-defaults-now-align-with-ef-team-guidance-re-dbcontext-usage/#comment-3891
...
After adding your model (EDMX) and installing the nuGet for WCFRIAServices, you will need to follow the steps given to remove the .tt files, rebuild the project, and then you should be able to add your Domain Service as before.
Related
Visual Studio 2019 CE with all updates as of today.
I create a Blank Solution.
Add Empty web project to the blank solution.
Add a class library.
Reference the library in my web project.
I build the Solution and can tell the library is working as intended.
I make a small change to the class library and build the Class Library only. The change i made doesnt reflect the output im expecting. If i rebuild the entire solution then the change i made does take affect.
Normally i can just build the single library and that does the trick. I cant work out why the entire solution needs to be built in order for the changes to come across to the web project? I even deleted the CL and added a new one but the same occurs - am i missing a setting somewhere?
I have 3 windows service with separate solutions. How can I install all the three with one visual studio Setup Project.
It's not clear why this is a difficulty, but perhaps you are stuck with the idea that the "project output" idea in a setup project means that you can have only one solution's output in a setup project.
The easiest thing to do is to create the setup project and then add (to the Application Folder) each of the service executables (which I assume have installer classes). Then add the three service executable installer classes as custom actions. To state the obvious, you allowed to have more than one custom action to install a service.
So basically I want to have an installer for my WPF application. In the setup process I want to automatically create a localdb. For this I already have a database project in the solution that contains all the tables for my database.
I was already able to manage to have an installer for the application itself. For this I used the "Microsoft Visual Studio 2015 Installer Projects" addon in VS 2015. My questions:
How can I automatically create a localdb instance in the setup process?
How can I use the database project to automatically create the database?
Is there a better solution to create setup file, than the mentioned?
You can build the .dacpac file in the Database project, include the dacpac in the WPF app as embedded resource, and use the DacFX SDK to install/update the database based on a connection string.
Code sample: https://github.com/ErikEJ/SqlCeToolbox/blob/issue-357-a/src/GUI/SqlCe35Toolbox/Helpers/DacFxHelper.cs
DacFX is available as a NuGet package now:
https://www.nuget.org/packages/Microsoft.SqlServer.DacFx.x64/
or
https://www.nuget.org/packages/Microsoft.SqlServer.DacFx.x86/
I have a project consisting of few projects (one MVC Application and 3 class libraries for business logic and data access).
I am new to building scaffolding extension and was wondering if I can create a Custom Scaffolder which can generate
Controller, ViewModel and Views in my MVC Application Project
Add some files and folders in Other Projects, that are of type Class Library.
Until now, I have achieved the 1st target (it was fairly easy) but I am unable to find any method to add files to other projects.
I was wondering if there is no direct way of doing it, maybe I can just navigate to the folders in the directories of other projects and create the files. Then include them in my project manually.
P.S. I am using the basic scaffolder template by SideWaffle
Thanks for all the answers in advance.
Sorry, but this extension is no longer available, I have discontinued it
I created an extension for Visual Studio that lets you accomplish this with T4 Templates. You should be able to hit both targets but for number one you will need to do some extra work. I don't integrate with existing scaffolding stuff so you will have to write your own but my extension makes it easy. Its up on Visual Studio gallery and I have a demo/training video you can watch to see how to generate multiple files across multiple projects. Full disclaimer, I charge for this but do offer a free community version.
I'm trying to follow this guide in order to create a web API in an empty ASP.NET project. Upon creating the project, the author gets an additional dialog that asks him if he wants folders and core references added for a couple of things, including Web API. I am not getting that option on Visual Studio 2012 Express for Web. All I'm getting is this dialog, which immediately creates the project upon being submitted:
How can I easily add all necessary references and folders to work with Web API? I am not looking at creating an MVC project, or anything else other than an empty ASP.NET project.
You could add it using a Nuget package. I think this one or this one that you have suggested is what you will need.