T4Scaffolding assembly MSBuild variables not resolving

72 Views Asked by At

I have an open source project where I am having to instruct users to place a dll in c:\NPEG.dll https://github.com/leblancmeneses/AngularKendo.IntegrationTests/blob/master/AngularKendo.IntegrationTests/CodeTemplates/Scaffolders/T4WithNUnitFeature/T4WithNUnitFeatureTemplate.cs.t4

Instead I would like to support: <#@ assembly name="$(TargetDir)NPEG.dll" #> https://github.com/leblancmeneses/RobustHaven.IntegrationTests/blob/master/T4/CodeTemplates/Scaffolders/T4WithNUnitFeature/T4WithNUnitFeatureTemplate.cs.t4

However, this results in references messing, assembly loading error because it cannot be found.

NPEG.dll will be in the bin directory.

Does anyone know how I can resolve a relative dll with T4Scaffolding?

Edit

Steps to Reproduce

I've checked in the csproj changes. Assembly reference should work with both: "NPEG.dll" and "$(myLibFolder)NPEG.dll" - however, it does not

.

  Scaffold T4WithNUnitFeature "Gherkin\NgModelDotNotationIsInitialized.feature" -Force

References

Thanks for the help.

0

There are 0 best solutions below