Giter VIP home page Giter VIP logo

Comments (5)

npagare avatar npagare commented on May 18, 2024

Same error with today's commit : be2a547 - Bump NSubstitute from 4.2.1 to 4.2.2 in /converter/dicom-cast (#624)

Is this to do with c# version ?

from dicom-server.

wsugarman avatar wsugarman commented on May 18, 2024

I was able to mostly root cause the issue.

The problem lies in the difference between the .NET SDK in the global.json (5.0103) and the .NET SDK used by the latest Visual Studio (5.0.201). I can build the solution without issue from the command line using dotnet build, as can our pipelines. That is because they are using a version of the .NET SDK from the global.json file. However, once I tried updating the SDK, I immediately saw the same errors we both see in Visual Studio. It must mean that the Intellisense is using a newer version of the .NET SDK.

Specifically, it appears the analyzer has gotten cleverer at detecting CA1802 around interpolated strings.

So to fix this issue, I'll put out a PR to fix the VS warnings, and I'll attempt to pin the analyzer warnings to version 5 of the SDK. However, given that VS may use the latest version of the SDK for intellisense, it may not prevent future tooling breaks. I'll investigate what can be done about the intellisense. I can't imagine we're alone in this.

from dicom-server.

npagare avatar npagare commented on May 18, 2024

Hi @wsugarman , I am not sure if that's going to resolve the issue for good.
I was getting the same error even after installing the .Net SDK 5.0.103 to match entry in the global.json.
Is there a setting that needs to set up to route the sdk for build based on certain configuration in the solution / project to override VS settings ?

from dicom-server.

wsugarman avatar wsugarman commented on May 18, 2024

The problem isn't because of your .NET SDK version; it is because the one used by Visual Studio for its static code analyzers in the latest version (presumably starting at v16.9). I am bumping the version of the SDK we use to the latest Visual Studio one, but this behavior seems incorrect. I will follow up with the Visual Studio team to see if it's intended that their analyzers use their own .NET SDK version instead of the one specified in the global.json.

Does the issue go away if you try to build from the command line the top-level directory? This should use 5.0.103 and can be confirmed with dotnet --version in the directory:

pushd <dicom-server repository>
dotnet --version
dotnet build Microsoft.Health.Dicom.sln

from dicom-server.

wsugarman avatar wsugarman commented on May 18, 2024

I have opened up a separate issue with Visual Studio here.

from dicom-server.

Related Issues (20)

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.