Run and debug
This section describes execution preparation and debugging using Visual Studio.
Extension placement
Describes how to deploy for extension execution.
Automatically placed when building Visual Studio
If you set the following command in the Visual Studio build event, the extension will be automatically placed every time you build in Visual Studio.
if exist "$ (projectDir) $ (OutDir) publish" rmdir "$ (projectDir) $ (OutDir) publish"/S/Q
setlocal
set COPY_TARGET_FOLDER=%LOCALAPPDATA%\DENSO CREATE\Next Design\extensions\$(TargetName)
echo # ----------------------------
echo # Publish
echo # ----------------------------
dotnet publish "$(ProjectPath)" -c $(ConfigurationName) --no-build
echo # ----------------------------
echo # Copy to Extension Fodler
echo # ----------------------------
echo Copy files to %COPY_TARGET_FOLDER% ...
if exist "%COPY_TARGET_FOLDER%" rmdir "%COPY_TARGET_FOLDER%" /S /Q
xcopy "$(projectDir)$(OutDir)publish" "%COPY_TARGET_FOLDER%" /Y /I /E
rem delete NextDesign dll files
if exist "%COPY_TARGET_FOLDER%\NextDesign.Core.dll" del "%COPY_TARGET_FOLDER%\NextDesign.Core.dll"
if exist "%COPY_TARGET_FOLDER%\NextDesign.Desktop.dll" del "%COPY_TARGET_FOLDER%\NextDesign.Desktop.dll"
endlocal
info
- Create and copy a folder to
{user's home path}\AppData\Local\DENSO CREATE\Next Design\extensions\
. - For projects created using the project template, the above is preset.
tip
If the extension doesn't load, it's possible that manifest.json
hasn't been copied to the extension's storage folder. In that case, select manifest.json
in [Solution Explorer] of Visual Studio, and make sure that [Copy to Output Directory] is set to [Always Copy] in [Property].
Manually place the extension
If you want to place the extension manually, follow the steps below.
Create a subfolder for each extension directly under the extension placement folder (hereinafter referred to as the storage folder).
For more information about where extensions are located, see Quick Start> Common> Distribution of extensions.
Build the Visual Studio project.
Copy the following set of files from the output destination folder of the build result and the source code folder to the storage folder and place them.
{NextDesignAppFolder}\extensions\MyExtension \
manifest.json ・ ・ ・ Manifest
MyExtension.dll ・ ・ ・ DLL file specified for entry point
MyExtension.deps.json ・ ・ ・ Assembly metadata description file
MyExtension.pdb ・ ・ ・ Information file for debugging
resources \
image.png ・ ・ ・ Image file of UI button specified in the extension point of the manifest
Attention
Even if the following DLLs are output to the output folder of the build result, do not copy these files. It will not work properly because it conflicts with the DLL of the same name that exists in the Next Design installation folder.
Not copyable:
NextDesign.Core.dll
,NextDesign.Desktop.dll
Debugging
- In the project properties, select Executable from the Debug> Launch choices and specify
NextDesign.exe
as the Executable that exists in the Next Design installation folder.
For example, in the case of a standard installation destination, the path setting is as follows.
C:\Program Files (x86)\DENSO CREATE\Next Design\NextDesign.exe
In Visual Studio, run Debug> Start Debugging.
When Next Design starts, it loads the manifest of all extensions located in the given folder and adds the ribbon tabs and buttons defined for the extension points according to the extension's life cycle.
When an extension is enabled according to the extension's life cycle, the breakpoints set in Visual Studio will also be enabled.
Precautions
Attention
- Copying extension files does not work properly while launching Next Design. Please execute after finishing Next Design.
- Replacing extensions while running Next Design will not reflect those changes. All extensions are loaded when you start Next Design and are not reloaded while Next Design is running.
important
If the manifest definition is incorrect, the extension will not work.
- If the manifest definition is incorrect, the manifest will be ignored and the ribbon element defined as the extension point will not be displayed.
- In rare cases, an incorrect manifest may prevent Next Design from starting. In such a case, temporarily rename the manifest file to something other than
manifest.json
, and then restart Next Design to check.