first test-project in map2027 and vs2026

first test-project in map2027 and vs2026

jan_tappenbeck
Collaborator Collaborator
591 Views
8 Replies
Message 1 of 9

first test-project in map2027 and vs2026

jan_tappenbeck
Collaborator
Collaborator

Hello!

 

I'm just getting started with AutoCAD Map 2027 and Visual Studio 2026 (version edit!).

 

Until now, I've been programming with AutoCAD Map 2024 and Visual Studio 2024.

 

I watched the following video as a starting point: https://www.youtube.com/watch?v=kPkLqBfSk58

 

A simple compilation worked when I then used netload.

 

Now there are two more steps where I’m having trouble.

 

Point 1

The output should go to the AutoCAD BIN directory, as before. Currently, however, it’s always being output to the project directory.

 

C:\\VSProjects\\2027_Sandbox\\HalloNet10\\HalloNet10\\bin\\Debug\\net10.0-windows

 

Even when I specify the BIN directory in the Compile Settings, it still attempts to install to another subdirectory named “net10.0-windows.”

 

Point 2

A class library cannot be launched directly. To do so, I am prompted to add an executable project to the solution. However, I no longer remember how to do this. The video (13 min.) explains that you should create a Properties/LaunchSettings.json file and then populate it with the appropriate content.

 

{
  "profiles": {
    "AutoCAD Debugging": {
      "commandName": "Executable",
      "executablePath": "C:\\Program Files\\Autodesk\\AutoCAD 2027\\acad.exe",
      "commandLineArgs": "",
      "workingDirectory": "C:\\VSProjects\\2027_Sandbox\\HalloNet10\\HalloNet10\\bin\\Debug\\net10.0-windows"
    }
  }
}

 

I did that. But when I run it, the error message still appears.

 

Can anyone help me?

 

Regards, Jan

 

Translated with DeepL.com (free version)

0 Likes
592 Views
8 Replies
Replies (8)
Message 2 of 9

BlackBox_
Advisor
Advisor

This may help:

https://forums.autodesk.com/t5/net-forum/migration-guide-net-framework-to-autocad-2025-net-8-0/td-p/...


"How we think determines what we do, and what we do determines what we get."

Sincpac C3D ~ Autodesk Exchange Apps

0 Likes
Message 3 of 9

ActivistInvestor
Mentor
Mentor

Post your project's .csproj file for more help with specifying output paths.

 

For your launchSettings.json, this example assumes that acad.exe is located in "C:\Program Files\Autodesk\AutoCAD 2027". Adjust as needed.

 

{
  "profiles": {
  "AutoCAD 2027 (.NET 10.0)": {
  "framework": "net10.0-windows",
  "commandName": "Executable",
  "executablePath": ".\\acad.exe",
  "commandLineArgs": "/nologo",
  "workingDirectory": "C:\\Program Files\\Autodesk\\AutoCAD 2027"
}}

 

0 Likes
Message 4 of 9

kerry_w_brown
Advisor
Advisor

@jan_tappenbeck wrote:

Hello!

 

I'm just getting started with AutoCAD Map 2027 and Visual Studio 2027.

< snip>

 

I assume you mean Visual Studio 2026 not 2027.
I believe 2027 will be released in November ??

 

Stay well,


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes
Message 5 of 9

jan_tappenbeck
Collaborator
Collaborator

Dear kdub,

 

sorry, my mistake - visual studio 2026 is correct.

 

regards Jan

0 Likes
Message 6 of 9

_gile
Consultant
Consultant

Hi,

 

Maybe you can get some inspiration from this project template (AutoCAD R25 Csharp Plugin Template).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 7 of 9

jan_tappenbeck
Collaborator
Collaborator

Hi Gilles,

 

thanks for answer, but i neet vb.net an R26.0!

 

regards Jan

0 Likes
Message 8 of 9

_gile
Consultant
Consultant

@jan_tappenbeck 

You've already been advised several times to switch to C# (VB is practically obsolete).

In any case, my suggestion that you take inspiration from this template has nothing to do with the language used.

Pay attention to the AutocadR25Plugin.csproj file (project SDK),  LaunchSettings.json and start.scr files. 
In the project SDK, the only differences with a R26 one are the TargetFramework, the referenced AutoCAD libraries and the acad.exe version.
This file shows how to avoid the targeted framework in the output path by setting AppendTargetFrameworkToOutputPath to false.

The Properties\LaunchSettings.json "commandLineArgs" and the use of a script file (start.scr), with the complete path of the output DLL, allows to automatically start AutoCAD and netload the assembly when starting debug.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 9 of 9

ActivistInvestor
Mentor
Mentor

You need to forget about VB and switch to C# because Microsoft is no longer updating VB to work with newer framework features. IOW, there are now things that you can do with C# that you cannot do with VB.NET.

 

For example, with C# you can use multi-targeting to generate multiple builds that Target different AutoCAD and .NET releases within a single project.

 

You can find an example of using multi-targeting with AutoCAD C# projects in this Repository 

0 Likes