-
Notifications
You must be signed in to change notification settings - Fork 56
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
System.MissingMethodException when running dotnet build #164
Comments
We were seeing this error in Avalonia too. Pinning the .NET SDK to 3.1.101 in
|
I'll give it a try. Thank you. |
I didn't want to downgrade the SDK version, so I worked around it by using a custom-built package which targets netstandard2.0. I'm not sure if I should open a PR with similar changes, as this probably drops support for very old SDK versions. @jkoritzinsky please tell me if you'd like me to make a smaller/cleaner change that would just retarget the MSBuild tasks to netstandard2.0. |
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]
The text was updated successfully, but these errors were encountered: