ZeroTouch Image Icons

I have followed the tutorial on the Dynamo GitHub:

But I could not get images to duplicate in the Post Build. I could post an image of what I am seeing in console, but console is just telling me the text from the example with the additional following text below.

Severity Code Description Project File Line Suppression State
Error exited with code 255.

I would be interested to hear from others that have added icons to their library if they had similar issues. Not the biggest issue, but would look nicer before publishing. Thanks

Edit: Added Pastebin

seems like you might have odd line endings in the post build event - or it can’t find the files referenced, I’m not sure you can use symbols like {user}…at least I have not seen that before, does it work in other cases?

why not use “(OutDir)(TargetName).dll” and $(ProjectDir) etc macros:

I used the {user} nomenclature just to remove my name from the internet. That wasn’t actually in the AfterBuild, but I could see now how that could provide some confusion. I apologize.

The example was trying to rename the .resx file to a .resource file, which is why all that mess was there. I’ll try a test with just OutDir and ProjectDir and see if it will copy.

Here is an updated Pastebin of the PostBuildEvent.

I seem to have hit an endpoint. Notable things that I have completed that are different from the example from Dynamo team on Github. Step 6 of “change “Persistence” to “Embedded in .rsx”” is not an option available to me in the properties of the image. See below:


Up until this point, I was using ‘Embedded Resource’.

I’ve never succeeded to get Icons with Visual Studio 2017.
But with Visual Studio 2013, it worked the first time. And you will have the option “Embedded in”

I’m in VS 2017 which is where that screenshot was taken. Here’s a different pic. I was inferring from the documentation that it would be under Build Actions, though there is nothing there.


what error do you get with that post build… one thought, if you are using vs 2017… you may not have .net 2.0 installed which seems to be getting used to create the dlls from the resx files - you may need to install .net 2, try switching the target version, or try using visual studio 2015.

I first looked at .NET 2.0 and updated inside of VS2017 to .NETCore.Platforms from to 2.0.0 and also NETStandard.Library from 1.6.0 to 2.0.0. This did produce different results as now an error is not thrown in the Output on Build. It will continue perfectly with the Build with 0 errors.

When I then went back and looked at the after build in the .csproj, this was noted below the after build.

 <Import Project="..\packages\NETStandard.Library.2.0.0\build\NETStandard.Library.targets" 
Condition="Exists('..\packages\NETStandard.Library.2.0.0\build\NETStandard.Library.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
  <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet 
Package Restore to download them.  For more information, see
LinkID=322105. The missing file is {0}.</ErrorText>
<Error Condition="!Exists('..\packages\NETStandard.Library.2.0.0\build\NETStandard.Library.targets')" 
'..\packages\NETStandard.Library.2.0.0\build\NETStandard.Library.targets'))" />

I then followed the link that MS provides in the error. It states to make sure that Nuget can repair packages as it needs. I already had both of those boxes checked.

Also, built on .NET Framework 4.6

.net core platoforms and .net standard library are a totally different thing than .net 2.0.

Running on Core 2.0.5 SDK 2.1.4

my initial point is that since you installed visual studio 2017 and this installed .net framework 4.7 you are likely missing .net framework 2.0 which is is apparently required for the post build step.

Dynamo is not going to build targeting the cross platform .net core.

it’s unclear if you can reference the dynamo nugets (which maybe you are?) from a .net core project.

Yes. Referencing DynamoVisuaualProgramming nugets. Here is an images of installed nugets. Or at least a partial list.

And a partial list of References in Solution Explorer.

From what I know, and I may be wrong, but wouldn’t .NET 4.6, 4.6.1 etc. contain the necessary components of .NET Framework 2.0? Or do I need to have .NET Framework 2.0 installed alongside 4.6? While I know you can have multiple .NETs working at the same time, I did not believe it was required.

Finally, this is the last component of being able to publish this package. Everything works seamlessly with Dynamo, it is just getting the images of the icons to show up with the package. Working a little bit, as you can see, with the RevitAPI, but that’s about it.

I believe you need to install .net framework 2.0 independently of .net framework 4.6 and up. If you had installed vs 2015 I think earlier versions of .net may have been included but not with 2017.

All right, I’ll give that a go. Reading up on .NET Frameworks and Mircosoft Docs are showing that .NET Framework 2.0, 3.0, and 3.5 cannot be built alongside each other. I have 3.5.1 already installed. MS also recommends to install the 3.5 version.


Would this cause stability issues on programs that utilize that library by having to roll away 3.5 to install 2.0? I may have to test on a non-production machine.


here is what I have installed if it helps
perhaps I am incorrect. What about trying to use visual studio 2015 to do the build or changing the target there to .net 4.5 in the csproj for the dll generation.

could we step back for a sec, and can you post a link to your repo and solution?
I’d like to try building it.

1 Like