DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator
1.0.0-alpha.2
This is a prerelease version of DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator --version 1.0.0-alpha.2
NuGet\Install-Package DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator -Version 1.0.0-alpha.2
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="DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator" Version="1.0.0-alpha.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator --version 1.0.0-alpha.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator, 1.0.0-alpha.2"
#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.
// Install DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator as a Cake Addin #addin nuget:?package=DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator&version=1.0.0-alpha.2&prerelease // Install DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator as a Cake Tool #tool nuget:?package=DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator&version=1.0.0-alpha.2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AspNetCoreEmbeddedStaticFilesSourceGenerator
<ItemGroup>
<PackageReference Include="DionTools.AspNetCoreEmbeddedStaticFilesSourceGenerator" Version="1.0.0-alpha" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
[EmbeddedStaticFiles("./wwwroot")]
static partial class EmbeddedWwwrootExtensions
{
private static string GetMimeTypeName(string fileName) => Path.GetExtension(fileName.AsSpan()) switch
{
".html" => MediaTypeNames.Text.Html,
".css" => MediaTypeNames.Text.Css,
".js" => MediaTypeNames.Text.JavaScript,
_ => MediaTypeNames.Application.Octet,
};
}
//app.UseStaticFiles();
//app.MapFallbackToFile("index.html");
app.MapStaticFiles();
app.MapFallback(FileContentHttpResult () => EmbeddedWwwrootExtensions.Files.index_html);
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.CodeAnalysis.CSharp (>= 4.3.0)
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-alpha.5 | 155 | 12/8/2023 |
1.0.0-alpha.4 | 61 | 12/8/2023 |
1.0.0-alpha.3 | 60 | 12/8/2023 |
1.0.0-alpha.2 | 55 | 12/8/2023 |
1.0.0-alpha | 79 | 12/8/2023 |