You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with native AOT compilation (publish):
I'm trying to download an item from the workshop, but I'm getting an error here:
public async Task<PublishedFileDetails> GetPublishedFileDetails(uint appId, PublishedFileID pubFile)
{
//ProtoBuf.Meta.RuntimeTypeModel.Default.AutoCompile = false;
//ProtoBuf.Meta.RuntimeTypeModel.Default.CompileInPlace();
var pubFileRequest = new CPublishedFile_GetDetails_Request
{
appid = appId
};
pubFileRequest.publishedfileids.Add(pubFile);
var callback = await steamPublishedFile.GetDetails(pubFileRequest);
if (callback.Result == EResult.OK)
{
var response = callback.Body;
return response.publishedfiledetails.FirstOrDefault();
}
throw new Exception($"EResult {(int)callback.Result} ({callback.Result}) while retrieving file details for pubfile {pubFile}.");
}
Error: 'ProtoBuf.Serializers.RepeatedSerializer.CreateList[System.UInt64]()' is missing native code. MethodInfo.MakeGenericMethod() is not compatible with AOT compilation. Inspect and fix AOT related warnings that were generated when the app was published. For more information see https://aka.ms/nativeaot-compatibility
How would you like it to be solved?
I would like this to work with AOT compilation. I think the problem is with protobuf-net
Have you considered any alternative solutions
maybe switching to Google.protobuf will solve this problem. I tried to do it myself, but it's too difficult for me =(
That didn't help either:
ProtoBuf.Meta.RuntimeTypeModel.Default.AutoCompile = false;
ProtoBuf.Meta.RuntimeTypeModel.Default.CompileInPlace();
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Another option I was looking into is to hand-deserialise the protos that SK2 cares about internally, but that still makes it harder for consumers like DD to also go AOT.
What problem is this feature trying to solve?
with native AOT compilation (publish):
I'm trying to download an item from the workshop, but I'm getting an error here:
Error:
'ProtoBuf.Serializers.RepeatedSerializer.CreateList[System.UInt64]()' is missing native code. MethodInfo.MakeGenericMethod() is not compatible with AOT compilation. Inspect and fix AOT related warnings that were generated when the app was published. For more information see https://aka.ms/nativeaot-compatibility
How would you like it to be solved?
I would like this to work with AOT compilation. I think the problem is with protobuf-net
Have you considered any alternative solutions
maybe switching to Google.protobuf will solve this problem. I tried to do it myself, but it's too difficult for me =(
That didn't help either:
ProtoBuf.Meta.RuntimeTypeModel.Default.AutoCompile = false;
ProtoBuf.Meta.RuntimeTypeModel.Default.CompileInPlace();
Additional Information
No response
The text was updated successfully, but these errors were encountered: