single-file-generator

Single File Generator not working for .NET Standard Projects in Visual Studio 2017

守給你的承諾、 提交于 2019-12-07 17:02:43
问题 I've implemented a Single File Generator based off the template [1] (that compiles into an installable VSIX output, including the automatic registration of the components) and: It works for classic .NET projects in VS 2015 and VS2017; It works for .NET Core projects in VS2017; But doesn't work for .NET Standard projects in VS2017. All of the HasCustomTool.xml files have the same configuration, all of them have the 'Custom Tool' attribute specified. When I look at the .csproj files, I can see

Single File Generator not working for .NET Standard Projects in Visual Studio 2017

核能气质少年 提交于 2019-12-05 19:59:21
I've implemented a Single File Generator based off the template [1] (that compiles into an installable VSIX output, including the automatic registration of the components) and: It works for classic .NET projects in VS 2015 and VS2017; It works for .NET Core projects in VS2017; But doesn't work for .NET Standard projects in VS2017. All of the HasCustomTool.xml files have the same configuration, all of them have the 'Custom Tool' attribute specified. When I look at the .csproj files, I can see that they are different. The (working) content of the DotNetCore.csproj file is: <ItemGroup> <Compile

Add VSIX features to C# Class Library

放肆的年华 提交于 2019-12-03 17:47:54
问题 I have an existing Single-File Generator (housed in a C# Class Library). How do you add the VSIX project-level features to this project? The end goal is to compile my class library project and get a VSIX. (I'm actually answering my own question. This is in relation to SIngle-file generator changes in Visual Studio 2017 - but that question wasn't asking what I'm answering here.) 回答1: First off, your Single-File Generator class needs to have the appropriate class-level attributes: using System