dotnet / dotnet/wcf

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

Open
#4,947 11 comments 1 reaction 2 assignees Assigned to @mconnew View on GitHub
tooling
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

**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](https://user-images.githubusercontent.com/65305317/198741533-d99684b7-a2ab-4d0a-a953-d9ea5506cdaa.png)

> 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](https://user-images.githubusercontent.com/65305317/198745066-9b05acad-0531-4145-a455-f08b283df353.png)

3. In the "Add Service Reference" modal, choose "WCF Web Service" and click "Next".
![image](https://user-images.githubusercontent.com/65305317/198745358-d23b9d57-a1d9-4bc4-bbf9-2ba587c1d414.png)

4. Instead of the next screen in the wizard, I get this error message:
![image](https://user-images.githubusercontent.com/65305317/198745603-5d1dc207-a711-49c6-a2a4-a80468cd18b5.png)

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

**Screenshots**
See above.

**Additional context**
See the attached solution.
[Scratch.zip](https://github.com/dotnet/wcf/files/9892297/Scratch.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.