.net
173 TopicsConnection between .NET and AUTOCAD ELECTRICAL
I want to connect .NET with Autocad Electrical . i am using , AutoCAD Electrical 2025.0.2 , Product Version : 22.0.81.0 , Built on: V.154.0.0 AutoCAD 2025.1.1 Visual Studio Community 2022 - 17.12.3 my system is x64 bit I am creating a console application in .NET 8.0 Runtime with C# language , Added dll accoremgd , acdbmgd, acmgd, Autodesk.AutoCAD.Interop . Also in .NET in Solution Explorer , in project references , i have made "Copy Local" property as False. using System; using Autodesk.AutoCAD.Interop; using Autodesk.AutoCAD.Runtime; using System.Runtime.InteropServices; using Autodesk.AutoCAD.ApplicationServices; namespace AutoCADElecDemo { class Program { static void Main(string[] args) { AcadApplication acadApp = null; const string progId = "AutoCAD.Application.25"; // Adjust for your AutoCAD version try { // Get a running instance of AutoCAD acadApp = GetActiveAutoCAD(progId); } catch (System.Exception ex) { Console.WriteLine($"Error initializing AutoCAD: {ex.Message}"); return; } try { // Ensure AutoCAD is visible acadApp.Visible = true; Console.WriteLine("AutoCAD is now running."); // Register for the BeginQuit event Application.BeginQuit += OnBeginQuit; // Keep the application running to monitor AutoCAD's state Console.WriteLine("Press Enter to exit..."); Console.ReadLine(); } catch (System.Exception ex) { Console.WriteLine($"An error occurred: {ex.Message}"); } finally { // Unregister the event handler before exiting Application.BeginQuit -= OnBeginQuit; } } static AcadApplication GetActiveAutoCAD(string progId) { try { var comObject = Marshal.GetActiveObject(progId); Console.WriteLine($"Connected to AutoCAD: {progId}"); return (AcadApplication)comObject; } catch (System.Exception ex) { Console.WriteLine($"Error accessing AutoCAD: {ex.Message}"); throw; } } static void OnBeginQuit(object sender, EventArgs e) { Console.WriteLine("AutoCAD is being closed."); } } } For above code, my application comes in break mode "Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing)." and i am getting below error : System.IO.FileNotFoundException: 'Could not load file or assembly 'accoremgd, Version=25.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.' dll path is also correct. i also tried same code with .NET Framework 4.7.2 and 4.8 targeting pack , but getting same error. How to load accoremgd.dll properly so that this application can use autocad accoremgd functions properly.82Views0likes1CommentApplications are not correctly detecting .NET Desktop Runtime 6.0.1 (x64)
Even though I have .NET Desktop Runtime 6.0.1 (x64) installed, I'm still getting an error when launching a .NET application Windows 10 21H2 OS Build 19044.1466 Event log shows event 1023 - Description: A .NET application failed. Application: HandBrake.exe Path: C:\Program Files\HandBrake\HandBrake.exe Message: Failure processing application bundle. Bundle header version compatibility check failed. A fatal error occured while processing application bundle8.6KViews0likes3CommentsUsing late binding to run AdvancedSearch in Outlook in .NET8?
I'm trying to use the AdvancedSearch feature from Outlook in my .NET 8 application, but I haven't been able to make it work. I'm currently using Restrict when I need to filter by a specific sender or by date. However, I need more advanced filtering options — for example, checking if the subject contains a specific word. I could use a loop to do this after retrieving the results with Restrict, but it's very slow. It seems like AdvancedSearch would be a better option, but I'm getting an error when I try to run the search. Below is an example of my code, although I've tried many variations. If anyone can share a working example, that would be really helpful. Thanks in advance! string searchTag = "BuscaOutlook"; string searchScope = "'\\Caixa de Entrada'"; filter = "@SQL=\"urn:schemas:httpmail:subject\" LIKE '%orcamento%' AND \"urn:schemas:httpmail:datereceived\" >= '2024-04-01 00:00:00'"; try { dynamic searchb = outlookApp.AdvancedSearch(searchScope, filter, true, searchTag); } catch (Exception ex) { MessageBox.Show("Erro no AdvancedSearch:\n" + ex.Message); return; }46Views1like1CommentAacAmbientLighting.exe Issue
Hi, I'm not sure if this is an appropriate place to post this, please do let me know if not. I have for the last two days been getting the following message popping up on my machine and I can't work out for what reason. I updated my Internet Security during that time, so automatic thought was it was that preventing the files been read, but I've disabled the Internet Security and the error message still crops up I have also uninstalled and reinstalled Armoury Crate, uninstalling it does take the error away, but that causes other issues and I use ROG hardware. So I kind of need Armoury Crate to be functioning. This is the error that I'm seeing: When I try and install the .Net Runtime software it says that 'the specified account already exists' so I'm a littled confused as to what might be causing the issue and how I can resolve it and keep Armoury Crate on my machine.179Views0likes0Comments.Net 8 Isolated upgrade issue- RPC Exceptions in .Net Core Function App
Hi Team, Need Immediate help. I am continuously receiving RPC Exceptions when I have upgraded my Function App to .Net 8 previously I had zero exceptions related to this in .Net 6. Scenario: We are creating builder with ConfigureFunctionsWebApplication() like below: 1. var builder = FunctionsApplication.CreateBuilder(args); 2. builder.ConfigureFunctionsWebApplication(); And basically, we have Http triggers and SB triggers in the application and only couple of them are facing issue and the error in AI states that this is an issue related to worker. I have copied multiple exception wrapped as an RPC exception below: 1. An exception was thrown by the invocation. Exception: System.TimeoutException: Timed out waiting for the function start call. 2. The operation has timed out at Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.DefaultHttpCoordinator.SetFunctionContextAsync(String invocationId, FunctionContext context) 3.Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.DefaultHttpCoordinator.SetFunctionContextAsync(String invocationId, FunctionContext context) 4. Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.FunctionsHttpProxyingMiddleware.Invoke(FunctionContext context, FunctionExecutionDelegate next) in D:\a\_work\1\s\extensions\Worker.Extensions.Http.AspNetCore\src\FunctionsMiddleware\FunctionsHttpProxyingMiddleware.cs:line 45 at Microsoft.Azure.Functions.Worker.FunctionsApplication.InvokeFunctionAsync(FunctionContext context) in D:\a\_work\1\s\src\DotNetWorker.Core\FunctionsApplication.cs:line 96 Stack: at Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.DefaultHttpCoordinator.SetFunctionContextAsync(String invocationId, FunctionContext context) in D:\a\_work\1\s\extensions\Worker.Extensions.Http.AspNetCore\src\Coordinator\DefaultHttpCoordinator.cs:line 66 5. Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.FunctionsHttpProxyingMiddleware.Invoke(FunctionContext context, FunctionExecutionDelegate next) in D:\a\_work\1\s\extensions\Worker.Extensions.Http.AspNetCore\src\FunctionsMiddleware\FunctionsHttpProxyingMiddleware.cs:line 45 at Microsoft.Azure.Functions.Worker.FunctionsApplication.InvokeFunctionAsync(FunctionContext context) in D:\a\_work\1\s\src\DotNetWorker.Core\FunctionsApplication.cs:line 9646Views0likes0CommentsEmbedded Json being interpretted incorrectly
I created an API project in .NET 6.0 with an endpoint that accepts a Json request body with Json embedded in one of the attributes of the request. The problem I'm having is that within the embedded Json, one of the values has an escaped double quotes right before an open square bracket, and when the embedded Json is received by the endpoint, the escaped double quote is missing. Here is an example of how the end point is being called:POST /DataRequest/MyDataBody:{ "HostName": "my-host-01", "Job": "some_job", "JobData": "{\"attr1\":\"value1\",\"attr2\":\"value2\",\"attr3\";\"[val3] foo\"}" } The issue I see with JobData is that the \"[ after the attr3 definition gets immediately translated to just [. When I say Immediately, I mean that I have a break point on the very first line of the endpoint code and the escaped double quote is already removed from the JobData attribute.So, when I'm looking at the value that was received by the end point, it looks like this:"JobData": "{\"attr1\":\"value1\",\"attr2\":\"value2\",\"attr3\";[val3] foo\"}" This ends up being invalid Json and causes errors further down in the code. I tried to do some research on this, but it's pretty hard to google something like this and get any sort of answer. I did some experimenting and found that these combinations:\"attr3\":\"\"[val3] foo\" produces "attr3":"[val3] foo"\"attr3\":\" [val3] foo\" produces "attr3":" [val3] foo" (note, there's a space between the escaped double quote and the bracket)It seems like something in the framework is incorrectly assuming that the open bracket is starting a list even though it's got an escaped double quote in front of it. I also found that the sequence ]\" does the same thing on the other end where the escaped double quotes gets dropped in the string. Is \"[ and ]\" a special case escape that I'm just not aware of? Has anyone else run across this? We've kind of worked around the issue using the space between the escaped double quote and the open bracket, but I was hoping to find out why this happens. If I'm posting this in the wrong place, please let me know where I should post this.35Views0likes2Comments🚀 Kickstart Your .NET Journey with Microsoft Learn!
Hey .NET enthusiasts! Are you new to .NET or looking to refresh your skills? Microsoft Learn has an Introduction to .NET module that walks you through the fundamentals of .NET, .NET Core, and the .NET Framework. This is a free, hands-on learning experience designed to get you started quickly. What you'll learn: The basics of .NET and why it's powerful How .NET supports multiple platforms Running your first .NET application Start learning here: Microsoft Learn Introduction to .NET Have you used .NET in your projects? Share your experiences and let’s discuss below!36Views0likes0Comments[Suggestion 1][Allow Language Selection During .NET Installation]
Hi, 1. Context: Currently, when installing the .NET SDK or runtime, multiple language resource folders are automatically included in the installation directory. 2. Problem: Many developers only require a single language, typically English and the additional localization files take up unnecessary disk space and clutter the installation directory. Currently, the installer does not provide an option to select which languages should be installed. Removing these manually is time-consuming and could potentially break application dependencies if done incorrectly. 3. Proposed Solution: Introduce an option in the .NET installer that allows users to select or deselect language packs during installation. This feature could be similar to the "Individual components" selection available in the Visual Studio Installer, where users can choose exactly what they need, ensuring a more streamlined installation. This would help: Reduce disk space usage. Improve installation customization. Provide a cleaner development environment. 4. What do you think about this suggestion ? Thank you for considering this request and I’m happy to provide additional details or insights if needed.46Views0likes0Commentsfeature request: please add liblibgdiplus packages to DOTNET .. (linux)
feature request: please add liblibgdiplus packages (deb,rpm) to dotnet 9.xx description Libgdiplus is the Mono library that provides a GDI+-compatible API on non-Windows operating systems. need it to run .NET code on linux.. i know, most linux flavors provide a liblibgdiplus package, but adding it to dotnet prevents issues with running dotnet.. André30Views0likes0Comments