1
내 프로젝트 dll 파일을 내 controller.cs.tt T4 템플릿 파일에 추가해야합니다. 다음 선언이 작동합니다.VS 2013에서 controller.cs.tt에 어셈블리 추가
<#@ assembly name="C:\Users\noornayeem\Documents\Visual Studio 2013\Projects\WebApplication2\WebApplication2\bin\WebApplication2.dll" #>
그러나, 나는 위의 하나가 작동하지 않습니다
<#@ assembly name="$(SolutionDir)WebApplication2\bin\WebApplication2.dll" #>
로했습니다. 그것은 Compiling transformation: Metadata file $(SolutionDir) could not be found
를 보여줍니다. 나는 $(ProjectDir)
을 시도했다. 그것도 작동하지 않습니다. 어떤 도움을 주시면 감사하겠습니다.
http://stackoverflow.com/questions/3548026/get-referenced-projects-path-in-t4-template – CodeCaster
링크가 내 사례에 도움이되지 않습니다. –
왜 그런지 설명하지 않으시겠습니까? '$ (SolutionDir) '과 같은 MSBuild 매크로는 T4에서 작동하지 않으므로 해결 방법을 찾아야합니다. – CodeCaster