problem with Svcutil.exe

Apr 14, 2009 at 7:33 AM
Hi
here is output from generate.

Svcutil.exe is connecting to http://localhost:2708/test.WCFHost/Services/PersonNameService.svc
but asp dev server listen on 2710??
and it always id diffrent:(
any idea?
========== Generation Started with 7 Mold(s) ==========
- Generation of [MoldBase] Mold Started ------
-- Loading Output Conditions-- 0 Condition(s) Loaded.
- [MoldBase] Mold Generation Complete: 0 file(s) generated.
- Generation of [SQLServerMold] Mold Started ------
-- Loading Output Conditions-- 1 Condition(s) Loaded.
-- Template : Templates\DatabaseScript.tt
--- C:\projects\pro\test\DataAccess\test.DataAccess\DBScript.sql
-- Template : Templates\StoredProcedure.tt
--- C:\projects\pro\test\DataAccess\test.DataAccess\StoredProcedures.sql
- [SQLServerMold] Mold Generation Complete: 2 file(s) generated.
- Generation of [UIMold] Mold Started ------
-- Loading Output Conditions-- 0 Condition(s) Loaded.
- [UIMold] Mold Generation Complete: 0 file(s) generated.
- Generation of [WPFMold] Mold Started ------
-- Loading Output Conditions-- 4 Condition(s) Loaded.
-- Template : Templates\EntityForm.xaml.tt
--- C:\projects\pro\test\UI\test.UI\Pages\PersonNameForm.xaml
-- Template : Templates\EntityForm.xaml.cs.tt
--- C:\projects\pro\test\UI\test.UI\Pages\PersonNameForm.xaml.cs
-- Template : Templates\EntityList.xaml.tt
--- C:\projects\pro\test\UI\test.UI\Pages\PersonNameList.xaml
-- Template : Templates\EntityList.xaml.cs.tt
--- C:\projects\pro\test\UI\test.UI\Pages\PersonNameList.xaml.cs
-- Template : Templates\ReferenceConverter.cs.tt
--- C:\projects\pro\test\UI\test.UI\Converters\ReferenceConverter.cs
-- Template : Templates\MainWindow.xaml.tt
--- C:\projects\pro\test\UI\test.UI\MainWindow.xaml
-- Template : Templates\MainWindow.xaml.cs.tt
--- C:\projects\pro\test\UI\test.UI\MainWindow.xaml.cs
- [WPFMold] Mold Generation Complete: 7 file(s) generated.
- Generation of [CSLAMold] Mold Started ------
-- Loading Output Conditions-- 0 Condition(s) Loaded.
-- Template : Templates\Entity.tt
--- C:\projects\pro\test\Business\test.Entities\GeneratedCode\Entities\PersonName.cs
-- Template : Templates\EntityList.tt
--- C:\projects\pro\test\Business\test.Entities\GeneratedCode\Entities\PersonNameList.cs
-- Template : Templates\Database.tt
--- C:\projects\pro\test\Business\test.Entities\GeneratedCode\Database.cs
-- Template : Templates\Repository.tt
--- C:\projects\pro\test\DataAccess\test.DataAccess\GeneratedCode\Repositories\Implementation\PersonNameRepository.cs
-- Template : Templates\RepositoryInterface.tt
--- C:\projects\pro\test\DataAccess\test.DataAccess\GeneratedCode\Repositories\Interface\IPersonNameRepository.cs
-- Template : Templates\app.config.tt
--- C:\projects\pro\test\Business\test.Entities\app.config
-- Template : Templates\Settings.Designer.tt
--- C:\projects\pro\test\Business\test.Entities\Properties\Settings.Designer.cs
-- Template : Templates\Settings.settings.tt
--- C:\projects\pro\test\Business\test.Entities\Properties\Settings.settings
- [CSLAMold] Mold Generation Complete: 8 file(s) generated.
- Generation of [WebServiceMold] Mold Started ------
-- Loading Output Conditions-- 0 Condition(s) Loaded.
-- Template : Templates\EntityTranslator.tt
- [WebServiceMold] Mold Generation Complete: 0 file(s) generated.
- Generation of [WCFMold] Mold Started ------
-- Loading Output Conditions-- 2 Condition(s) Loaded.
-- Template : Templates\DataContract.tt
-- Template : Templates\DataContractEnum.tt
-- Template : Templates\DataCollection.tt
-- Template : Templates\ServiceContract.tt
-- Template : Templates\ServiceImplementation.tt
-- Template : Templates\FaultContract.tt
-- Template : Templates\SVCHost.tt
-- Template : Templates\DataContractBase.tt
-- Template : Templates\ManagedEntityInterface.tt
--- C:\projects\pro\test\Business\test.Service\GeneratedCode\Services\Contracts\IPersonNameService.cs
-- Template : Templates\ManagedEntityImplementation.tt
--- C:\projects\pro\test\Business\test.Service\GeneratedCode\Services\Implementations\PersonNameService.cs
-- Template : Templates\ManagedEntitySVC.tt
--- C:\projects\pro\test\Host\test.WCFHost\Services\PersonNameService.svc
-- Template : Templates\Web.Config.tt
--- C:\projects\pro\test\Host\test.WCFHost\temp.config
- [WCFMold] Mold Generation Complete: 4 file(s) generated.
-- PostGenerate Actions [1 Action(s)]
--C:\projects\pro\test\Host\test.WCFHost\web.config (Configured).
- Adding WCF Service References
--http://localhost:2708/test.WCFHost/Services/PersonNameService.svc
--c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\Svcutil.exe /directory:"C:\projects\pro\test\UI\test.UI\ServiceReferences" /out:PersonNameServiceClient /ct:System.Collections.Generic.List`1 /namespace:*,PersonNameReference /language:cs /async /tcv:Version35 /noConfig /enableDataBinding /r:"C:\projects\pro\test\Business\test.Entities\bin\Debug\test.Entities.dll" http://localhost:2708/test.WCFHost/Services/PersonNameService.svc
**Error: Cannot obtain Metadata from http://localhost:2708/test.WCFHost/Services/PersonNameService.svc

If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.  For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.

WS-Metadata Exchange Error
    URI: http://localhost:2708/test.WCFHost/Services/PersonNameService.svc

    Metadata contains a reference that cannot be resolved: 'http://localhost:2708/test.WCFHost/Services/PersonNameService.svc'.

    Could not connect to http://localhost:2708/test.WCFHost/Services/PersonNameService.svc. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:2708.

    Unable to connect to the remote server

    No connection could be made because the target machine actively refused it 127.0.0.1:2708

HTTP GET Error
    URI: http://localhost:2708/test.WCFHost/Services/PersonNameService.svc

    There was an error downloading 'http://localhost:2708/test.WCFHost/Services/PersonNameService.svc'.

    Unable to connect to the remote server

    No connection could be made because the target machine actively refused it 127.0.0.1:2708


** Error while Executing IPreGenerate: WCFMold.PostGeneration, Details: Cannot find file "C:\projects\pro\test\UI\test.UI\ServiceReferences\PersonNameServiceClient.cs".
========== Generation Complete: 21 succeeded, 0 failed, 0 skipped ==========
Coordinator
Apr 14, 2009 at 11:57 AM
May be you need to edit the WCF Mold source code to force the Svcutil.exe to use this specific address.
The calling of Svcutil.exe will be found in "PostGenerations\PostGeneration.cs".

I hope this solve your problem.
Negm.
Apr 14, 2009 at 12:33 PM
10x a lot:))