Support for Visual Studio 2012

Oct 12, 2012 at 6:58 AM
Edited Oct 12, 2012 at 6:59 AM

Hello,

We are planning to move to Visual Studion 2012. Is there any plan to support it?

many thanks,

José

Oct 15, 2012 at 8:20 AM

For what it's worth, I found you can reference the projects in your own code and write an exe to generate the contract code.

If the generated code works in 2012, you could write an exe that takes command line params and put it in your project as a pre-build event.

Reference:

Thinktecture.ServiceModel.Extensions.Metadata

Thinktecture.Tools.Web.Services.CodeGeneration

Thinktecture.Tools.Web.Services.Wscf.Environment

Example code to trigger code generation:

        static void Main(string[] args)
        {
            CodeGenerator cg = new CodeGenerator();

            cg.GenerateCode(new CodeGenerationOptions()
            {
                AdjustCasing = true,
                ClrNamespace = "Test",
                ConcurrencyMode = "Single",
                ConfigurationFile = "output.config",
                DataContractFiles = null,
                EnableDataBinding = false,
                EnableWsdlEndpoint = false,
                FormatSoapActions = true,
                GenerateAsyncCode = false,
                GenerateCollections = false,
                GenerateDataContracts = false,
                GenerateOrderIdentifiers = false,
                GenerateProperties = true,
                GenerateSeparateFiles = false,
                GenerateService = true,
                GenerateSvcFile = true,
                GenerateTypedLists = true,
                InstanceContextMode = "PerCall",
                Language = CodeLanguage.CSharp,
                MetadataLocation = @"E:\Schemas\WCFTest.wsdl",
                MethodImplementation = MethodImplementation.PartialClassMethodCalls,
                OutputFileName = "Test.cs",
                OutputLocation = @"E:\built",
                OverwriteExistingFiles = true,
                Password = null,
                ProjectDirectory = @"E:\built",
                Username = null,
                UseSynchronizationContext = true,
                VirtualProperties = false,
            });

        }
J.

Oct 16, 2012 at 8:54 AM
Edited Oct 16, 2012 at 8:57 AM

1) Go to "C:\Program Files (x86)\thinktecture\WSCF.blue"

2) Copy "WSCF.blue.VS2010.addin" and rename the copy to "WSCF.blue.VS2012.addin"

3) Open "WSCF.blue.VS2012.addin" with a text editor (eg Notepad++)

4) Change the host application's version number from 10.0 to 11.0 as follows:

      <HostApplication>
        <Name>Microsoft Visual Studio</Name>
        <Version>11.0</Version>
      </HostApplication>

5) If the path "C:\Program Files (x86)\thinktecture\WSCF.blue\" is not added in Visual Studio 2012 addin file-paths list, go in Visual Studio 2012's menu: Tools->Options->Environment->Add-in Security and then add the path

6) Restart the Visual Studio 2012 IDE

Oct 16, 2012 at 11:00 AM

Hello,

I have tried to follow you description. However, the Visual Studio does not recognise it (I did the point 5 and 6).

I have Visual Studio professional 2012 and installed the latest CPT.

 

Thanks a lot!

Oct 17, 2012 at 8:11 AM

What do you mean "I did the point 5 and 6"? It will not work without the point 4, for example. I have Visual Studio Premium 2012, but I don't think this is so important. You need to go through all the steps. Hope it works!

Dec 7, 2012 at 1:53 AM

I was successful!!  Can generate the proxy class,but report a error:

 

styem.Runtime.InteropSerices.ComException(0x80004005):Unspeceified errir(Exceotion HRWSUL T:0x8004005(E_FAIL)) atVSLongpro.References.Add(string bstrPath)

 

at Thinkecture.Tool.web.Service

Dec 8, 2012 at 3:19 PM

 

It works perfectly, I have VS 2012 Premium in Win7 32bit, thank you Corneliu, as you sad one needs to do all the steps!

Feb 3, 2014 at 8:57 AM
Note for VS2013 the version is 12 in place of 11