Can not find Silverlight & WCF in vs2012 - visual-studio-2010

I have 2 questions :
a) I tried to make a simple WCF app in C#. I use VS2010 express edition. I created a WCF type with WCF Service Library in it. As I was instructed I created an interface class and a clas to use the interface. In this last class I was supposed to add the ServiceBehaviour like this:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
I found no ServiceBehaviour and, more, I got error. Is this because of VS2010 express edition ?
b) I downloaded VS2012, express edition. When I open a new project (C#) I expected to see Silverlight Application item, WCF item (like in VS2010). But found none. Do I have to download something more ?
Thank you.
Ee Bb

Related

How to associate item templates with Project Type in Visual Studio 2019?

I would like to create a new F# Web ASPNET (not Core) Application using the MSBuild based legacy project format, not the SDK project. In Visual Studio 2019, the only available option for this project type is C#. I've attempted to reverse engineer the project setup by creating a new F# class library and modify the ProjectTypeGuids.
The C# Web Application uses the following project type GUIDs
349c5851-65df-11da-9384-00065b846f21 - ASP.NET MVC 5
fae04ec0-301f-11d3-bf4b-00c04f79efbc - C#
On a basic F# .NET Framework class library, I attempted to add the ASP.NET and F# project type guids to the project.
<ProjectTypeGuids>{349C5851-65DF-11DA-9384-00065B846F21};{F2A71F9B-5D33-465A-A702-920D77279786}</ProjectTypeGuids>
This succeeded in adding the web configuration to the project properties, but now I am unable to add any items to the project at all. It looks like in the past you needed to associate the right language templates with the project guid in the registry editor (see this link)
These entries don't appear to be anywhere that I can see in the registry, for any installed version of VS (which at this point is just 2017 and 2019). How can I enable F# item templates for my F# web application?
While not exactly an answer to the question, I think the pain of trying to do this is likely proof that you SHOULDN'T do this. In the end my approach will be to simply implement the Web Application in C#, while keeping as much code as possible in F# targeting netstandard.

Missing "Add Domain Service Class" in Visual Studio 2012 on Windows 10

I have a Silverlight 5 app that I need to do maintenance work on. I'd like to avoid a VM.
With the release of .Net Framework 4.6.2 (in preview right now) this bug has been fixed, so it should be possible on my Win 10 machine. I have VS2012 installed along with the WCF RIA Services V1.0 SP1 (and Toolkit) plus the Silverlight 5 SDK. The project builds and runs in VS2012...
But within VS2012 I'm missing the "Add New Domain Service Class" wizard, which I need for some comparative troubleshooting. According to this answer and this link the template was removed in VS2013 and VS2015, both of which I also have installed for other projects.
How can I get the "Add New Domain Service Class" wizard back in VS2012?
LightSwitch doesn't require much of the classes and projects that are created as part of the Domain Service Class Library template. Instead you can just:
Create a Class Library project
Add a reference to System.ServiceModel.DomainServices.Server assembly
Make your class inherit from the DomainService class found in the System.ServiceModel.DomainServices.Server namespace.
for more information Creating a WCF RIA Service for Visual Studio LightSwitch 2013-2015

How to find dbcontext template in Visual Studio 11

I'm using database first approach to create a model with entity framework. In VS2010 after the model was generated I always choose a different code generation template (right click on diagram "Add new code generation item") then, in the dialog box, choose "DbContext Generator". This will instruct VS to generate POCO classes instead of the, very complex, standard class. When I tried to do the same in the Visual Studio 11 Developer Preview I can't find the template "DbContext Generator" in the dialog.
How can I add the dbcontext template to the Visual Studio 11 Developer Preview?
I saw I can use nuget but I'm unable find it when I do a search.
Can you add the Entity Framework Power Tools via the Extension Manager? Then in a class library, you can right-click and "Reverse Engineer Code First". That will pull your database in and create everything you need (no need for EDMX and TT files). You will need to have EF 4.1 installed or have added the EntityFramework NuGet package to your project before running reverse engineer.
I don't have VS 11 installed here, so can't check if the tools will install (I'm also not sure whether these features are being rolled into 11) but anyway will work great in 2010 as I frequently use it.
Richard
In February Microsoft release a dbContext Generator that works on Visual Studio 11 Beta.
The link to download this generator is:
http://visualstudiogallery.msdn.microsoft.com/da740968-02f9-42a9-9ee4-1a9a06d896a2?SRC=VSIDE
Hope it helps.

Why I am not getting WCF Web API Objects in Visual Studio 2010

I have installed WCF Web API Preview 5 using NuGet Visual Studio extension (WebApi.All). I am trying to implement some simple examples on the internet, but it seems like they have different Assemblies to the ones I installed. For example, I cannot get HttpHostConfiguration, DelegatingChannel, HttpMessageChannel, etc.
I have made sure my target framework is set to ".NET Framework 4". Am I missing something, or has anyone else experienced a similar issue. Btw, my project is an MVC3 project.
Thanks for your help.
It sounds like the sample code you are trying to use is from preview 4 or before. A number of breaking changes where made in preview 5.
To get the Http server configuration you can use the GetDefaultHttpConfiguration() extension method on the RouteCollection. The DelegatingChannel has been renamed to DelegatingHandler.
See the release notes here or this blog post from Howard Dierking for more info.
You need to add a reference to the dll that contains those classes. They are probably not referenced by default in a MVC3 project.

VS 2010 Web Service project template missing?

This may be a silly question, but I can't find the web service application template when I try to create a new project.
You propably want a WCF Service Project: New Project -> Visual C# (or Visual Basic) -> WCF Service Application.
I've just struggled with this one myself.
It's still there buried in specific options.
New Project -> Visual C# (or VB) -> Web (important)
Make sure the .NET Framework Filter is set to 3.5 or lower
The project template is called ASP.Net Web Service Application
Counter intuitively it doesn't show up if you select the broader menu: New Project -> Visual C#
Do a full install on ultimate; it is still there.

Resources