I want to my azure function from v1 to v4 my current dotnet framework is 4.8 need suggestion which version should I go 4.8 or 8 or 9

Rashmiramchandra Prabhu 66 Reputation points
2025-04-22T05:27:28.7333333+00:00

I want to my azure function from v1 to v4 my current dotnet framework is 4.8 need suggestion which version should I go 4.8 or 8 or 9.

I am try to migrate to 4.8 with v4 but as per microsoft guide it mentioed to add output type as exe and mine was class library getting multiple error.

Any upgrade assistant for 4.8 with v4

I find upgrade assistant for .net 8

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,781 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rashmiramchandra Prabhu 66 Reputation points
    2025-05-16T11:28:56.12+00:00

    Inner Exception 1:Getting error in Trnsform.Load in transforming xml in given xslt format

    PlatformNotSupportedException: Compiling JScript/CSharp scripts is not supported.

    Can you help which method can be used instead of private static string TransformXml(string inputXml, string xslt)

    {

    var outputDocument = new XDocument();
    
    var inputDocument = XDocument.Parse(inputXml);
    
    using (var stringReader = new StringReader(xslt))
    
    {
    
        using (XmlReader xsltReader = XmlReader.Create(stringReader))
    
        {
    
            var transformer = new XslCompiledTransform();
    
            transformer.Load(xsltReader, XsltSettings.TrustedXslt, default);
    
            using (XmlReader inputDocumentReader = inputDocument.CreateReader())
    
            {
    
                using (XmlWriter outputDocumentWriter = outputDocument.CreateWriter())
    
                {
    
                    transformer.Transform(inputDocumentReader, outputDocumentWriter);
    
                }
    
            }
    
        }
    
    }
    
    string result = outputDocument.ToString();
    
    return result;
    

    }

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.