Skip to content

System.MissingMethodException when running dotnet build #164

Description

@txjmb

I am testing SharpGenTools for a project I am working on that is running in dotnet 3.1 on Linux, using the nuget packages.

When I run dotnet build, I get the following error. I received a similar error that was related to the Serialize method, then I ran dotnet add package System.Xml.XmlSerializer and now I get the same error for the Deserialize method. That method certainly exists in the System.Xml.XmlSerializer assembly, and it seems to get past the Serialize method without issue after adding that package. Any help would be appreciated. Error below:

/home/username/.nuget/packages/sharpgentools.sdk/1.2.1/build/SharpGenTools.Sdk.targets(200,5): error MSB4018: The "ParseCPlusPlus" task failed unexpectedly. [/home/username/source/test_sharpgen/test_sharpgen.csproj] /home/username/.nuget/packages/sharpgentools.sdk/1.2.1/build/SharpGenTools.Sdk.targets(200,5): error MSB4018: System.MissingMethodException: Method not found: 'System.Object System.Xml.Serialization.XmlSerializer.Deserialize(System.Xml.XmlReader)'. [/home/username/source/test_sharpgen/test_sharpgen.csproj] /home/username/.nuget/packages/sharpgentools.sdk/1.2.1/build/SharpGenTools.Sdk.targets(200,5): error MSB4018: at SharpGen.CppModel.CppModule.Read(Stream input) [/home/username/source/test_sharpgen/test_sharpgen.csproj] /home/username/.nuget/packages/sharpgentools.sdk/1.2.1/build/SharpGenTools.Sdk.targets(200,5): error MSB4018: at SharpGen.CppModel.CppModule.Read(String file) [/home/username/source/test_sharpgen/test_sharpgen.csproj] /home/username/.nuget/packages/sharpgentools.sdk/1.2.1/build/SharpGenTools.Sdk.targets(200,5): error MSB4018: at SharpGenTools.Sdk.Tasks.ParseCPlusPlus.Execute(ConfigFile config) [/home/username/source/test_sharpgen/test_sharpgen.csproj] /home/username/.nuget/packages/sharpgentools.sdk/1.2.1/build/SharpGenTools.Sdk.targets(200,5): error MSB4018: at SharpGenTools.Sdk.Tasks.SharpGenTaskBase.Execute() [/home/username/source/test_sharpgen/test_sharpgen.csproj]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions