Wcf: Usage of local relative paths in ConnectedService.json file

Created on 19 Nov 2018  路  8Comments  路  Source: dotnet/wcf

It would be nice to be able to use relative paths for local WSDL files in the ConnectedService.json file. Now, if we add a new service, that is generated from local WSDL file (file is inside the project / solution repository), a full abolute path is stored in the ConnectedService.json file.

{
  "ProviderId": "Microsoft.VisualStudio.ConnectedService.Wcf",
  "Version": "15.0.20119.1312",
  "ExtendedData": {
    "Uri": "C:\\src\\MySolution\\MyProject\\wsdl\\my-wsdl.wsdl",
  },
}

Is an another developer try to update the service, it fails because of different absolute path on his computer.

If we could use relative paths for local WSDL files, this problem would not happen.

{
  "ProviderId": "Microsoft.VisualStudio.ConnectedService.Wcf",
  "Version": "15.0.20119.1312",
  "ExtendedData": {
    "Uri": "./wsdl/my-wsdl.wsdl",
  },
}
bug priority 2 tooling

Most helpful comment

Reopening since it looks like the fix we made may have been specific to only the wsdl file, which is why you would still experience this problem with the references node. We'll need to investigate and handle all paths the same way.

All 8 comments

Thanks for the suggestion. We'll look into this.

After some investigation it looks like this is a bug. The dotnet-svcutil tool correctly uses a relative path, but for some reason the Connected Service is doing something that saves it as a full path. We'll investigate why this is happening and work on a fix.

This is fixed in the latest preview version of Visual Studio (VS 2019 16.3 Preview 2), which you can download from https://visualstudio.microsoft.com/vs/preview/. Thanks for reporting this so we could fix it!

This issue is still happening in VS2019 vs 16.4.5

@Jean-Marc1 Can you give some more information about what you're experiencing? We made a fix for this in 16.3 and without more information I'm not sure what to investigate. Do you see this when using the tool for an update or for generating a new proxy? Is it the wsdl path that isn't relative or some other path?

.Net Standard 2.0 class library project with a reference to a WCF .NetFramework 4.7.2 service...
The "references" node inside "ConnectedService.json" would should a physical path for a dependency dll (a project in the same solution).
Since the path is not the same on all developers' machine, this creates a bunch of compile errors.

Reopening since it looks like the fix we made may have been specific to only the wsdl file, which is why you would still experience this problem with the references node. We'll need to investigate and handle all paths the same way.

.Net Standard 2.0 class library project with a reference to a WCF .NetFramework 4.7.2 service...
The "references" node inside "ConnectedService.json" would should a physical path for a dependency dll (a project in the same solution).
Since the path is not the same on all developers' machine, this creates a bunch of compile errors.

Experiencing the same as @Jean-Marc1 in VS2019 16.7.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mconnew picture mconnew  路  5Comments

kevinoid picture kevinoid  路  6Comments

mconnew picture mconnew  路  6Comments

Petermarcu picture Petermarcu  路  4Comments

DotNetPart picture DotNetPart  路  6Comments