wcf icon indicating copy to clipboard operation
wcf copied to clipboard

Error adding reference "Specified parameter value '{SomeFSharpProjectPath}' is not valid: Parameter name: filePath"

Open ken-swyfft opened this issue 3 years ago • 11 comments

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:

image

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:

  1. Either open the attached .zip file, or alternatively, create a .NET 6.0 solution with a C# library project referencing an F# library project.

  2. In Visual Studio 2022, right-click on the C# library project, choose "Add", and then "Service Reference". image

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

  4. Instead of the next screen in the wizard, I get this error message: image

Expected behavior I would expect to see the next screen in the wizard.

Screenshots See above.

Additional context See the attached solution. Scratch.zip

ken-swyfft avatar Oct 28 '22 22:10 ken-swyfft

FWIW, this is still happening on the latest released version, i.e., 17.6.2.

ken-swyfft avatar Jun 07 '23 14:06 ken-swyfft

Same issue for me but with a Vue .esproj project rather than f# .fsproj

Spuuwn avatar Aug 10 '23 09:08 Spuuwn

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

ken-swyfft avatar Aug 10 '23 14:08 ken-swyfft

Same problem here with a .vbproj referenced project

rasputino avatar Sep 10 '23 14:09 rasputino

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.

csalerno avatar Oct 26 '23 17:10 csalerno

@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.

image

ken-swyfft avatar Dec 05 '23 22:12 ken-swyfft

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.

imcarolwang avatar Dec 06 '23 01:12 imcarolwang

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.

obrazek

petrxh avatar Apr 03 '24 07:04 petrxh

@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.

imcarolwang avatar Apr 03 '24 08:04 imcarolwang

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 avatar Apr 19 '24 12:04 petrxh

@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.

christiang-ema avatar Aug 14 '24 17:08 christiang-ema