I'm having problems with Autoloading my Plugin in AutoCAD 2025.
It works fine in AutoCAD 2024.
It works fine if I manually use the NETLOAD command in AutoCAD 2025.
I did have a SeriesMax of R23.4 in my PackageContents but I removed that parameter.
Based on the post Solved: DLL in Plugin Bundle Fail to be Autoloaded I even checked the PackageContents.xml for non-printable characters, but nothing unusual was found.
At this point I'm focused on the PackageContents.xml file, but I'm not sure what my next steps should be.
Any suggestions?
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationPackage SchemaVersion="1.0"
Name="BlockExtractor"
AppVersion="2024.2.2.1"
Description="Block Extractor"
Author="Steven Seyler"
ProductCode="{951D58DA-FCD7-4AEC-8453-2DF130AC9FDB}" >
<CompanyDetails Name="Flex-N-Gate" Url="http://www.flexngate.com" Email="sseyler@flexngate.com" />
<Components>
<RuntimeRequirements OS="Win64" SeriesMin="R20.0" />
<ComponentEntry AppName="BlockExtractor" ModuleName="BlockExtractor.dll" AppDescription="Block Extractor" LoadOnAutoCADStartup="True">
<Commands GroupName="FNGAPD">
<Command Local="Extract" Global="Extract" />
</Commands>
</ComponentEntry>
</Components>
</ApplicationPackage>
Solved! Go to Solution.
I'm having problems with Autoloading my Plugin in AutoCAD 2025.
It works fine in AutoCAD 2024.
It works fine if I manually use the NETLOAD command in AutoCAD 2025.
I did have a SeriesMax of R23.4 in my PackageContents but I removed that parameter.
Based on the post Solved: DLL in Plugin Bundle Fail to be Autoloaded I even checked the PackageContents.xml for non-printable characters, but nothing unusual was found.
At this point I'm focused on the PackageContents.xml file, but I'm not sure what my next steps should be.
Any suggestions?
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationPackage SchemaVersion="1.0"
Name="BlockExtractor"
AppVersion="2024.2.2.1"
Description="Block Extractor"
Author="Steven Seyler"
ProductCode="{951D58DA-FCD7-4AEC-8453-2DF130AC9FDB}" >
<CompanyDetails Name="Flex-N-Gate" Url="http://www.flexngate.com" Email="sseyler@flexngate.com" />
<Components>
<RuntimeRequirements OS="Win64" SeriesMin="R20.0" />
<ComponentEntry AppName="BlockExtractor" ModuleName="BlockExtractor.dll" AppDescription="Block Extractor" LoadOnAutoCADStartup="True">
<Commands GroupName="FNGAPD">
<Command Local="Extract" Global="Extract" />
</Commands>
</ComponentEntry>
</Components>
</ApplicationPackage>
Solved! Go to Solution.
Solved by moogalm. Go to Solution.
Solved by ActivistInvestor. Go to Solution.
@sseylerTT9ZJ wrote:
It works fine if I manually use the NETLOAD command in AutoCAD 2025.
That would suggest that the issue is in the code that runs at startup (e.g., an IExtensionApplication?). This is an AutoCAD managed runtime design issue that many have been bitten by. It's caused by the fact that AutoCAD's managed runtime conceals/suppresses exceptions in code that automatically executes at startup (e.g., IExtensionApplication.Initialize).
The NETLOAD command executes the startup code in the document execution context, whereas if the code is loaded automatically at startup, it runs in the application context. If the startup code is sensitive to the execution context, it often results in this very symptom (e.g., it works with NETLOAD but not when loaded at startup, or visa-verse).
What you should do is verify if the code is actually loading at startup, or not. If it is loading, and there's an exception thrown by any code that runs at startup, the exception will be suppressed/concealed by the AutoCAD managed runtime, (unless you run the code in a handler for the Application.Idle event), Such exceptions will also prevent commands from being defined, making it appear as if the extension was not loaded.
@sseylerTT9ZJ wrote:
It works fine if I manually use the NETLOAD command in AutoCAD 2025.
That would suggest that the issue is in the code that runs at startup (e.g., an IExtensionApplication?). This is an AutoCAD managed runtime design issue that many have been bitten by. It's caused by the fact that AutoCAD's managed runtime conceals/suppresses exceptions in code that automatically executes at startup (e.g., IExtensionApplication.Initialize).
The NETLOAD command executes the startup code in the document execution context, whereas if the code is loaded automatically at startup, it runs in the application context. If the startup code is sensitive to the execution context, it often results in this very symptom (e.g., it works with NETLOAD but not when loaded at startup, or visa-verse).
What you should do is verify if the code is actually loading at startup, or not. If it is loading, and there's an exception thrown by any code that runs at startup, the exception will be suppressed/concealed by the AutoCAD managed runtime, (unless you run the code in a handler for the Application.Idle event), Such exceptions will also prevent commands from being defined, making it appear as if the extension was not loaded.
No IExtensionApplication, so no IExtensionApplication.Initialize.
For testing purposes I added it with stubs for Initialize and Terminate, no change. I've tried adding code to the Initialize to test that it's running at startup, but I'll confess I'm not sure what code should be able to run in ACAD's application context - a simple MessageBox.Show doesn't work but I'm not certain what conclusion to draw from that.
My original code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Microsoft.Office.Interop;
using Autodesk.AutoCAD.Windows;
// using Microsoft.Office.Interop.Excel;
[assembly: CommandClass(typeof(ExtractBlocks.Class1))]
namespace ExtractBlocks
{
public class Class1
{
[CommandMethod("Extract")]
public static void ExtractBlocks()
}
}
And as it sits right now:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Microsoft.Office.Interop;
using Autodesk.AutoCAD.Windows;
using Microsoft.Office.Interop.Excel;
using System.Windows;
// using Microsoft.Office.Interop.Excel;
[assembly: ExtensionApplication(typeof(ExtractBlocks.HelloWorldApp))]
[assembly: CommandClass(typeof(ExtractBlocks.Class1))]
namespace ExtractBlocks
{
public class HelloWorldApp : Autodesk.AutoCAD.Runtime.IExtensionApplication
{
void IExtensionApplication.Initialize()
{
MessageBox.Show("Blockexport Running");
}
void IExtensionApplication.Terminate()
{
}
}
public class Class1
{
[CommandMethod("Extract")]
public static void ExtractBlocks()
}
}
No IExtensionApplication, so no IExtensionApplication.Initialize.
For testing purposes I added it with stubs for Initialize and Terminate, no change. I've tried adding code to the Initialize to test that it's running at startup, but I'll confess I'm not sure what code should be able to run in ACAD's application context - a simple MessageBox.Show doesn't work but I'm not certain what conclusion to draw from that.
My original code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Microsoft.Office.Interop;
using Autodesk.AutoCAD.Windows;
// using Microsoft.Office.Interop.Excel;
[assembly: CommandClass(typeof(ExtractBlocks.Class1))]
namespace ExtractBlocks
{
public class Class1
{
[CommandMethod("Extract")]
public static void ExtractBlocks()
}
}
And as it sits right now:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Microsoft.Office.Interop;
using Autodesk.AutoCAD.Windows;
using Microsoft.Office.Interop.Excel;
using System.Windows;
// using Microsoft.Office.Interop.Excel;
[assembly: ExtensionApplication(typeof(ExtractBlocks.HelloWorldApp))]
[assembly: CommandClass(typeof(ExtractBlocks.Class1))]
namespace ExtractBlocks
{
public class HelloWorldApp : Autodesk.AutoCAD.Runtime.IExtensionApplication
{
void IExtensionApplication.Initialize()
{
MessageBox.Show("Blockexport Running");
}
void IExtensionApplication.Terminate()
{
}
}
public class Class1
{
[CommandMethod("Extract")]
public static void ExtractBlocks()
}
}
Your ExtractBlocks() method is missing a body, but I don't think that would cause the problem.
At this point, what I would do is try to register the assembly for demand-loading via the registry, and see if it loads and defines your commands (you can register it to load at startup, or when one of the command methods it includes is first-issued), by setting LOADCTRLS appropriately:
Your ExtractBlocks() method is missing a body, but I don't think that would cause the problem.
At this point, what I would do is try to register the assembly for demand-loading via the registry, and see if it loads and defines your commands (you can register it to load at startup, or when one of the command methods it includes is first-issued), by setting LOADCTRLS appropriately:
The body was just folded when I copied the code, so it didn't come over.
So listing it in the Registry works, even with a LOADCTRLS = 0x0002. That should be the same timing as a bundle file, right?
The body was just folded when I copied the code, so it didn't come over.
So listing it in the Registry works, even with a LOADCTRLS = 0x0002. That should be the same timing as a bundle file, right?
This issue has occured to me also, so i'm looking forwarding some solution
i also removed the versionMax Attribute for Application tag, but it seems not related to this issue.
and when execute the autocad 2025,
in registry for autocad 2025 loaded key(\HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R25.0\ACAD-8101:409\Loaded)
there is also exist my .bundle subkey, but it does not has its subkeys not like other bundles in same parent key which have the relative path of my .dll file.
while it has subkeys like other bundles in R24.3 and the .dll file loaded well
This issue has occured to me also, so i'm looking forwarding some solution
i also removed the versionMax Attribute for Application tag, but it seems not related to this issue.
and when execute the autocad 2025,
in registry for autocad 2025 loaded key(\HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R25.0\ACAD-8101:409\Loaded)
there is also exist my .bundle subkey, but it does not has its subkeys not like other bundles in same parent key which have the relative path of my .dll file.
while it has subkeys like other bundles in R24.3 and the .dll file loaded well
If it works when you register it manually in the registry, then it has to be a problem in AutoCAD, new to 2025.
If it works when you register it manually in the registry, then it has to be a problem in AutoCAD, new to 2025.
While I don't love the outcome, I do greatly appreciate your assistance in getting to it!
Thanks @ActivistInvestor !
While I don't love the outcome, I do greatly appreciate your assistance in getting to it!
Thanks @ActivistInvestor !
You need to provide separate bounds for both AutoCAD 2024 and AutoCAD 2025, as the underlying .NET runtime has changed from .NET 4.x to NET 8.0
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationPackage SchemaVersion="1.0"
Name="BlockExtractor"
AppVersion="2024.2.2.1"
Description="Block Extractor"
Author="Steven Seyler"
ProductCode="{951D58DA-FCD7-4AEC-8453-2DF130AC9FDB}" >
<CompanyDetails Name="Flex-N-Gate" Url="http://www.flexngate.com" Email="sseyler@flexngate.com" />
<Components>
<RuntimeRequirements OS="Win64" SeriesMin="R20.0" SeriesMax="R24.3" />
<ComponentEntry AppName="BlockExtractor" ModuleName="BlockExtractor.dll" AppDescription="Block Extractor" LoadOnAutoCADStartup="True">
<Commands GroupName="FNGAPD">
<Command Local="Extract" Global="Extract" />
</Commands>
</ComponentEntry>
<RuntimeRequirements OS="Win64" SeriesMin="R25.0" SeriesMax="R25.0" />
<ComponentEntry AppName="BlockExtractor" ModuleName="BlockExtractor_NET8.0.dll" AppDescription="Block Extractor" LoadOnAutoCADStartup="True">
<Commands GroupName="FNGAPD">
<Command Local="Extract" Global="Extract" />
</Commands>
</ComponentEntry>
</Components>
</ApplicationPackage>
You need to provide separate bounds for both AutoCAD 2024 and AutoCAD 2025, as the underlying .NET runtime has changed from .NET 4.x to NET 8.0
<?xml version="1.0" encoding="UTF-8"?>
<ApplicationPackage SchemaVersion="1.0"
Name="BlockExtractor"
AppVersion="2024.2.2.1"
Description="Block Extractor"
Author="Steven Seyler"
ProductCode="{951D58DA-FCD7-4AEC-8453-2DF130AC9FDB}" >
<CompanyDetails Name="Flex-N-Gate" Url="http://www.flexngate.com" Email="sseyler@flexngate.com" />
<Components>
<RuntimeRequirements OS="Win64" SeriesMin="R20.0" SeriesMax="R24.3" />
<ComponentEntry AppName="BlockExtractor" ModuleName="BlockExtractor.dll" AppDescription="Block Extractor" LoadOnAutoCADStartup="True">
<Commands GroupName="FNGAPD">
<Command Local="Extract" Global="Extract" />
</Commands>
</ComponentEntry>
<RuntimeRequirements OS="Win64" SeriesMin="R25.0" SeriesMax="R25.0" />
<ComponentEntry AppName="BlockExtractor" ModuleName="BlockExtractor_NET8.0.dll" AppDescription="Block Extractor" LoadOnAutoCADStartup="True">
<Commands GroupName="FNGAPD">
<Command Local="Extract" Global="Extract" />
</Commands>
</ComponentEntry>
</Components>
</ApplicationPackage>
Hi @moogalm
I have tried you solution for xml file but it didn't work for me. Based on Autodesk documentation
https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-3C25E517-8660-4BB7-9447-2310462EF06F
I moved <RuntimeRequirements> inside ComponentEntry and it works.
Can you check it please.
Hi @moogalm
I have tried you solution for xml file but it didn't work for me. Based on Autodesk documentation
https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-3C25E517-8660-4BB7-9447-2310462EF06F
I moved <RuntimeRequirements> inside ComponentEntry and it works.
Can you check it please.
Sorry, you are right, RuntimeRequirements should be at ComponentEntry level in this case.
Sorry, you are right, RuntimeRequirements should be at ComponentEntry level in this case.
This could be useful for creating xml file
https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-3C25E517-8660-4BB7-9447-2310462EF06F
This could be useful for creating xml file
https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-3C25E517-8660-4BB7-9447-2310462EF06F
Hi, would you be so kind and correct it in your blog
Hi, would you be so kind and correct it in your blog
I also have a bundle that won't load the dll at startup. Of course it will netload, and I have created a registry entry for it. It will autoload that way, but not using the bundle. I have the bundle in program files to avoid the SECURELOAD issue. In the xml below, if I comment out the dll component, the cuix loads. So there's something wrong with the dll component. I've stared at is and researched all I can find. It's probably staring me in the face, but I can't see it. Maybe some fresh eyes can see it?
<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage
SchemaVersion="1.0"
AutodeskProduct="AutoCAD"
ProductType="Application"
AppVersion="2022.0.0.1"
ProductCode="{BCF17CB5-B9E9-4877-BB89-23E74576CE47}"
UpgradeCode="{0F36311B-4F7D-4F79-9F20-D8060649FDB1}"
Name="EJ_PageSetupImport"
Description="Utility for importing page setups into current drawing."
Author="Ed Jobe"
Helpfile="./Contents/PageSetupImportHelp.html">
<CompanyDetails
Name=""
URL=""
Email="">
</CompanyDetails>
<Components>
<ComponentEntry
AppName="EJ_PageSetupImport_CUIX"
AppDescription="Menu for EJ_PageSetupImport."
ModuleName="./Contents/EJ_PageSetupImport.cuix"
AppType="CuiX"
LoadOnAutoCADStartup="True"
>
</ComponentEntry>
<ComponentEntry
AppName="EJ_PageSetupImport"
AppDescription="Tools for importing page setups into the current drawing."
MouduleName="./Contents/EJ_PageSetupImport.dll"
AppType=".Net"
LoadOnAutoCADStartup="True"
>
<RuntimeRequirements OS="Win64" Platform="AutoCAD*" SeriesMin="R19.0" SeriesMax="R24.3" SupportPath="./Contents"/>
<Commands GroupName="EJ_">
<Command Local="ImportPageSetupsConfig" Global="ImportPageSetupsConfig"/>
<Command Local="ImportPageSetupND" Global="ImportPageSetupND"/>
</Commands>
</ComponentEntry>
</Components>
</ApplicationPackage>
Update: I updated the xml above. I was missing the following keys:
AutodeskProduct="AutoCAD"
ProductType="Application"
I also have a bundle that won't load the dll at startup. Of course it will netload, and I have created a registry entry for it. It will autoload that way, but not using the bundle. I have the bundle in program files to avoid the SECURELOAD issue. In the xml below, if I comment out the dll component, the cuix loads. So there's something wrong with the dll component. I've stared at is and researched all I can find. It's probably staring me in the face, but I can't see it. Maybe some fresh eyes can see it?
<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage
SchemaVersion="1.0"
AutodeskProduct="AutoCAD"
ProductType="Application"
AppVersion="2022.0.0.1"
ProductCode="{BCF17CB5-B9E9-4877-BB89-23E74576CE47}"
UpgradeCode="{0F36311B-4F7D-4F79-9F20-D8060649FDB1}"
Name="EJ_PageSetupImport"
Description="Utility for importing page setups into current drawing."
Author="Ed Jobe"
Helpfile="./Contents/PageSetupImportHelp.html">
<CompanyDetails
Name=""
URL=""
Email="">
</CompanyDetails>
<Components>
<ComponentEntry
AppName="EJ_PageSetupImport_CUIX"
AppDescription="Menu for EJ_PageSetupImport."
ModuleName="./Contents/EJ_PageSetupImport.cuix"
AppType="CuiX"
LoadOnAutoCADStartup="True"
>
</ComponentEntry>
<ComponentEntry
AppName="EJ_PageSetupImport"
AppDescription="Tools for importing page setups into the current drawing."
MouduleName="./Contents/EJ_PageSetupImport.dll"
AppType=".Net"
LoadOnAutoCADStartup="True"
>
<RuntimeRequirements OS="Win64" Platform="AutoCAD*" SeriesMin="R19.0" SeriesMax="R24.3" SupportPath="./Contents"/>
<Commands GroupName="EJ_">
<Command Local="ImportPageSetupsConfig" Global="ImportPageSetupsConfig"/>
<Command Local="ImportPageSetupND" Global="ImportPageSetupND"/>
</Commands>
</ComponentEntry>
</Components>
</ApplicationPackage>
Update: I updated the xml above. I was missing the following keys:
AutodeskProduct="AutoCAD"
ProductType="Application"
AutoCAD 2025?
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
AutoCAD 2025?
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
No, 2023 and 2024. thanks.
@moogalm Do you have any insights?
No, 2023 and 2024. thanks.
@moogalm Do you have any insights?
Update: I updated the xml above. I was missing the following keys:
AutodeskProduct="AutoCAD"
ProductType="Application"
Update: I updated the xml above. I was missing the following keys:
AutodeskProduct="AutoCAD"
ProductType="Application"
Can't find what you're looking for? Ask the community or share your knowledge.