Macke
Macke
CC#
Created by Macke on 12/21/2022 in #help
❔ Trying to use SyncFusion with Blazor.
Hi, i've installed the blazor components from the website and through the nuget manager on Visual Studio, i have an approved license. However when i use Syncfusion it still gives me the banner saying it's a trail version. Can anyone help me?
2 replies
CC#
Created by Macke on 12/6/2022 in #help
✅ How can i change the target Framework?
Severity Code Description Project File Line Suppression State
Error NETSDK1045 The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. BlazorApp1 C:\Program Files\dotnet\sdk\6.0.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 144
Severity Code Description Project File Line Suppression State
Error NETSDK1045 The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. BlazorApp1 C:\Program Files\dotnet\sdk\6.0.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 144
14 replies
CC#
Created by Macke on 12/5/2022 in #help
Can someone explain the use of Dispose?
I'm using Blazor and found this code for displaying a live update of The current time. I understand most of it except the use of timer.Dispose(). What would happen if this is not included. I don't notice a difference in performance when not using it.
string timeString = DateTime.Now.ToLongTimeString();
Timer timer;
int interval = 1000

//On page init
protected override void OnInitialized()
{
//callback every 1000 ms
timer = new Timer(UpdatePage, null, 0, interval);


}

//Callback function
void UpdatePage(object _)
{

timeString = DateTime.Now.ToLongTimeString();
//Rerenders the page
InvokeAsync(StateHasChanged);
}

public void Dispose()
{
//why?
timer.Dispose();
}
string timeString = DateTime.Now.ToLongTimeString();
Timer timer;
int interval = 1000

//On page init
protected override void OnInitialized()
{
//callback every 1000 ms
timer = new Timer(UpdatePage, null, 0, interval);


}

//Callback function
void UpdatePage(object _)
{

timeString = DateTime.Now.ToLongTimeString();
//Rerenders the page
InvokeAsync(StateHasChanged);
}

public void Dispose()
{
//why?
timer.Dispose();
}
27 replies
CC#
Created by Macke on 12/1/2022 in #help
❔ Can't deploy app MAUI
I'm trying to Deploy/Publish the app i've made but i'm getting a bunch of errors that i don't understand. I'm pasting it below maybe someone can see what the problem is and point to the right direction. https://pastebin.com/tMVVipZ7
5 replies
CC#
Created by Macke on 11/22/2022 in #help
Unable to publish MAUI App
I’m getting no error message or anything Just Package: 0 succeeded, 1 failed On the output view. I can’t find anything online about this particular error
5 replies
CC#
Created by Macke on 11/21/2022 in #help
Expression returns false even though it should return true
35 replies
CC#
Created by Macke on 11/17/2022 in #help
❔ Getting the cookies and current Url from Webview [MAUI]
I'm making a simple app where the user needs to log in the first time they're using it in WebView and after they've logged in i need to collect the cookie in the request header. So i need to check what url they're on and if they're in the correct url i'll get the current cookie header and store it in the app. I don't know if this is clear enough. I've tried googling but i've only found out on how to set the cookies for webview but i haven't found anything about pulling it from the webview.
2 replies