GithubHelp home page GithubHelp logo

Comments (9)

ChrisTorng avatar ChrisTorng commented on August 20, 2024 1

I'm planning to migrate the next year. Thanks for help, I'll close this issue.

from buildinformation.

linkdotnet avatar linkdotnet commented on August 20, 2024

Hey - yes adding Microsoft.Net.Compilers.Toolset might solve the issue but is not the best choice either. Especially because you are not depending on it at all.

Is VS 2022 up to date on the other machines? I changed the referenced package and will push a new version (0.4.2) soon - let me know if that helps.

from buildinformation.

ChrisTorng avatar ChrisTorng commented on August 20, 2024

I updated to 0.4.2, removed Microsoft.Net.Compilers.Toolset. The same problem reappear. But the referenced version changed from 4.6.0.0 to 4.7.0.0. (Currently is still 4.4.0.0).
I can ask others to upgrade their VS version, but the same problem happens in my CI environment. It's hard for me to upgrade the CI environment version.
I had other analyzers with source generator worked well. Like System.Text.Json.
We have .NET Core 7.0/.NET Framework 4.8.0 projects. Other people has issues on both projects. But only .NET Framework project has issue in CI. The CI uses msbuild on .NET Framework project, which is different from other .NET Core projects use dotnet build.

from buildinformation.

linkdotnet avatar linkdotnet commented on August 20, 2024

The only change I did recently was to upgrade said package from 4.6.0 to 4.7.0.
In theory that shouldn't have any impact due to the fact, that also 4.7.0 supports netstandard2.0 and net4.7 (see NuGet).

I guess you had no issues with the generator in version 0.4 - so as a quick fix, I could revert the package version to 4.6.0.

Alternatively, there is a thread on StackOverflow discussing exactly that issue - it might be worth trying this out.

from buildinformation.

ChrisTorng avatar ChrisTorng commented on August 20, 2024

I ask others to upgrage VS 2022 to latest version (not preview), all problems solved.
For the .NET Framework project on CI, I tried reference Microsoft.CodeAnalysis.CSharp or Microsoft.CodeAnalysis 4.7.0 directly, but failed.
Currently I need to reference Microsoft.Net.Compilers.Toolset only for CI using MSBuild for .NET Framework project.

from buildinformation.

linkdotnet avatar linkdotnet commented on August 20, 2024

Interesting - do you see this issue with any source generator?
If so, I would be very interested if they updated the package in question recently. I also assume that your CI has a different msbuild version than your local dev environment, leading to the problem.

from buildinformation.

ChrisTorng avatar ChrisTorng commented on August 20, 2024

The CI environment isn't maintained by me. While upgrading from .NET 6.0 to 7.0, we can't build the .NET Framework project. At last found that MSBuild can solve the problem. Now the build way of .NET Framework project is different from other .NET Core projects, we won't try other ways to solve problems. Currently I can accept the workaround of reference Microsoft.Net.Compilers.Toolset. If you wish to try other fixes from your project, I can still help. If not, it's ok to close this issue. Thanks for your kindly help.

from buildinformation.

linkdotnet avatar linkdotnet commented on August 20, 2024

The only way to solve that for net4.8 would be to roll back to an old version of the package.
But from the given message above, it seems I would have to roll back even to an older version (4.4.0).
If it is no major inconvenience, I would keep it as it is. I am pretty certain that the current msbuild version should not lead to the issue.
Are there any plans for you to migrate to a newer .NET version in the near/middle future?

from buildinformation.

linkdotnet avatar linkdotnet commented on August 20, 2024

Thanks - let me know if I can help you somewhere else. Cheers

from buildinformation.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.