简体   繁体   English

Visual Studio 2017-导出模板为空白

[英]Visual Studio 2017 - Exporting Template is blank

I have created a Class Library titled 'ClassLibrary3' which is targeting NET Standard 1.4, it contains one class and one simple method that returns "Hello World" as a string, like so. 我创建了一个名为“ ClassLibrary3”的类库,它针对NET Standard 1.4,它包含一个类和一个简单的方法,该方法以字符串形式返回“ Hello World”。

public class Class1
{
    public string DoWork()
    {
        return "Hello World";
    }
}

I then exported this as a Project Template via the Project -> Export Template option, the end result is an archive containing all files within the project folder including the Class1.cs file, however the template itself in Visual Studio does not load the code files 然后,我通过“项目”->“导出模板”选项将其导出为项目模板,最终结果是一个归档文件,其中包含项目文件夹中的所有文件,包括Class1.cs文件,但是Visual Studio中的模板本身不会加载代码文件 Visual Studio专案

This is how the archive created from the export process looks 这是通过导出过程创建的档案的外观 导出模板档案

The csproj XML is the following 以下是csproj XML

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard1.4</TargetFramework>
  </PropertyGroup>

</Project>

I have looked online and found these Xamarin templates but they don't seem to be using the Visual Studio 2017 csproj template, the next piece I found is an issue raised via this DeveloperCommunity issue 我在网上查看并找到了这些Xamarin模板,但它们似乎未使用Visual Studio 2017 csproj模板,我发现的下一块是通过此DeveloperCommunity问题引起的问题

Has anybody been able to successfully create a Project Template on Visual Studio 2017 or is this something we're awaiting a fix for? 是否有人能够在Visual Studio 2017上成功创建项目模板,或者这是我们正在等待解决的问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM