question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet-svcutil.xmlserializer Assembly Load Error

See original GitHub issue

Describe the bug The dotnet-svcutil.xmlserializer is encountering an error because it is trying to load an assembly that does not exist. C:\Users\Admin.nuget\packages\system.private.servicemodel\4.7.0\ does not contain a runtimes folder.

To Reproduce Steps to reproduce the behavior:

  1. Follow the steps in this article https://docs.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil.xmlserializer-guide

Expected behavior Generation of a serialization assembly.

Screenshots `Microsoft ® Build Engine version 16.4.0+e901037fe for .NET Core Copyright © Microsoft Corporation. All rights reserved.

Restore completed in 23.16 ms for C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj. Restore completed in 59 ms for C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj. SvcUtilXmlSerializePreGen -> C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\bin\Debug\netstandard2.0\SvcUtilXmlSerializePreGen.dll Load Assembly From C:\Users\Admin.nuget\packages\system.private.servicemodel\4.7.0\runtimes\win\lib\netstandard2.0\System.Private.ServiceModel.dll EXEC : warning : Fail to load the assembly C:\Users\Admin.nuget\packages\system.private.servicemodel\4.7.0\runtimes\win\lib\netstandard2.0\System.Private.ServiceModel.dll with the error Cannot load file C:\Users\Admin.nuget\packages\system.private.servicemodel\4.7.0\runtimes\win\lib\netstandard2.0\System.Private.ServiceModel.dll as an Assembly. Check the FusionLogs for more Information. [C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj]

Microsoft ® dotnet-svcutil.xmlserializer tool, Version 1.1.0. [Microsoft ® Windows ® Communication Foundation] Copyright © Microsoft Corporation. All rights reserved.

If you would like more help, type “svcutil -?” EXEC : warning : Cannot load file C:\Users\Admin.nuget\packages\system.private.servicemodel\4.7.0\runtimes\win\lib\netstandard2.0\System.Private.ServiceModel.dll as an Assembly. Check the FusionLogs for more Information. [C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj]

  Could not load file or assembly 'C:\Users\Admin\.nuget\packages\system.private.servicemodel\4.7.0\runtimes\win\lib\netstandard2.0\System.Private.ServiceModel.dll'. The system cannot find the path specified.

C:\Users\Admin.nuget\packages\dotnet-svcutil.xmlserializer\1.1.0\build\dotnet-svcutil.xmlserializer.targets(22,5): warning MSB3073: The command “dotnet svcutil.xmlserializer obj\Debug\netstandard2.0\SvcUtilXmlSerializePreGen.dll --quiet --out:obj\Debug\netstandard2.0\SvcUtilXmlSerializePreGen.XmlSerializers --smreference:“C:\Users\Admin.nuget\packages\system.servicemodel.primitives\4.7.0\ref\netstandard2.0\System.ServiceModel.Primitives.dll”” exited with code 3. [C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj] C:\Users\Admin.nuget\packages\dotnet-svcutil.xmlserializer\1.1.0\build\dotnet-svcutil.xmlserializer.targets(23,5): warning : Warning : Fail to generate the serializer for SvcUtilXmlSerializePreGen.dll. [C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj]

Build succeeded.

EXEC : warning : Fail to load the assembly C:\Users\Admin.nuget\packages\system.private.servicemodel\4.7.0\runtimes\win\lib\netstandard2.0\System.Private.ServiceModel.dll with the error Cannot load file C:\Users\Admin.nuget\packages\system.private.servicemodel\4.7.0\runtimes\win\lib\netstandard2.0\System.Private.ServiceModel.dll as an Assembly. Check the FusionLogs for more Information. [C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj] EXEC : warning : Cannot load file C:\Users\Admin.nuget\packages\system.private.servicemodel\4.7.0\runtimes\win\lib\netstandard2.0\System.Private.ServiceModel.dll as an Assembly. Check the FusionLogs for more Information. [C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj] C:\Users\Admin.nuget\packages\dotnet-svcutil.xmlserializer\1.1.0\build\dotnet-svcutil.xmlserializer.targets(22,5): warning MSB3073: The command “dotnet svcutil.xmlserializer obj\Debug\netstandard2.0\SvcUtilXmlSerializePreGen.dll --quiet --out:obj\Debug\netstandard2.0\SvcUtilXmlSerializePreGen.XmlSerializers --smreference:“C:\Users\Admin.nuget\packages\system.servicemodel.primitives\4.7.0\ref\netstandard2.0\System.ServiceModel.Primitives.dll”” exited with code 3. [C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj] C:\Users\Admin.nuget\packages\dotnet-svcutil.xmlserializer\1.1.0\build\dotnet-svcutil.xmlserializer.targets(23,5): warning : Warning : Fail to generate the serializer for SvcUtilXmlSerializePreGen.dll. [C:\Users\Admin\source\repos\SvcUtilXmlSerializePreGen\SvcUtilXmlSerializePreGen.csproj] 4 Warning(s) 0 Error(s)

Time Elapsed 00:00:02.22`

Additional context Repo: https://github.com/bobcat1506/SvcUtilXmlSerializePreGen

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
StephenBonikowskycommented, Mar 31, 2020

We got a good build and the package is going through some final validation steps and will then go to NuGet.

@dasetser will update and close this issue once it gets to NuGet.

1reaction
StephenBonikowskycommented, Mar 17, 2020

@pmiddleton We are proceeding with the final packaging changes, we can’t wait on #4154. Assuming no complications we are shooting for a release to NuGet next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using dotnet-svcutil.xmlserializer on .NET Core
Learn how you can use the `dotnet-svcutil.xmlserializer` NuGet package to pre-generate a serialization assembly for .NET Core projects.
Read more >
Installing dotnet-svcutil.xmlserializer (1.2.0) using nuget in ...
From the error information, it seems like the file specified by $(MicrosoftNETBuildTasksAssembly) in assemblyfile is not found. You can check if ...
Read more >
svcutil without /serializer:XmlSerializer fails with ...
If I change the command to `svcutil AddCustomer.wsdl /serializer:XmlSerializer` (or change Serializer in Reference.svcmap) the errors disappear and the code ...
Read more >
dotnet-svcutil.xmlserializer 1.2.0
Generate XML serializers for types used by Service Contracts in an assembly. Product, Versions Compatible and additional computed target ...
Read more >
WCF: Pregenerating xml serialization code for .NET Core ...
How to use SGen to generate a serialization assembly for a XML schema that is mapped to a two-level array? System.PlatformNotSupported Exception in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found