Error adding reference "Specified parameter value '{SomeFSharpProjectPath}' is not valid: Parameter name: filePath"
Describe the bug Using VS2022 17.6.2, if you try to add a service reference to any C# library project that references an F# library project, you will get the following error message:

The Connected Services component 'Microsoft WCF Web Service Reference Provider' failed: The specified parameter value '..\Swyfft.Services.AddressProcessor\Swyfft.Services.AddressProcessor.fsproj' is not valid. Parameter name: 'filePath'.
To Reproduce Steps to reproduce the behavior:
-
Either open the attached .zip file, or alternatively, create a .NET 6.0 solution with a C# library project referencing an F# library project.
-
In Visual Studio 2022, right-click on the C# library project, choose "Add", and then "Service Reference".

-
In the "Add Service Reference" modal, choose "WCF Web Service" and click "Next".

-
Instead of the next screen in the wizard, I get this error message:

Expected behavior I would expect to see the next screen in the wizard.
Screenshots See above.
Additional context See the attached solution. Scratch.zip
FWIW, this is still happening on the latest released version, i.e., 17.6.2.
Same issue for me but with a Vue .esproj project rather than f# .fsproj
Same issue for me but with a Vue .esproj project rather than f# .fsproj
FWIW, if you look at the proposed fix here, I don't know if your scenario will be addressed.
https://github.com/dotnet/wcf/pull/5174/files
Same problem here with a .vbproj referenced project
Still happening in VS2022 17.7.4 as well.
Im my case, it is appearing because I have a reference to another project written in VB.Net. If I drop the reference, I can consume the reference fine. The I just reassign the project reference.
@HongGit - Do you know if there's a plan to get your fix actually released? The released version that you get when you run dotnet tool update --global dotnet-svcutil is still 2.1.0, which has the bug.
Hi @ken-swyfft, The fix is shipped in a preview version of the tool, it turns out the "dotnet tool update ..." command only pulls the stable version, so you still get 2.1.0. Can you try uninstalling the tool and then reinstalling the preview version using the following commands?
Uninstall: dotnet tool unisntall -g dotnet-svcutil
Install: dotnet tool install --global dotnet-svcutil --version 2.2.0-preview1.23462.5
By the way, the same fix is now available in the latest VS2022 Preview release.
Hi, I have simillar issue, but with a client project for Angular and a server project for net core 8. Update to 2.2.0-preview1.23462.5 did not help. In 2.1.0 does not work either.
@petrxh, thanks for the feedback. The fix for supporting reference of .esproj in dotnet-svcutil has been merged through PR #5429. Please look forward to the forthcoming release to address this issue.
Hi, i have similar issue, my project has front-end angular and back-end api net 6. When i try to add a wcf i have similar error: "... The specified parameter value: '....esproj' is not valid. Parameter name:'filePath'". There is any solution??
Hi, if I remember it well, the client project was in an ItemGroup in the server project. I think, that it makes WCF proxy generation to try to compile also the client project, which fails. So I commented out the line in the server project file for the time of generating wcf proxy. But you need to uncomment it when you want to deploy both server and client together.
@petrxh, thanks for the feedback. The fix for supporting reference of .esproj in dotnet-svcutil has been merged through PR #5429. Please look forward to the forthcoming release to address this issue.
Any update on when this might be released? I'm on the latest visual studio 17.11, and it looks like the latest dotnet-svcutil is still 2.1.0 and the only preview release is still 2.2.0-preview1.23462.5 which was before the fix.