Using PolySharap with Visual Studio Build Tools 2022
See original GitHub issueIs it possible to build PolySharp-enabled project using only Visual Studio Build Tools?. I’m on 17.5.4, yet it complains:
packages\PolySharp.1.13.1\build\PolySharp.targets(45,5): Error : The PolySharp source generators have been disabled on the current configuration, as they need Roslyn 4.3 in order to work. PolySharp requires the source generators to run in order to process shaders, so the library cannot be used without a more up to date IDE (eg. VS 2022 17.3 or greater) or .NET SDK version (.NET 6.0.400 SDK or greater).
I suspect it won’t work without full IDE? Using Visual Studio Installer, I cannot find component “C# and Visual Basic Roslyn compilers” (Microsoft.VisualStudio.Component.Roslyn.LanguageServices). Can .NET6/7 somehow be used for language services when targeting .NET Framework? Or is it just for targeting older .NET Core versions? I have installed .NET6/7 on the host too, but the error is still there.
Perhaps if Build Tools are not supported, should be documented as it would help to decide to use PolySharp or no. it happens that my devops agent uses build tools and not the full IDE.
Issue Analytics
- State:
- Created 5 months ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Visual Studio Build Tools workload and component IDs
Use Visual Studio workload and component IDs to build classic Windows-based applications.
Read more >Install Build Tools into a container - Visual Studio
You can install Visual Studio Build Tools into a Windows container to support continuous integration and continuous delivery (CI/CD) workflows.
Read more >Download Visual Studio Tools - Install Free for Windows, Mac ...
Build Tools for Visual Studio 2022. These Build Tools allow you to build Visual Studio projects from a command-line interface. Supported ...
Read more >Visual Studio 2022 IDE - Programming Tool for Software ...
With Visual Studio design, code with autocompletions, build, debug, test all-in-one place along with Git management and cloud deployments.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The required MSBuild and Roslyn compiler versions are part of the .NET SDK. As long as you have the current (7.0) SDK version, you can build from command line.
The latest SDK is only supported in the latest Visual Studio version, as listed on the download page, but to be clear, VS is not required at all to use PolySharp.
And yes, it works fine for building .NET Framework projects with the latest .NET SDK. That’s the whole point 😃
That could be it. I did have .NET 6 and 7 installed. But turns out, project wasn’t using PackageReferences. But I could still build this project with full IDE and “C# and Visual Basic Roslyn compilers” (Microsoft.VisualStudio.Component.Roslyn.LanguageServices enabled (via Visual Studio Installer).
But I cannot test now the case as I moved on by installing full IDE on build server.