System.IO.FileNotFoundException: 'Could not load file or assembly '.MyProject.XmlSerializers.dll'. The system cannot find the file specified.'
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 576
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 2
Description
I have generated JAX-RPC SOAP web service proxy with Visual Studio 2019. When I call a service method I got following exception at runtime:
```C#
System.IO.FileNotFoundException: 'Could not load file or assembly 'PathToProject\MyProject.XmlSerializers.dll'. The system cannot find the file specified.'
```
I also tried `Generate Serialization Assembly` from `Properties->Build`, when I change the value to `On` I got build error:
```
An attempt was made to load an assembly with an incorrect format: C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\Microsoft.VisualBasic.Core.dll.
MyProject PathToMyProject\MyProject \SGEN 1
```
Here is my `csproj` file:
```
Exe
netcoreapp3.1
On
```
And the output of `dotnet --info`:
```
.NET Core SDK (reflecting any global.json):
Version: 3.1.202
Commit: 6ea70c8dca
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.202\
Host (useful for support):
Version: 3.1.4
Commit: 0c2e69caa6
.NET Core SDKs installed:
1.0.0 [C:\Program Files\dotnet\sdk]
2.1.802 [C:\Program Files\dotnet\sdk]
2.2.402 [C:\Program Files\dotnet\sdk]
3.1.200 [C:\Program Files\dotnet\sdk]
3.1.202 [C:\Program Files\dotnet\sdk]
```
Contributor guide
Assessment
This issue has not been assessed yet.