Zero touch add icons error

zerotouch

#1

Hi guys,

I’m following the instructions on how to add icons to my package:


But I get an error when compiling:

Severity Code Description Project File Line Suppression State
Error Task failed because “resgen.exe” was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for “resgen.exe” in the “bin” subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x86. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the “ToolPath” parameter of the task.

I guess the problem lies in this code line in the csproj file:

<GetReferenceAssemblyPaths TargetFrameworkMoniker=".NETFramework, Version=4.0">

I googled for a solution but so far came up empty.

Interestingly this folder also does not exist on my pc:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x86

Is there some other way to set the correct path for resgen.exe, other than doing this in the registry?

Or is there another solution?

Thanks! :grinning:


#2

Hi @Michael684
Which visual studio version your using?

And also did you follow this :point_down:

Make sure that whatever .Net framework you target is suitable for the Revit version. The different Revit versions and the .Net Framework they are utilizing is shown below.


#3

Hi @Kulkul,

I’m using Visual Studio 2017 (Version 15.9.3)

  1. I installed the latest SDK (the .NET framework SDK I updated)
  2. I didn’t install Visual Studio 2010, does not seem to be a likely solution :upside_down_face:
  3. Tried, but could not, see first post
  4. How do I do this?

I’m using Revit 2018 and .Net 4.6.1.

Do you have an idea on how to fix this problem? Thanks!


#4

Your issue is similar to this post

May be this might be the solution. I don’t have VS 2017.

TBC CC: @Michael_Kirschner2


#5

are you building the very latest master and do you have the 4.7 (not 4.7.1 or .2) sdk installed?


#6

That was the solution :smiley:

Had to install the .NET 3.5 SDK add-on.

Now only to get the icons to appear on the nodes :sweat_smile:


#7

Glad it helped. Good job :+1:

and Thanks @Michael_Kirschner2 for your support as always. Cheers!


#8

Hi Michael, thanks for the reply but we just solved this error! :slight_smile:


#9

please let me know what version of dynamo you’re trying to build - we attempted to remove this requirement for .net 3.5 … to build - I guess we need update the readme or samples to use latest .net.


#10

I’m building a new ZTN package project. But also trying out many features I previously did not get working:

-Default values
-Icons on nodes
-Setting node categories (action, query and create), not sure if this is at all possible with ZTN
-Forcing a graph to fully update before the custom node is run
-Returning lists with different types together (double, string, Dynamo lines, etc.), worked with a tuple but with 8+ items this solution gets horribly complicated

So learning a lot today :wink:


#11

Ive updated the sample code at that link - curious if that works for you without .net 3.5


#12

It wouldn’t build, but I got a different error:

Severity Code Description Project File Line Suppression State
Error The reference assemblies for framework “.NETFramework,Version=v4.7” were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

Which was corrected by installing the right SDK version. I did however get new errors, those were due to incorrect file paths.

So now the assembly compiles well, but i have still no luck with getting images (went over the instructions twice).

Could it be that the image filepaths are incorrect? Is there a way to check this? I used the following naming logic:

assemblyname.namespace.class.method.Small
assemblyname.namespace.class.method.Large

Also added the .customization dll to the pkg.json file

Last update:
I am now officially confused as hell. All of the sudden, adding icons worked. I am not sure which of the things i did helped but I’ll leave them here just in case:

-Changed the naming to “namespace.class.method.Small”
-Rebuilt the method twice, as I noticed the .customization dll was not put in my packages folder in the first build
-Also at one time manually copied the latest .customization dll build to the packages folder.