Share via

Nuget code modified after pack

reuvygroovy 781 Reputation points
2023-08-21T05:17:39.5666667+00:00

We are trying to create a Nuget package using this article:
https://learn.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio-net-framework

We noticed that when opening up the destination DLL/Assembly, after running "nuget pack", the code changes

Source Code:

string[] stringSeparators = new string[] { "\n" };             lines = Message.Split(stringSeparators, StringSplitOptions.None);             foreach (string line in lines)             {             


This is the decompiled assembly:

    string[] strArrays = Message.Split(new string[] { "\n" }, StringSplitOptions.None);
            for (int i = 0; i < (int)strArrays.Length; i++)
            {

We are using Telerik JustDecompile. Is the code really changing, or is the decompiler not reading it properly?

Community Center | Not monitored

Your answer

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