Category : .net-5

I used to use PInvoke: [DllImport("Kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private extern static bool GetVolumeInformation( string rootPathName, StringBuilder volumeNameBuffer, int volumeNameSize, out uint volumeSerialNumber, out uint maximumComponentLength, out FileSystemFeature fileSystemFlags, StringBuilder fileSystemNameBuffer, int nFileSystemNameSize); public static VolumeInformation GetVolumeInfo(string path) { string root = System.IO.Path.GetPathRoot(path); const int maxPath = 261; StringBuilder volumeNameBuffer ..

Read more

I have a solution of .NET 5 SDK-style csprojs that works with dotnet build and dotnet test. I’d like to add a C++ project to it (pure C++, not C++/CLI), which breaks these. The error I get is error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration ..

Read more

In the past I used the classes Installer, ServiceInstaller and ServiceProcessInstaller to make my app self-installable. I just had to run InstallUtil.exe MyApp to install the app as a Windows Service. But I can’t find those classes on DotNet5. They won’t be ported? There are any other approach to replace them? Can anyone point me ..

Read more