99 questions from the last 7 days
-1
votes
0
answers
21
views
Dockable panel height issue revit api
I have an issue with setting the height of a Dockable Panel in Revit. I created a panel that should appear at the bottom of Revit with a fixed height (for example, 50 px). However, every time I start ...
-1
votes
0
answers
28
views
Casting from list of VirtualKey objects to RegisterHotKey
I'm using DevWinUI's shortcut control but I'm confused on how to get the key and modifiers from it and then casting it to the proper types for RegisterHotKey.
The shortcut control returns public new ...
1
vote
0
answers
33
views
Embedded Views in ASP.NET Core 10
Previously, in .NET 9 and lower, we could use RazorRuntimeCompiliation to implement embedded views in assemblies.
services.Configure<MvcRazorRuntimeCompilationOptions>( options =>
{
var ...
Advice
0
votes
2
replies
33
views
ASP.NET Core 10 integration tests using multiple web projects/entry points
When creating integration tests for ASP.NET Core 10 web apps, we use the WebApplicationFactory<TEntryPoint> class. When a single ASP.NET Core web project is used as SUT, it's simple and it works:...
Best practices
0
votes
1
replies
49
views
Filling the `entityIds` property in EF Core
I am currently developing a module for an ASP.NET Core Web API that uses EF Core to talk to MySQL. The problem is I have no idea how to make EF Core fill the entityId property.
Here is the example ...
0
votes
0
answers
25
views
Issue with Template.Json not excluding files
I have built a template project with a Template.json and this will generate the template fine ( no errors at all )
ive also managed to add some choices to the symbols that will add or hide code ...
9
votes
2
answers
233
views
Nullable warning when upgrading to extension-members syntax
I have two versions of helper methods for logging on ILogger. The first (classic extension methods) compiles fine; the second using extension members results in a compiler warning/error code.
CS8620: ...
-5
votes
0
answers
26
views
Issues using Machine Translation plugins for SDL Studio through API [closed]
I'm working on a translation workflow using SDL Studio solution through API calls. Works just fine, our tool can call upon Studio to create a translation project, fill it with the files to be ...
0
votes
0
answers
23
views
WebView in .NET MAUI can not access a webpage that is served on a VM using Fiddler (a proxy)
I created a quite simple .NET MAUI App. For now it only implements a WebView with a source:
MainPage.xaml.cs
public MainPage()
{
InitializeComponent();
WebView webView = new WebView
{
...
-7
votes
0
answers
93
views
Array of pointer to objects
I'm using C#. I have a certain number of Newtonsoft.Json.Linq.JArray, let's say A123, A124, A125, and so on.
I need to create an array or something similar of this objects in a way that, if I do ...
0
votes
0
answers
36
views
How to write Custom Dimension?
In my CRM 365 Plugin I have requirement to write log to Application Insight, I'm able to achieve this using ILogger and Microsoft.Xrm.Sdk.PluginTelemetry library. But I have struggled to write log ...
Best practices
1
vote
5
replies
82
views
Handling mutable models in MVVM
In an MVVM architecture, models should be kept free of UI-related logic. They represent pure data that is retrieved from memory via a service. I see a challenge when the user interface needs to ...
2
votes
1
answer
137
views
How do I implement C# 14 extension block on a generic?
I'm attempting to rewrite one of my extensions in the new block syntax. It's an extension on IEnumerable<T>:
public static class IEnumerableExtensions
{
public static double StdDev<T>(...
0
votes
1
answer
111
views
Why are items not written to console immediately after being processed?
I have the following C# code :
var rand = new Random(1);
var range = Enumerable.Range(1, 8);
var partition = Partitioner.Create(range, EnumerablePartitionerOptions.NoBuffering);
foreach (var x in ...
1
vote
1
answer
69
views
How to conditionally compose the EF from parts?
I have two tables Products and CustomerProduct. I need to compose an Entity Framework Core object that returns the result based on arguments of the Web API endpoint method.
The method roughly works ...
0
votes
2
answers
78
views
method to show notification in WPF project causes an "unexpected token error"
According to the documentation available from Microsoft, the code that should show a Notification toast on Desktop looks like this
//correctly imported the Notifications library
using Microsoft....
1
vote
0
answers
37
views
Get ROWSET prop WHEREID from OleDbDataReader
I am querying the Windows Search Index using c# and SQL as the following example (which works)
OleDbDataReader mydataReader = null;
OleDbConnection myOleDbConnection = new OleDbConnection("...
0
votes
0
answers
44
views
WPF "View Source" in Live Visual Tree stopped working - can't open XAML or code-behind
I'm learning how the back end and front end work together by reviewing WPF (Window Presentation Foundation) code.
The project runs locally on my machine. I copied it from my team's shared folder.
My ...
-1
votes
0
answers
116
views
How to debug the C# COM class? [closed]
I have a simple C++ project which uses the CoCreateInstance to access and use some C# code (com-exposed class). The simple code looks like:
// ...
hr = CoCreateInstance(
CLSID_rclsid,
NULL, ...
0
votes
0
answers
68
views
EF Core 9 migration fails on production database copy with "Cannot release the application lock" error
I'm using EF Core 9 and I'm trying to run a migration against a copy of our production database.
On our local development databases everything works, but on the production copy the migration fails ...
0
votes
0
answers
19
views
WiX Toolset bootstrapper hangs after installing VCRedist
When trying to install the bundle, VCRedist seems to still set the reboot flag even though the argument /norestart is used.
The installer then idles/ hangs with 0% CPU usage in the task manager and ...
1
vote
1
answer
44
views
TSC TE210 Printing extra label when print executed by application
I want to print data on a label.
I created a ZPL template file and in my application i read that template file, look up a specific string, replace that string with data from my application and then ...
Advice
1
vote
13
replies
104
views
C# - lock multiple methods or entire class to single thread execution
I am trying to ensure that methods in my class can only be called by a single thread.
So far tried to use ReaderWriterLockSlim to achieve this effect but this can cause potential issues if it is not ...
-1
votes
2
answers
73
views
How to mock ILogger and invoke via callback Console.Writeline to have invocations in test explorer?
I need to have every invocation from the ILogger interface of a test,
but I mock the ILogger interface in the class that is going to be tested, so it won't write to console and therefore the ILogger ...
3
votes
0
answers
148
views
Upgrading project to .NET 10 breaks Scalar support when using document transformers
I'm currently in the process of upgrading to .NET 10 from .NET 9, but unfortunately as usual the documentation of breaking changes seems to be lacking when it comes to certain functionality and ...