Category Archives: Memo

Making Win32 APIs More Accessible to More Languages

Introduction Win32 APIs provide powerful functionality that let you get the most out of Windows in your applications. While these APIs are readily accessible to C and C++ developers, other languages like C# and Rust require wrappers or bindings in order to access these APIs.

情報源: Making Win32 APIs More Accessible to More Languages


Office のLangage Pack(言語アクセサリパック)のダウンロード

Download, install, and configure Language Accessory Packs for Office.

情報源: Office の言語アクセサリ パック – Office サポート




情報源: MSIインストーラーで詳細ログを出力する – Qiita

msiを使ったインストール時にError 1001がダイアログやメッセージボックスとして発生したときに、以下の要領でログを出力させることで、より詳細なエラー原因がわかる場合がある。

> msiexec /i myinstaller.msi /l*v c:\installer.log


ASP.NET Core gRPC for WCF Developers 

Introduction to building gRPC services in ASP.NET Core 3.0 for WCF developers

情報源: ASP.NET Core gRPC for WCF Developers – gRPC for WCF Developers | Microsoft Docs


Memo: Roslynを使ってC#のコードでC#のコードをコンパイルする

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;

namespace RoslynComple
    class Program
        private static readonly IEnumerable<string> DefaultNamepaces = 
        private static string runtimePath 
            = @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\{0}.dll";
        private static readonly IEnumerable<MetadataReference> DefaultRefrences =
                MetadataReference.CreateFromFile(string.Format(runtimePath, "mscorlib")),
                MetadataReference.CreateFromFile(string.Format(runtimePath, "System")),
                MetadataReference.CreateFromFile(string.Format(runtimePath, "System.Core"))

        private static readonly CSharpCompilationOptions DefaultCompletionOpsions =
            new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)
        public static SyntaxTree Parse(string text, string filename = "", CSharpParseOptions options = null)
            var stringText = SourceText.From(text, Encoding.UTF8);
            return SyntaxFactory.ParseSyntaxTree(stringText, options, filename);
        static void Main(string[] args)
            // DLL Source Code
            var fileToCompile = @"C:\temp\Test.cs";
            var source = File.ReadAllText(fileToCompile);
            var parseSyntaxTree 
                = Parse(source, "", CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_3));
            var compliation 
                = CSharpCompilation.Create("test.dll", 
                                            new SyntaxTree[] { parseSyntaxTree }, 
                                            DefaultRefrences, DefaultCompletionOpsions);
                var result = compliation.Emit(@"c:\temp\Test.dll");
                Console.WriteLine(result.Success ? "Sucess!!" : "Failed");
            catch (Exception ex)



Announcing WinUI 3 Preview 2

At our monthly community call this morning we announced that a new preview of WinUI 3 is ready for you all to try out – WinUI 3 Preview 2! If you’re too excited to read ahead, check out the release notes here. WinUI 3 Preview 2 was a quality and stability-driven release. It builds directly […]

情報源: Announcing WinUI 3 Preview 2 – Windows Developer Blog


Nullable Reference Types: Contexts and Attributes – A Look at New Language Features in C# 8 – .NET Tools Blog.NET Tools Blog

Our C# 8 language features series is coming to an end. Before we jump into nullable contexts and nullable attributes, here is a quick (updated) recap of our roadmap: Indices, Ranges, and Null-coalescing Assignments Switch Expressions and Pattern-Based Usings Recursive … Continue reading →

情報源: Nullable Reference Types: Contexts and Attributes – A Look at New Language Features in C# 8 – .NET Tools Blog.NET Tools Blog


Nullable Reference TypesはC#8.0で追加されました。これは将来のC#でのNull全面不許可への第一歩です。Nullable Reference TypesはNull全面不許可における例外を設けるために作られたものです。なので、古いクラスライブラリなどどうしようも無い部分はあるのですが、C#erは極力Nullを避けるコーディング習慣を身につけるように努力した方が良いと思います。

build 2020 – The Journey to One .NET

Join us for the Microsoft Build 48-hour, digital event to expand your skillset, find technical solutions, and innovate for the challenges of tomorrow.

情報源: MyBuild – The Journey to One .NET