How to force Visual Studio to re-create the SSL certificate for a .NET Core Web Application running Kestrel?

I finally figured it out. For anyone else who runs into this, the steps to fix it are: All localhost certificates must be deleted in certificate manager. They can be found in Personal and Trusted Root The secrets.json file must be deleted. This can be found in \Users\[user]\AppData\Roaming\Microsoft\UserSecrets\ In powershell, re-run dotnet dev-certs https –trust … Read more

How can I remove the platforms I do not need to compile for in .net MAUI?

Required Change In your .csproj file, remove the targets for the platforms you aren’t building for, reducing it to the following: <TargetFrameworks>net6.0-maccatalyst</TargetFrameworks> <TargetFrameworks Condition=”$([MSBuild]::IsOSPlatform(‘windows’))”>$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks> Optional Changes In your .csproj file, remove the supported version information for the platforms you aren’t building for, reducing it to the following: <SupportedOSPlatformVersion Condition=”$([MSBuild]::GetTargetPlatformIdentifier(‘$(TargetFramework)’)) == ‘maccatalyst'”>14.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition=”$([MSBuild]::GetTargetPlatformIdentifier(‘$(TargetFramework)’)) == ‘windows'”>10.0.17763.0</SupportedOSPlatformVersion> … Read more

How to #include header files from other projects from the same solution

Settings for compiler In the project where you want to #include the header file from another project, you will need to add the path of the header file into the Additional Include Directories section in the project configuration. To access the project configuration: Right-click on the project, and select Properties. Select Configuration Properties -> C/C++ … Read more

Change NuGet package folders used by Visual Studio

UPD 2024: standalone nuget commands replaced with dotnet nuget CLI. The information provided is relevant for VS2022 and .NET 8. Cache locations Solution-local packages folders are no longer used by .NET Core and Visual Studio. The command to list user-specific folders is: dotnet nuget locals all –list And its typical output (I’ve replaced absolute paths … Read more

VS2017 Could not load file or assembly Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll or one of its dependencies

I had a similar issue (with the additional message The “BuildShadowTask” task failed unexpectedly) with a project originally developed with VS2010, and got to spend the last few hours learning about yet another legacy facet of the build process. There is a good chance that you are dealing with private accessor files (.accessor), which were … Read more

Disabling highlighting of current line in Visual Studio

Is there a simple way to disable this highlighting? Tools -> Options -> Text Editor, in the Display group, uncheck “Highlight current line” Which parameter in Fonts and Colors dialog controls the background color of the currently selected line in the editor? The colors are named “Highlight Current Line (Active)” and “Highlight Current Line (Inactive)”

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)