Questions tagged [dotnet-sdk]
81 questions
41
votes
6 answers
.NET SDK's Not Installing Correctly
I am getting an issue with installing the .NET SDK, at first when I went into visual studio 2019 it said that I was missing the dotnet runtime sdk so I installed it like it asked and restarted my computer. I then went on to visual studio 2019 again,…
user12624402
18
votes
1 answer
Windows or Visual Studio 2022 can't find the latest installed .NET SDK due to bitness
I've successfully installed the latest .NET SDK, but Windows doesn't recognize it. This is manifested by one of the following failures:
dotnet --list-sdks doesn't include the latest .NET SDK.
Windows x64 can't find .NET 5, .NET 6, or .NET…

RickAndMSFT
- 20,912
- 8
- 60
- 78
16
votes
3 answers
Could not load file or assembly Newtonsoft.Json when running app from the dotnet publish output folder
I am finding a problem with Newtonsoft.Json library throwing a
System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. The system cannot find the file…

diegosasw
- 13,734
- 16
- 95
- 159
11
votes
2 answers
Found .NET SDK, but did not find dotnet.dll
I recently installed Visual Studio 2022 preview.
Today I was in a workshop and there was some feature that didn't work, and it turned out it was because I had the preview version of .NET 6 installed.
So I then uninstalled Visual Studio 2022…

Svein Terje Gaup
- 1,424
- 15
- 29
11
votes
3 answers
Is there a possibility to suppress warnings of sonarcloud in source code?
I am facing an issue with some sonarcloud warnings that will not be fixed in the nearest future (and should be disabled for now).
The warnings are raised by sonarcloud during build on CI. There are no any local analysers.
Is there a way to suppress…

zds
- 914
- 1
- 10
- 22
8
votes
0 answers
How to add additional SDK versions to .NET Docker image
I use Docker to build my .NET apps, using a base image provided by Microsoft (mcr.microsoft.com/dotnet/core/sdk:3.1).
In addition to .NET Core SDK 3.1, I also need .NET Core SDK 2.2 inside the same container.
How can I extend the base image and…

Steven Liekens
- 13,266
- 8
- 59
- 85
8
votes
1 answer
Msbuild v15 can't resolve the variables of metadata of nuspec file
I know Since the release of msbuild 15 (vs 2017) that NuGet is now fully integrated into MSBuild.
I have a nuspec file with defining variables of package properties like:
$id$
$version$
…

M.Hassan
- 10,282
- 5
- 65
- 84
6
votes
5 answers
CS8032 warning with Microsoft.CodeAnalysis out of no where
I've had a solution with a large number of projects in that has built fine since we switched to .NET6 then suddenly I am getting for every project this warning in Visual studio, however it does not appear on the MSBuild output and analyzers are set…

BlueBSH
- 291
- 3
- 9
6
votes
2 answers
Simplest way to build dotnet SDK project requiring net461 on MacOS
I have a dotnet SDK .sln (and a build.proj) with netcoreapp2.1;net461 . It builds on Windows using Visual Studio and dotnet build, but I'd also like it to build as many other places as possible. What do I need to…

Ruben Bartelink
- 59,778
- 26
- 187
- 249
5
votes
3 answers
CS1617: Invalid option '10' for /langversion
While building this open source C# project in AppVeyor, I get the error:
CSC : error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values.
See the build log.
In build settings, Visual Studio 2022 is selected…

Sergey Slepov
- 1,861
- 13
- 33
5
votes
1 answer
How to convert MVC5 project to SDK style
I have an MVC 5 web project (referencing Microsoft.AspNet.Mvc (5.2.8) and Microsoft.AspNet.WebApi.WebHost (5.2.8)) and I would like to convert the project file to SDK style.
I know this is not officially supported but I have heard that it can be…

Ami
- 65
- 7
5
votes
2 answers
Create LogicApp and API Connections ARM Template using DotNet SDK
I have created Azure Logic App using Dot.Net SDK. Logic App created successfully but for Trigger and Action i want to use existing Connector. I have manually created connector to Azur Portal. I am passing that Connector's APIConnection or Id to…

HiteshKumar Vaghasiya
- 59
- 1
- 6
4
votes
1 answer
Resource exceptions in forms after converting project to NETSDK format
I am in a slow process of moving to .NET5 but one of the steps before that was converting all our WinForms projects to NET-SDK Project format.
This conversion has been completed, everything appears to work ok but there are some problems that I am…

BlueBSH
- 291
- 3
- 9
4
votes
0 answers
Microsoft.NET.Sdk.Publish doesn't copy files to publish directory
I'm trying to publish a the new SDK-style .net core console application project, and facing a problem with publishing a project that uses "Microsoft.NET.Sdk"(please, pay attention, it's not Microsoft.NET.Sdk.Web, which works just fine).
What've I…

Smooyk
- 389
- 4
- 20
4
votes
1 answer
InvalidProjectFileException: "The SDK 'Microsoft.NET.Sdk.Web' not found" from Microsoft.Build.Evaluation.Project after upgrading to VS2019
We have a tool that loads a csproj file with Microsoft.Build.Evaluation.Project. It's been working fine for about a year, until we tried running it on a machine with VS2019 installed (and no copy of VS2017). Interestingly enough, it does build just…

Martin Chisholm
- 461
- 2
- 6