msgraph-sdk-dotnet
msgraph-sdk-dotnet copied to clipboard
Error CS8103 after upgrading the Sdk from 4.18.0 to 5.x.x
I recently upgraded from 4.18.0 to any of the versions 5.x.x. I have been getting Error CS8103 while building my project.
I wanted to be sure of the problem so I downgraded to version 4.54.0 and the project was able to build.
I have also read the guide on upgrading to v5. There seems to be nothing that points to this compile time error.
In addition, I have also tried to search online on a work around that is relevant to my use case, nothing seems to solve the issue. However, I am very sure the problem was from the v5.x.x of the Microsoft.Graph Sdk.
Error CS8103: Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string literals.
Please help as I am currently blocked.
Yes. Having the same problem here as well.
Using Microsoft.Graph in an internal library that is used in an Orleans Grain (targeting netstandard2.0 and net7.0) to create users in Azure B2C.
Today, I upgraded this to the latest version (Microsoft.Graph version 5.36.0) and started seeing the same error above:
CS8103 - Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string literals.
Only removing this reference (even if it's transitive) from the project containing the grains does this error resolve.
Actually.....
I did some testing, and managed to determine that:
- This issue occurs with Microsoft.Graph version 5.36.0
- This issue does not occur with Microsoft.Graph versions 4.54.0
So I, too, have rolled back. But it'd be nice to see the latest version of the the library usable from Orleans.
Yes. Having the same problem here as well.
Using Microsoft.Graph in an internal library that is used in an Orleans Grain (targeting netstandard2.0
and net7.0
) to create users in Azure B2C.
Today, I upgraded this to the latest version (Microsoft.Graph
version 5.36.0
) and started seeing the same error above:
CS8103 - Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string literals.
Only removing this reference (even if it's transitive) from the project containing the grains does this error resolve.
Actually.....
I did some testing, and managed to determine that:
- This issue occurs with
Microsoft.Graph
version5.36.0
- This issue does not occur with
Microsoft.Graph
versions4.54.0
So I, too, have rolled back. But it'd be nice to see the latest version of the library usable from Orleans.
Same here.
Getting the same error
error CS8103: Combined length of user strings used by the program exceeds allowed limit. Try to decrease use of string literals.
while using <PackageReference Update="Microsoft.Graph" Version="5.41.0" />
Is there a plan fix for this issue?
I think this issue only happens on any project targeting below .NET7.0.
I upgraded the project to NET8.0 and also have the SDK upgraded. It works and resolves the issue.
Hi @andrueastman is there any update on this? We're also blocked on this issue and are unable to upgrade to NET8.0 as a potential mitigation