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

Update dotnet-svcutil.xmlserializer to Support .NET 9 #5734

Open
Vylrath opened this issue Jan 29, 2025 · 0 comments
Open

Update dotnet-svcutil.xmlserializer to Support .NET 9 #5734

Vylrath opened this issue Jan 29, 2025 · 0 comments
Assignees
Labels
tooling An issues related to any tool shipped from this repo.

Comments

@Vylrath
Copy link

Vylrath commented Jan 29, 2025

(This is my first ever public issue, so please be gentle.)

I was trying to run a .NET 9 project that used dotnet-svcutil.xmlserializer version 8.0.0-preview1.24067.4 and getting some errors due to .NET version mismatch:

1>Microsoft (R) dotnet-svcutil.xmlserializer tool, Version 8.0.0-preview1.24067.4.
1>[Microsoft (R) Windows (R) Communication Foundation]
1>Copyright (c) Microsoft Corporation.  All rights reserved.
1>
1>Generating XML serializers...
1>EXEC : warning : There were errors loading types in an assembly loaded from 'C:\Users\Brian\source\repos\ConsoleApp1\ConsoleApp1\obj\Debug\net9.0\ConsoleApp1.dll' some types in the assembly could not be loaded and will not be available to the tool.
1>
1>  Could not load file or assembly 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
1>EXEC : warning : An error occurred in the tool.
1>
1>EXEC : warning : Could not load file or assembly 'System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
1>
1>C:\Users\Brian\.nuget\packages\dotnet-svcutil.xmlserializer\8.0.0-preview1.24067.4\build\dotnet-svcutil.xmlserializer.targets(63,5): warning MSB3073: The command "dotnet C:\Users\Brian\.nuget\packages\dotnet-svcutil.xmlserializer\8.0.0-preview1.24067.4\build\..\lib\net8.0\dotnet-svcutil.xmlserializer.dll obj\Debug\net9.0\ConsoleApp1.dll --quiet --out:obj\Debug\net9.0\ConsoleApp1.XmlSerializers --smreference:"C:\Users\Brian\.nuget\packages\dotnet-svcutil.xmlserializer\8.0.0-preview1.24067.4\lib\net8.0\dotnet-svcutil.xmlserializer.dll;C:\Users\Brian\.nuget\packages\microsoft.extensions.objectpool\8.0.10\lib\net8.0\Microsoft.Extensions.ObjectPool.dll;C:\Users\Brian\.nuget\packages\system.security.cryptography.pkcs\8.0.1\lib\net8.0\System.Security.Cryptography.Pkcs.dll;C:\Users\Brian\.nuget\packages\system.security.cryptography.xml\8.0.2\lib\net8.0\System.Security.Cryptography.Xml.dll;C:\Users\Brian\.nuget\packages\system.servicemodel.http\8.1.1\lib\net8.0\System.ServiceModel.Http.dll;C:\Users\Brian\.nuget\packages\system.servicemodel.primitives\8.1.1\lib\net8.0\System.ServiceModel.Duplex.dll;C:\Users\Brian\.nuget\packages\system.servicemodel.primitives\8.1.1\lib\net8.0\System.ServiceModel.Primitives.dll;C:\Users\Brian\.nuget\packages\system.servicemodel.primitives\8.1.1\lib\net8.0\System.ServiceModel.Security.dll;C:\Users\Brian\.nuget\packages\system.servicemodel.primitives\8.1.1\lib\net8.0\System.ServiceModel.dll"" exited with code 9.
1>C:\Users\Brian\.nuget\packages\dotnet-svcutil.xmlserializer\8.0.0-preview1.24067.4\build\dotnet-svcutil.xmlserializer.targets(64,5): warning : Warning : Failed to generate the serializer for ConsoleApp1.dll.

I downloaded the source for WCF and was able to change the references in the .csproj and related files to .NET 9 (I had to update the .dotnet folder as well to use the appropriate version), and I got it to successfully compile, test, and package. I tested the package in a .NET 9 console app that consumed a WCF service and was able to use the new package to successfully generate the DLL:

1>Microsoft (R) dotnet-svcutil.xmlserializer tool, Version 9.0.1-dev.25078.1.
1>[Microsoft (R) Windows (R) Communication Foundation]
1>Copyright (c) Microsoft Corporation.  All rights reserved.
1>
1>Generating XML serializers...
1>C:\Users\Brian\source\repos\ConsoleApp1\ConsoleApp1\obj\Debug\net9.0\ConsoleApp1.XmlSerializers.cs

The documentation states that any new features need to start with creating an issue. How can I submit a PR to get a new package created for .NET 9?

Image

@HongGit HongGit added the tooling An issues related to any tool shipped from this repo. label Jan 30, 2025
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

No branches or pull requests

3 participants