Cannot Import Asmx web service reference in vs 2010 - visual-studio-2010

I have web site built in visual studio 2008 using .net framework 3.5.Now i want to migrate the web site code to visual studio 2010 but want to keep the target framework to same i.e 3.5. The web site is built using vb.Net.MY problem is when i am importing the reference of web service in visual studio 2010 it show error as "NameSpace or type specified in imports 'WebReference' does not contain any public methods".My service name is "WebReference" . I thought may be .net has built in System.web.services.Description.Webreference ,may be it shows conflict ,so i tried to rename it to "WebReference1" or some other name but it does not have any effect,yhe error is still there.What am i missing?

probably it is because you cannot use importer :
ServiceDescriptionImporter importer = new ServiceDescriptionImporter();
in vs 2010....you need vs 2012 because that only has support for .net framework 4.5 which in turn has assembly references to ServiceDescriptionImporter .

Related

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

Convert SharePoint 2010 Solution to 2013 and Visual Studio 2012

I am trying to convert a SharePoint 2010 solution (custom web parts, content types, lists, event receivers, etc.) developed in Visual Studio 2010 to SharePoint 2013 and Visual Studio 2012. When I open the project in VS 2012, it converts a couple of the project files but won't compile because of reference issues.
I copied the DLLs (mostly Microsoft.SharePoint..., although I needed to copy the Microsoft.Office.SecureStoreService.dll too) that were causing issues from my 2010 server to the 2013 server and fixed the references. However, the Microsoft.Office.SecureStoreService.dll still gives me compiler errors claiming "Error 203 The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)" when visual studio has no problem with the namespace and finds the SecureStoreProvider class inside it just fine.
I've also tried to change the target framework from 3.5 to 4 and only see "Install other frameworks..." in the target framework dropdown.
I'm sure that others have dealt with this, but have been unsuccessful in framing the right google search query. I'm relatively new to SharePoint in general and any help would be appreciated.
thanks,
Mike
I was able to get my solution upgraded from a 2010 project to 2013 using the following. Note that this will update your solution to use the new 2013 API. It is possible to update just the project file but still run in 2010 mode.
First edit your .csproj file (for c#).
Modify the target framework to this:
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
Add this a node for the office version, I put mine directly below the TargetFrameworkVersion tag
<TargetOfficeVersion>15.0</TargetOfficeVersion>
Update references
Reload the project and update your referenced assemblies. If you haven't specified a specific version they should already be referencing the v15 (SharePoint 2013) assemblies.
Do a find replace for 14.0.0.0 to 15.0.0.0. This updates any references on your pages, layouts, and master pages to the v15 assemblies.
Change calls
Change any calls to SPUtility.GetGenericSetupPath() to SPUtility.GetVersionedGenericSetupPath()
Check each file to do a check for any hive references. You'll need to add a /15/ to these. EG: _layouts/ to _layouts/15/
Open the package "folder" in visual studio then update the properties for that package to use version 15.
Clean up
Finally do a compile clean up any missed items. Deploy your solution and make sure to test thoroughly.

Visual Studion does not see Microsoft.SharePoint.SPWeb namespace

Working on a piece of code that interacts with a sharepoint app on a separate (SP) server. I'm using VS2010 and have referenced and installed Microsoft.SharePoint dll (2007 version) in my Windows Formd project.
VS is not picking up the SharePoint class Microsoft.SharePoint.SPWeb and SPSite. The entire line is like this: Microsoft.SharePoint.SPWeb sp_web = new Microsoft.SharePoint.SPSite("mySPsiteurl").OpenWeb();
The SPWeb and SPSite do turn teal as soon as I add their name space in the refereces, but as soon as I run the app they turn black and throws an error of missing assembly reference.
Any ideas as why is this happenning?
Thanks,
Risho
How would you added this Microsoft.SharePoint dll for 2007 ? did you copy that manyually in File System ?
The Sharepoint 2007 .NET assemblies will not appear in the .NET tab because by default they will include SharePoint 2010 assemblies.
However if you create a Sharepoint 2007 project in VS2010 (the two 2007 workflow projects we have under the Sharepoint tab) these 2007 assemblies will be added for you and by this the SPWeb and SPSite will also be available to you and vanishes your error.
Hope this helps

Visual Studio project type guids

I downloaded a Visual Studio project but I can't open it in my copy of Visual Studio 2010. Useless error message:
The project type is not supported by this installation.
What software do I need to open the project type? It doesn't say.
I actually went and read the .csproj file, it tells me it's project type
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Am I meant to recognise what software I need from this random string? This is absolutely ludicrous.
Here's a list of project type GUIDs:
8BB2217D-0F2D-49D1-97BC-3654ED321F3B ASP.NET 5
603C0E0B-DB56-11DC-BE95-000D561079B0 ASP.NET MVC 1
F85E285D-A4E0-4152-9332-AB1D724D3325 ASP.NET MVC 2
E53F8FEA-EAE0-44A6-8774-FFD645390401 ASP.NET MVC 3
E3E379DF-F4C6-4180-9B81-6769533ABE47 ASP.NET MVC 4
349C5851-65DF-11DA-9384-00065B846F21 ASP.NET MVC 5 / Web Application
FAE04EC0-301F-11D3-BF4B-00C04F79EFBC C#
9A19103F-16F7-4668-BE54-9A1E7A4F7556 C# (forces use of SDK project system)
8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942 C++
13B669BE-BB05-4DDF-9536-439F39A36129 CPS barebones project
A9ACE9BB-CECE-4E62-9AA4-C7E7C5BD2124 Database
4F174C21-8C12-11D0-8340-0000F80270F8 Database
C8D11400-126E-41CD-887F-60BD40844F9E Database
3EA9E505-35AC-4774-B492-AD1749C4943A Deployment Cab
06A35CCD-C46D-44D5-987B-CF40FF872267 Deployment Merge Module
978C614F-708E-4E1A-B201-565925725DBA Deployment Setup
AB322303-2255-48EF-A496-5904EB18DA55 Deployment Smart Device Cab
F135691A-BF7E-435D-8960-F99683D2D49C Distributed System
BF6F8E12-879D-49E7-ADF0-5503146B24B8 Dynamics 2012 AX C# in AOT
82B43B9B-A64C-4715-B499-D71E9CA2BD60 Extensibility
F2A71F9B-5D33-465A-A702-920D77279786 F#
6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705 F# (forces use of SDK project system)
95DFC527-4DC1-495E-97D7-E94EE1F7140D IL project
E6FDF86B-F3D1-11D4-8576-0002A516ECE8 J#
262852C6-CD72-467D-83FE-5EEB1973A190 JScript
20D4826A-C6FA-45DB-90F4-C717570B9F32 Legacy (2003) Smart Device (C#)
CB4CE8C6-1BDB-4DC7-A4D3-65A1999772F8 Legacy (2003) Smart Device (VB.NET)
581633EB-B896-402F-8E60-36F3DA191C85 LightSwitch Project
8BB0C5E8-0616-4F60-8E55-A43933E57E9C LightSwitch
b69e3092-b931-443c-abe7-7e7b65f2a37f Micro Framework
C1CDDADD-2546-481F-9697-4EA41081F2FC Office/SharePoint App
786C830F-07A1-408B-BD7F-6EE04809D6DB Portable Class Library
66A26720-8FB5-11D2-AA7E-00C04F688DDE Project Folders
D954291E-2A0B-460D-934E-DC6B0785DB48 Shared Project
593B0543-81F6-4436-BA1E-4747859CAAE2 SharePoint (C#)
EC05E597-79D4-47f3-ADA0-324C4F7C7484 SharePoint (VB.NET)
F8810EC1-6754-47FC-A15F-DFABD2E3FA90 SharePoint Workflow
A1591282-1198-4647-A2B1-27E5FF5F6F3B Silverlight
4D628B5B-2FBC-4AA6-8C16-197242AEB884 Smart Device (C#)
68B1623D-7FB9-47D8-8664-7ECEA3297D4F Smart Device (VB.NET)
2150E333-8FDC-42A3-9474-1A3956D46DE8 Solution Folder
3AC096D0-A1C2-E12C-1390-A8335801FDAB Test
A5A43C5B-DE2A-4C0C-9213-0A381AF9435A Universal Windows Class Library
F184B08F-C81C-45F6-A57F-5ABD9991F28F VB.NET
778DAE3C-4631-46EA-AA77-85C1314464D9 VB.NET (forces use of SDK project system)
C252FEB5-A946-4202-B1D4-9916A0590387 Visual Database Tools
54435603-DBB4-11D2-8724-00A0C9A8B90C Visual Studio 2015 Installer Project Extension
A860303F-1F3F-4691-B57E-529FC101A107 Visual Studio Tools for Applications (VSTA)
BAA0C2D2-18E2-41B9-852F-F413020CAA33 Visual Studio Tools for Office (VSTO)
2CFEAB61-6A3B-4EB8-B523-560B4BEEF521 Web Deployment
E24C65DC-7377-472B-9ABA-BC803B73C61A Web Site
3D9AD99F-2412-4246-B90B-4EAA41C64699 Windows Communication Foundation (WCF)
76F1466A-8B6D-4E39-A767-685A06062A39 Windows Phone 8/8.1 Blank/Hub/Webview App
C089C8C0-30E0-4E22-80C0-CE093F111A43 Windows Phone 8/8.1 App (C#)
DB03555F-0C8B-43BE-9FF9-57896B3C5E56 Windows Phone 8/8.1 App (VB.NET)
60DC8134-EBA5-43B8-BCC9-BB4BC16C2548 Windows Presentation Foundation (WPF)
BC8A1FFA-BEE3-4634-8014-F334798102B3 Windows Store (Metro) Apps & Components
D954291E-2A0B-460D-934E-DC6B0785DB48 Windows Store App Universal
930C7802-8A8C-48F9-8165-68863BCCD9DD WiX Setup
14822709-B5A1-4724-98CA-57A101D1B079 Workflow (C#)
D59BE175-2ED0-4C54-BE3D-CDAA9F3214C8 Workflow (VB.NET)
32F31D43-81CC-4C15-9DE6-3FC5453562B6 Workflow Foundation
EFBA0AD7-5A72-4C68-AF49-83D382785DCF Xamarin.Android / Mono for Android
6BC8ED88-2882-458C-8E55-DFD12B67127B Xamarin.iOS / MonoTouch
F5B4F3BC-B597-4E2B-B552-EF5D8A32436F MonoTouch Binding
6D335F3A-9D43-41b4-9D22-F6F17C4BE596 XNA (Windows)
2DF5C3F4-5A5F-47a9-8E94-23B4456F55E2 XNA (XBox)
D399B71A-8929-442a-A9AC-8BEC78BB2433 XNA (Zune)
Some of these are given different names under different versions of Visual Studio, so if you don't see an exact name match, look for a similar or related name.
I found a site that lists some known project type GUIDs for Visual Studio 2008.
FAE04EC0-301F-11D3-BF4B-00C04F79EFBC looks like a Windows C# project (probably a Class Library project?)
786C830F-07A1-408B-BD7F-6EE04809D6DB appears to be a Portable Library project
I agree that it's crazy to expect a developer to understand the project type represented by a GUID but whoever supplied the code you downloaded could have indicated what was required to build it!
Visual Studio projects system architecture uses GUIDs to identifiy the type of the project. You could find online lists like these below:
INFO: List of known project type Guids
Visual Studio Projects - Project Type GUIDs
Such GUIDs allows the Visual Studio to recognize what type of project user opened and use appropriate tools and editors. To uderstand better what do I mean - read this post for example: Opening an ASP.NET MVC project without having ASP.NET MVC installed: The project type is not supported by this installation

Is anyone aware of an Object Manager Enterprise plugin for Visual Studio 2010?

I'm using DB4O on a new project I'm playing with and it would help me no end if I was able to use the Object Manager Enterprise utility. I understand it's only available as a VS plugin, so does anyone know whether such a plugin is / will be available for Visual Studio 2010, or is there another way to get the utility?
Currently there's no Object Manager version available for Visual Studio 2010. =(
A few suggestions for alternatives:
When you still have Visual Studio 2008 or 2005 installed, you can use the existing Object Manager for these versions.
You can use LINQPad for db4o as suggested here on SO. However this only works together when you load your domain model into LINQPad
You could use the Object Manager plugin for Eclipse. This version is distributed with the Java-version of db4o. So you need to download Eclipse and the java-db4o distribution. However this version of the Object Manager doesn't fully understand the .NET types, so some object are correctly displayed.
OME will be available for VS2010 when we introduce .Net 4.0 support.
Meanwhile you can try to install the OME that comes with db4o .Net 3.5 package and change the configuration file OMAddin.AddIn from "%mydocuments%\Visual Studio 2008\Addins\" to "%mydocuments%\Visual Studio 2010\Addins\" (if this folder doesn't exist just create it)
Then, open OMAddin.AddIn and change the line:
<Version>9.0</Version>
to
<Version>10.0</Version>
Now after starting VS 2010 OME should work and you should be able to see its toolbar (I have this procedure with VS 2010 beta2 and it worked).
Best
Adriano

Resources