Missing WPP Tracing Configuration option in VS2022 - visual-studio-2022

I'm running Windows 11 22H2
https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
I've installed
VS2022 Community version
Windows SDK (22H2)
WDK (22H2)
I created a new project using the CPP KMDF template. Building this throws an error drive.tmh isn't found. Looking this up I have to enable WPP Tracing in the project properties, but there isn't a WPP Tracing node available

Related

Correct .NET Core SDK to build netstandard20 library

I have a few libraries with target framework netstandard20. These libraries are consumed by a few .net framework 4.6.1 libraries.
The IT department uninstalled the .NET Core 2.0 from the build server because of some security vulnerability. All the libraries that use netstandard20 are now failing with the following error:
C:\bamboo6104...>nuget restore
MSBuild auto-detection: using msbuild version '16.11.2.50704' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\bin'.
C:\bamboo6104\xml-data\build-dir\BAM-CUS-JOB1...\netstandard\xxx.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
The Build Server already has Visual Studio 2019. What version of SDK need to be installed for the build to pass? I have the following SDKs on my laptop:
Will installing 2.1.526 version resolve the build issue?
I can't upgrade the libraries to .NET 5 or 6 due to we have numerous libraries with the same problem and upgrade is not a priority.

How to build application targetting .Net 4/4.5 on CentOs

I have a lot of legacy code that builds fine on Windows with .Net 4.5
I am trying to build the same on CentOS with dotnet-sdk for automation and licensing issues.
Following the Microsoft link after installing the required packages, this command fails
$ dotnet msbuild sharpTest.sln
/usr/share/dotnet/sdk/5.0.301/Microsoft.Common.CurrentVersion.targets(1216,5): error MSB3644: The reference
assemblies for .NETFramework,Version=v4.0 were not found. To resolve this, install the Developer Pack
(SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework
Developer Packs at https://aka.ms/msbuild/developerpacks
Since I installed dotnet-sdk-5, it seems the solution fails to build. But I could not locate .Net framework 4 for CentOS
How do I resolve this ?
It's referencing .NETFramework. .NETFramework V4.0 is not xplat and therefore not available on anything else than windows. You should try to re-target your solution to net5.0 and make it independent of Windows specific dependencies.
To re-target to net5.0 try the dotnet upgrade-assistant (it's a dotnet tool). Do this on a windows machine first. To address any windows dependencies that won't work outside windows or .NetFramework see the Overview of porting from .NET Framework to .NET

MsBuild failing for .Net Standard project with error "Package System.Security.Cryptography.ProtectedData, version x.x.x was not found"

Project Setup : Mixed framework solution
.Net Framework 4.6.2 projects in solution : 15
.Net Standard 2.0 projects in solution - 1
Development Machine
Visual Studio 2017(15.7.4) : Builds without any errors
Build Server
TeamCity Version 2017.1.3
Build Steps
Nuget Restore(3.4.4)
dotnet Restore
MSBuild( Build Tools 2017), Tools Version 15.0
Build fails with following error in the .net standard 2.0 project : [ResolvePackageAssets] C:\Program Files\dotnet\sdk\2.1.301\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198, 5): Package System.Security.Cryptography.ProtectedData, version 4.4.0 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
What's interesting is I can't find reference or use of System.Security.Cryptography.ProtectedData anywhere in the project. Any help is greatly appreciated.
P.S - Can't use dotnet build, as the solution needs building of licenses.licx files, and the component which builds it (Microsoft.Build.Tasks.LC) is not ported to .Net Core. The suggestion from various posts was to use MsBuild.exe

Jetbrains Rider: [MSB4057] The target "build" does not exist in the project

When I create solution in Jetbrains Rider EAP 21 I get "(with missing packages)" error in Solution Explorer window.
Then, I try to build project and get [MSB4057] error.
Despite this, I can run the project through Terminal:
dotnet restore
dotnet build
... and get following information:
Hosting environment: Production
Content root path: *path*
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
dotnet --info command result:
.NET Command Line Tools (1.0.3)
Product Information:
Version: 1.0.3
Commit SHA-1 hash: 37224c9917
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/1.0.3
I've resolved a similar problem by changing the MSBuild version in Settings > Build, Execution, Deployment > Toolset and Build > Use MSBuild version.
I've selected the MSBuild located in the Rider install directory.
I recently started receiving such errors in many of my projects. Initially I believed that it was because of Rider's version and rolled back, but instead, it was a problem with the latest MSBuild from the Visual Studio Installation (I use Windows).
The solution for me was to go to File | Settings | Build, Execution, Deployment | Toolset and Build and then tweak the Use MSBuild setting. By default, Rider used the MSBuild that was installed alongside Visual Studio. I changed it to use the MSBuild version installed with Rider instead and the problem went away. The same solution is also discussed in Jebtrains's bug tracking system
The problem was resolved by installing new version of Mono from official site

New ASP.NET 5 preview project fails to run

I created a new ASP.NET 5 preview project in VS 2015 RTM (fully updated). When I try to debug it, it fails with the following exception:
The current runtime target framework is not compatible with
'ProjectName'.
Current runtime Target Framework: 'DNX,Version=v4.5 (dnx45)' Type:
CLR Architecture: x86 Version: 1.0.0-beta6-12256
Please make sure the runtime matches a framework specified in
project.json
I went with the default settings in the new project dialog, which I believe included a dependency on .NET 4.5.1 (though there's no mention of that dependency in the project.json file - contrary to what the exception message claims). I tried the solution offered here (defining the DNX_IIS_RUNTIME_FRAMEWORK environment variable in the project's debug settings) without success.
Install latest tools and try again. Beta 6 isn't apt to be supported and lots changed since then. You can get the tools here: http://www.microsoft.com/en-us/download/details.aspx?id=49442