ShadowCode.ImportFiles
1.0.0
dotnet add package ShadowCode.ImportFiles --version 1.0.0
NuGet\Install-Package ShadowCode.ImportFiles -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ShadowCode.ImportFiles" Version="1.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ShadowCode.ImportFiles" Version="1.0.0" />
<PackageReference Include="ShadowCode.ImportFiles"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ShadowCode.ImportFiles --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ShadowCode.ImportFiles, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ShadowCode.ImportFiles@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ShadowCode.ImportFiles&version=1.0.0
#tool nuget:?package=ShadowCode.ImportFiles&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ShadowCode.ImportFiles.csproj
适用于手动生成代码的导入到项目中
1. 描述
| 名称 | 类型 | 功能描述 |
|---|---|---|
| ShadowCode.ImportFiles | nuget包 | 用于导入代码的项目 |
| ShadowCode.ImportFiles.Code | nuget包 | 用于生成代码的项目 |
ShadowCode_ImportPath |
目录文件路径 |
项目配置 |
2. 配置目录文件路径
用于描述导入文件的清单。默认值: ..\ShadowCode_ImportFiles_Generator\g.xml,自定义路径如下
<PropertyGroup>
<ShadowCode_ImportPath>D:\Generator\xxx.xml</ShadowCode_ImportPath>
</PropertyGroup>
3. 目录文件
使用nuget包ShadowCode.ImportFiles.Code后会导入文件ShadowCode.ImportFiles.ImportFileData.cs,使用自定义代码创建代码文件后使用ImportFileData创建清单文件。
new ImportFileData[]
{
new("a\\1.cs", "// 代码内容"),
new("b\\2.cs", "// 代码内容")
}.Save();
生成内容如下
<Items>
<Item Include="a\1.cs" />
<Item Include="b\2.cs" />
</Items>
简易模式
- 生成代码代码的项目 nuget:
ShadowCode.ImportFiles.Code - 需要导入代码的项目 project:
<ItemGroup>
<Compile Include="..\ShadowCode_ImportFiles_Generator\**\*.cs"
LinkBase="ImportFiles" />
</ItemGroup>
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 201 | 3/28/2026 |