Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet-svcutil.xmlserializer Assembly Load Error #4090

Closed
bobcat1506 opened this issue Dec 18, 2019 · 17 comments · Fixed by #4145
Closed

dotnet-svcutil.xmlserializer Assembly Load Error #4090

bobcat1506 opened this issue Dec 18, 2019 · 17 comments · Fixed by #4145
Assignees
Labels
tooling An issues related to any tool shipped from this repo.
Milestone

Comments

@bobcat1506
Copy link

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 (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) 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 (R) dotnet-svcutil.xmlserializer tool, Version 1.1.0.
[Microsoft (R) Windows (R) Communication Foundation]
Copyright (c) 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

@StephenBonikowsky
Copy link
Member

@bobcat1506 Thanks for reporting the issue, we will look into it.

@StephenBonikowsky StephenBonikowsky self-assigned this Jan 6, 2020
@StephenBonikowsky StephenBonikowsky added this to the Investigation milestone Jan 6, 2020
@bobcat1506
Copy link
Author

Any update on this? We have an app in production that is misbehaving and believe pre-generating the serialization assembly will resolve it.

@StephenBonikowsky
Copy link
Member

Working on a fix right now, then need to get it packaged and published, shouldn't be too long before we have a fixed version up on NuGet.

@StephenBonikowsky StephenBonikowsky added the Net Core 3.1 LTS Servicing Tasks planned for the WCF NET Core 3.1 Servicing releases. label Jan 28, 2020
@StephenBonikowsky StephenBonikowsky modified the milestones: Investigation, 3.1.3 Jan 28, 2020
@StephenBonikowsky StephenBonikowsky modified the milestones: 3.1.3, 3.1.x Feb 3, 2020
@StephenBonikowsky
Copy link
Member

Re-opening so we can use this issue to track package validation and publishing.

@StephenBonikowsky
Copy link
Member

StephenBonikowsky commented Feb 3, 2020

  • build test package out of master and validate package
  • cherry-pick fix from master to 3.1
  • update package versioning and build release package
  • final package validation
  • publish new package to NuGet and delist previous packages.

@StephenBonikowsky
Copy link
Member

@bobcat1506 Here is a private package of the tool which has the fix if you want to try it.
It will take a few days to produce a final release package and get it listed on NuGet.
dotnet-svcutil.xmlserializer.1.2.0-preview1.20104.1.zip

FYI, there is another issue to be aware of with this tool, see #4154

@bobcat1506
Copy link
Author

bobcat1506 commented Feb 7, 2020

Thanks @StephenBonikowsky. Both this issue and #4154 have impacted us significantly and frankly seem like pretty big misses from a regression testing perspective. Will there be regression tests in the future to prevent these types of issues in future framework updates? Any ETA on a fix for #4154?

@StephenBonikowsky StephenBonikowsky added tooling An issues related to any tool shipped from this repo. and removed Net Core 3.1 LTS Servicing Tasks planned for the WCF NET Core 3.1 Servicing releases. labels Mar 4, 2020
@pmiddleton
Copy link

@StephenBonikowsky - Any update on when the 1.2 package will hit nuget? Are you waiting on a fix for #4154 first?

@StephenBonikowsky
Copy link
Member

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

@bq1756
Copy link

bq1756 commented Mar 30, 2020

Any complications? Do you believe 1.2 will be released this week?

@StephenBonikowsky
Copy link
Member

We had a build failure, infrastructure related, working to get it resolved and then final package validation before publishing the package.

@pmiddleton
Copy link

image

@StephenBonikowsky
Copy link
Member

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.

@bobcat1506
Copy link
Author

Any ETA on when final validation will be complete?

@StephenBonikowsky
Copy link
Member

@dasetser @HongGit Is there an update on the package moving to NuGet?

@dasetser
Copy link
Contributor

dasetser commented Apr 8, 2020

This was pushed to NuGet earlier today. You can find the new package at https://www.nuget.org/packages/dotnet-svcutil.xmlserializer/1.2.0

@dasetser dasetser closed this as completed Apr 8, 2020
@bobcat1506
Copy link
Author

I've updated the package reference and tried building it on Ubuntu targeting netcoreapp2.1, netcoreapp3.0 and netcoreapp3.1 and every time I get the same error:

Build succeeded.

/home/administrator/.nuget/packages/dotnet-svcutil.xmlserializer/1.2.0/build/dotnet-svcutil.xmlserializer.targets(35,5): warning MSB3073: The command "dotnet svcutil.xmlserializer obj/Debug/netcoreapp3.1/SvcUtilXmlSerializePreGen.dll --quiet --out:obj/Debug/netcoreapp3.1/SvcUtilXmlSerializePreGen.XmlSerializers --smreference:"/home/administrator/.nuget/packages/dotnet-svcutil.xmlserializer/1.2.0/lib/netcoreapp2.1/dotnet-svcutil.xmlserializer.dll;/home/administrator/.nuget/packages/system.private.servicemodel/4.7.0/lib/netstandard2.0/System.Private.ServiceModel.dll;/home/administrator/.nuget/packages/system.reflection.dispatchproxy/4.5.0/lib/netcoreapp2.0/System.Reflection.DispatchProxy.dll;/home/administrator/.nuget/packages/system.security.accesscontrol/4.5.0/lib/netstandard2.0/System.Security.AccessControl.dll;/home/administrator/.nuget/packages/system.security.cryptography.cng/4.5.0/lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll;/home/administrator/.nuget/packages/system.security.cryptography.pkcs/4.5.0/lib/netcoreapp2.1/System.Security.Cryptography.Pkcs.dll;/home/administrator/.nuget/packages/system.security.cryptography.xml/4.5.0/lib/netstandard2.0/System.Security.Cryptography.Xml.dll;/home/administrator/.nuget/packages/system.security.permissions/4.5.0/lib/netstandard2.0/System.Security.Permissions.dll;/home/administrator/.nuget/packages/system.security.principal.windows/4.5.0/lib/netstandard2.0/System.Security.Principal.Windows.dll;/home/administrator/.nuget/packages/system.servicemodel.duplex/4.7.0/lib/netstandard2.0/System.ServiceModel.Duplex.dll;/home/administrator/.nuget/packages/system.servicemodel.http/4.7.0/lib/netstandard2.0/System.ServiceModel.Http.dll;/home/administrator/.nuget/packages/system.servicemodel.nettcp/4.7.0/lib/netstandard2.0/System.ServiceModel.NetTcp.dll;/home/administrator/.nuget/packages/system.servicemodel.primitives/4.7.0/lib/netcoreapp2.1/System.ServiceModel.Primitives.dll;/home/administrator/.nuget/packages/system.servicemodel.primitives/4.7.0/lib/netcoreapp2.1/System.ServiceModel.dll;/home/administrator/.nuget/packages/system.servicemodel.security/4.7.0/lib/netstandard2.0/System.ServiceModel.Security.dll"" exited with code 1. [/home/administrator/repos/github/SvcUtilXmlSerializePreGen/SvcUtilXmlSerializePreGen.csproj]
/home/administrator/.nuget/packages/dotnet-svcutil.xmlserializer/1.2.0/build/dotnet-svcutil.xmlserializer.targets(36,5): warning : Warning : Fail to generate the serializer for SvcUtilXmlSerializePreGen.dll. [/home/administrator/repos/github/SvcUtilXmlSerializePreGen/SvcUtilXmlSerializePreGen.csproj]
2 Warning(s)
0 Error(s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling An issues related to any tool shipped from this repo.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants