I have a website project in Visual Studio and I'm trying to reference some assemblies from the bin directory of the site.
So far, the rooted path is the only one that works:
<#@ Assembly Name="C:\Code\Web Solution\Website\bin\My.dll" />
Other people mentioned using msbuild variables, but this doesn't work for me:
<#@ Assembly Name="$(SolutionDir)Website\bin\My.dll" />
and I'm pretty sure relative paths just flat out don't work (My tt file is in a subfolder in App_Code):
<#@ Assembly Name="..\..\bin\My.dll" />
Without using the rooted path, is there any way to make this work in the context of a website project?
GAC or absolute paths are required for assembly references in T4 Templates.
However you can use relative paths from a known path:
eg:
$(SolutionDir)\..\..\packages\Pluralizer.0.3.0.1\lib\net40\Pluralize.dll
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With