天道酬勤,学无止境

winmd

Inheritance impossible in Windows Runtime Component?

Scenario: I have 3 classes (A,B,C) in my Windows Runtime Component project. class A{} public sealed class B : A {} public sealed class C : A {} On compiling the above code, I get the following error: "Inconsistent accessibility: base class 'A' is less accessible than class 'C'." If I make class A public, it gives a compile error : "Exporting unsealed types is not supported. Please mark type 'MyProject.A' as sealed." But now, if I make A as sealed, then B and C cannot inherit from it. Considering the fact that only WinRT types are allowed for inheritance, is it anyhow possible to use custom

2021-08-12 07:01:19    分类:问答    c#   windows   windows-runtime   win-universal-app   winmd

How to read a winmd (WinRT metadata file)?

A WinMD is a binary medadata file, that contains everything you need to learn about namespaces, types, classes, methods, parameters available in a native WinRT dll. From Windows Runtime design: The Windows Runtime is exposed using API metadata (.winmd files). This is the same format used by the .NET framework (Ecma-335). The underlying binary contract makes it easy for you to access the Windows Runtime APIs directly in the development language of your choice. Each .winmd file exposes one or more namespaces. These namespaces are grouped by the functionality that they provide. A namespace

2021-06-22 01:22:48    分类:问答    com   windows-runtime   midl   winmd

BuildManager使用其他版本的MSBuild(BuildManager to use another version of MSBuild)

问题 以下代码尝试使用BuildManager以编程方式构建解决方案: ProjectCollection pc = new ProjectCollection(); pc.DefaultToolsVersion = "12.0"; pc.Loggers.Add(fileLogger); Dictionary<string, string> globalProperty = new Dictionary<string, string>(); BuildRequestData buildRequest = new BuildRequestData(solutionName, globalProperty, null, new[] { "Build" }, null); BuildParameters buildParameters = new BuildParameters(pc) { DefaultToolsVersion = "12.0", OnlyLogCriticalEvents = false, DetailedSummary = true, Loggers = new List<Microsoft.Build.Framework.ILogger> { fileLogger }.AsEnumerable() }; var result = BuildManager

2021-05-06 19:10:43    分类:技术分享    c#   msbuild   solution   microsoft.build   winmd

BuildManager to use another version of MSBuild

The following code tries to build a Solution programmatically, using BuildManager: ProjectCollection pc = new ProjectCollection(); pc.DefaultToolsVersion = "12.0"; pc.Loggers.Add(fileLogger); Dictionary<string, string> globalProperty = new Dictionary<string, string>(); BuildRequestData buildRequest = new BuildRequestData(solutionName, globalProperty, null, new[] { "Build" }, null); BuildParameters buildParameters = new BuildParameters(pc) { DefaultToolsVersion = "12.0", OnlyLogCriticalEvents = false, DetailedSummary = true, Loggers = new List<Microsoft.Build.Framework.ILogger> { fileLogger }

2021-04-04 21:42:50    分类:问答    c#   msbuild   solution   microsoft.build   winmd