Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

BadImageFileException when adding assembly reference to ASP.NET Core projects inside of T4 templates.

$
0
0

Hi,

      Need help,

      Currently we are not able to reference the assembly for an asp.net core project inside of T4 templates. This is using Visual Studio 2015 update 3

      For example --> <#@ assembly name="$(SolutionDir)WebApplication1\bin\Debug\net461\WebApplication1.exe" #>, this will result in an error (BadImageFileException)

      when the templates are executed.

      It simply doesn't like the .exe extension as an assembly extension (for example WebApplication1.exe).

      If the the assembly is loaded from C# its working, but if its called from a T4 template it doesn't work.

      Even the reflection api doesn't work when an asp.net core assembly is loaded from a T4 template.

      Just want to confirm if there will be further updates to ASP.NET core to remedy this? Or is there a possible work around to this? Thanks in advance :) 

Thanks!

Jude Alquiza.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>