Reputation: 421
I am trying to add a service reference to my MVC application project. The project is targeting 4.5.1 .NET framework. When I add the service reference the service is added under connected service folder, I expected this to be under a folder named "Service References". how can I do that ? if that is impossible what is the different between connected services and reference services? if i make it under connected service there is any problem ?
Upvotes: 0
Views: 615
Reputation: 578
Generally, when adding a service reference, it will be in the Service Reference folder. If the references are not under Service References, you can put them under Service Reference and tell the program that they are Service references. Or the Service References that specify a location. Here's what you can do:
First edit the XML file and add the following code:
<ItemGroup>
<WCFMetadataStorage Include="Service References\NameOfYourReference\" />
<WCFMetadataStorage Include="Service References\NameOfYourOtherReference\" />
</ItemGroup>
Then because VS automatically generates a reference1.cs, you need to remove it and change the code in the reference.cs file:
<Compile Include="Service References\NameOfYourReference\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
Upvotes: 0