Click on the Tauri and ASP.NET logos to learn more.
+
+
+
+
+
+@section Scripts {
+
+}
\ No newline at end of file
diff --git a/templates/template-aspnet/src/Views/Shared/Error.cshtml.lte b/templates/template-aspnet/src/Views/Shared/Error.cshtml.lte
new file mode 100644
index 0000000000..9ad3876965
--- /dev/null
+++ b/templates/template-aspnet/src/Views/Shared/Error.cshtml.lte
@@ -0,0 +1,20 @@
+@model {% project_name_pascal_case %}.Models.ErrorViewModel
+
+
Error.
+
An error occurred while processing your request.
+
+@if (Model.ShowRequestId)
+{
+
+ Request ID:@Model.RequestId
+
+}
+
+
Development Mode
+
+ Swapping to Development environment will display more detailed information about the error that occurred.
+
+
+ The Development environment shouldn't be enabled for deployed applications.
+ It can result in displaying sensitive information from exceptions to end users.
+
\ No newline at end of file
diff --git a/templates/template-aspnet/src/Views/Shared/_Layout.cshtml.lte b/templates/template-aspnet/src/Views/Shared/_Layout.cshtml.lte
new file mode 100644
index 0000000000..10b0aa0e46
--- /dev/null
+++ b/templates/template-aspnet/src/Views/Shared/_Layout.cshtml.lte
@@ -0,0 +1,13 @@
+
+
+
+
+ Tauri + ASP.NET
+
+
+
+
+ @RenderBody()
+ @await RenderSectionAsync("Scripts", required: false)
+
+
\ No newline at end of file
diff --git a/templates/template-aspnet/src/Views/_ViewImports.cshtml.lte b/templates/template-aspnet/src/Views/_ViewImports.cshtml.lte
new file mode 100644
index 0000000000..f595c1b52c
--- /dev/null
+++ b/templates/template-aspnet/src/Views/_ViewImports.cshtml.lte
@@ -0,0 +1,4 @@
+@using {% project_name_pascal_case %}
+@using {% project_name_pascal_case %}.Models
+
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
\ No newline at end of file
diff --git a/templates/template-aspnet/src/Views/_ViewStart.cshtml b/templates/template-aspnet/src/Views/_ViewStart.cshtml
new file mode 100644
index 0000000000..40c70bce23
--- /dev/null
+++ b/templates/template-aspnet/src/Views/_ViewStart.cshtml
@@ -0,0 +1,3 @@
+@{
+ Layout = "_Layout";
+}
\ No newline at end of file
diff --git a/templates/template-aspnet/src/appsettings.Development.json b/templates/template-aspnet/src/appsettings.Development.json
new file mode 100644
index 0000000000..ba0911747a
--- /dev/null
+++ b/templates/template-aspnet/src/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
\ No newline at end of file
diff --git a/templates/template-aspnet/src/appsettings.json b/templates/template-aspnet/src/appsettings.json
new file mode 100644
index 0000000000..5687af1f3a
--- /dev/null
+++ b/templates/template-aspnet/src/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
\ No newline at end of file
diff --git a/templates/template-aspnet/src/wwwroot/css/app.css b/templates/template-aspnet/src/wwwroot/css/app.css
new file mode 100644
index 0000000000..613e96c226
--- /dev/null
+++ b/templates/template-aspnet/src/wwwroot/css/app.css
@@ -0,0 +1,3 @@
+.logo.aspnet:hover {
+ filter: drop-shadow(0 0 2em #2ca1d9);
+}
diff --git a/templates/template-aspnet/src/{% project_name_pascal_case %}.csproj b/templates/template-aspnet/src/{% project_name_pascal_case %}.csproj
new file mode 100644
index 0000000000..0cd4404f5c
--- /dev/null
+++ b/templates/template-aspnet/src/{% project_name_pascal_case %}.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net8.0
+ disable
+ enable
+
+
+
\ No newline at end of file
From cb5511c57bbec8053bbda9b05e027ec184e8d6e9 Mon Sep 17 00:00:00 2001
From: Taiizor <41683699+Taiizor@users.noreply.github.com>
Date: Sun, 11 May 2025 05:52:06 +0300
Subject: [PATCH 2/5] Refactor ASP.NET template asset structure
Moved 'aspnet.svg' from '_assets_' to 'src/wwwroot/img' in the ASP.NET template and updated the .manifest file to reflect the new location. This improves the organization of template assets.
---
templates/template-aspnet/.manifest | 3 +--
.../{_assets_ => template-aspnet/src/wwwroot/img}/aspnet.svg | 0
2 files changed, 1 insertion(+), 2 deletions(-)
rename templates/{_assets_ => template-aspnet/src/wwwroot/img}/aspnet.svg (100%)
diff --git a/templates/template-aspnet/.manifest b/templates/template-aspnet/.manifest
index 84045a8bc3..72eda2220c 100644
--- a/templates/template-aspnet/.manifest
+++ b/templates/template-aspnet/.manifest
@@ -6,5 +6,4 @@ withGlobalTauri = true
[files]
styles.css = src/wwwroot/css/app.css
-tauri.svg = src/wwwroot/img/tauri.svg
-aspnet.svg = src/wwwroot/img/aspnet.svg
\ No newline at end of file
+tauri.svg = src/wwwroot/img/tauri.svg
\ No newline at end of file
diff --git a/templates/_assets_/aspnet.svg b/templates/template-aspnet/src/wwwroot/img/aspnet.svg
similarity index 100%
rename from templates/_assets_/aspnet.svg
rename to templates/template-aspnet/src/wwwroot/img/aspnet.svg
From 478c729ba18bd63560937692e227fafe54ad6427 Mon Sep 17 00:00:00 2001
From: Taiizor <41683699+Taiizor@users.noreply.github.com>
Date: Sun, 11 May 2025 20:38:09 +0300
Subject: [PATCH 3/5] Add Kestrel HTTP endpoint configuration
Updated appsettings.Development.json and appsettings.json to include Kestrel HTTP endpoint configuration with URL 'http://*:1420'. This change ensures consistent endpoint settings for the application.
---
.../template-aspnet/src/appsettings.Development.json | 7 +++++++
templates/template-aspnet/src/appsettings.json | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/templates/template-aspnet/src/appsettings.Development.json b/templates/template-aspnet/src/appsettings.Development.json
index ba0911747a..6bab24123a 100644
--- a/templates/template-aspnet/src/appsettings.Development.json
+++ b/templates/template-aspnet/src/appsettings.Development.json
@@ -4,5 +4,12 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
+ },
+ "Kestrel": {
+ "Endpoints": {
+ "Http": {
+ "Url": "http://*:1420"
+ }
+ }
}
}
\ No newline at end of file
diff --git a/templates/template-aspnet/src/appsettings.json b/templates/template-aspnet/src/appsettings.json
index 5687af1f3a..9a4a7400f8 100644
--- a/templates/template-aspnet/src/appsettings.json
+++ b/templates/template-aspnet/src/appsettings.json
@@ -5,5 +5,12 @@
"Microsoft.AspNetCore": "Warning"
}
},
- "AllowedHosts": "*"
+ "AllowedHosts": "*",
+ "Kestrel": {
+ "Endpoints": {
+ "Http": {
+ "Url": "http://*:1420"
+ }
+ }
+ }
}
\ No newline at end of file
From e38856b5ab71daebfaebeca5b910f9984538191a Mon Sep 17 00:00:00 2001
From: Taiizor <41683699+Taiizor@users.noreply.github.com>
Date: Sun, 11 May 2025 20:49:26 +0300
Subject: [PATCH 4/5] Remove unused Privacy action from HomeController
The Privacy action method was removed from HomeController as it is no longer used. This helps to clean up the code and improve maintainability.
---
.../template-aspnet/src/Controllers/HomeController.cs.lte | 5 -----
1 file changed, 5 deletions(-)
diff --git a/templates/template-aspnet/src/Controllers/HomeController.cs.lte b/templates/template-aspnet/src/Controllers/HomeController.cs.lte
index 4ee3ef14a8..1ba41e0e12 100644
--- a/templates/template-aspnet/src/Controllers/HomeController.cs.lte
+++ b/templates/template-aspnet/src/Controllers/HomeController.cs.lte
@@ -19,11 +19,6 @@ namespace {% project_name_pascal_case %}.Controllers
return View();
}
- public IActionResult Privacy()
- {
- return View();
- }
-
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
From 3d25c6a685554d566451d52b3c97fcf02319d764 Mon Sep 17 00:00:00 2001
From: Taiizor <41683699+Taiizor@users.noreply.github.com>
Date: Sun, 11 May 2025 20:53:12 +0300
Subject: [PATCH 5/5] Remove appsettings files from ASP.NET template
Deleted appsettings.Development.json and appsettings.json from the ASP.NET template. These files may have been removed to avoid hardcoding configuration or to centralize settings management.
---
.../src/appsettings.Development.json | 15 ---------------
templates/template-aspnet/src/appsettings.json | 16 ----------------
2 files changed, 31 deletions(-)
delete mode 100644 templates/template-aspnet/src/appsettings.Development.json
delete mode 100644 templates/template-aspnet/src/appsettings.json
diff --git a/templates/template-aspnet/src/appsettings.Development.json b/templates/template-aspnet/src/appsettings.Development.json
deleted file mode 100644
index 6bab24123a..0000000000
--- a/templates/template-aspnet/src/appsettings.Development.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- },
- "Kestrel": {
- "Endpoints": {
- "Http": {
- "Url": "http://*:1420"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/templates/template-aspnet/src/appsettings.json b/templates/template-aspnet/src/appsettings.json
deleted file mode 100644
index 9a4a7400f8..0000000000
--- a/templates/template-aspnet/src/appsettings.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- },
- "AllowedHosts": "*",
- "Kestrel": {
- "Endpoints": {
- "Http": {
- "Url": "http://*:1420"
- }
- }
- }
-}
\ No newline at end of file