Skip to content
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

Error CS8103 after upgrading the Sdk from 4.18.0 to 5.x.x #2163

Open
victorolawale opened this issue Oct 14, 2023 · 5 comments
Open

Error CS8103 after upgrading the Sdk from 4.18.0 to 5.x.x #2163

victorolawale opened this issue Oct 14, 2023 · 5 comments

Comments

@victorolawale
Copy link

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.

image

I wanted to be sure of the problem so I downgraded to version 4.54.0 and the project was able to build.
image

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.

@victorolawale victorolawale changed the title Error CS8103 after upgrading from 4.18.0 to 5.x.x Error CS8103 after upgrading the Sdk from 4.18.0 to 5.x.x Oct 14, 2023
@andrueastman andrueastman self-assigned this Oct 17, 2023
@bgreen77

This comment was marked as outdated.

@bgreen77
Copy link

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 library usable from Orleans.

@ilanhu
Copy link

ilanhu commented Feb 11, 2024

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?

@victorolawale
Copy link
Author

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.

@evanweissms
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants