LOL you fail... When timing the Vanos, I accidentally turned the exhaust sprocket too far. when installing Vanos, you need to move the secondary timing chain in order for the vanos gear to spline in. Apparently you are only supposed to turn it in untill the vanos gear is fully extended... If you further turn the exhaust sprocket, then the vanos is already set up too far in advance. Thanks for the tip, but I decided to re-time the vanos gear (which is 100% adjustable on E36 and E46 and E90) and then start it up again. After 2 hours of driving, (turning it off a few times as well) the code has not returned. Glad I didnt waste money replacing a perfectly good cam sensor, or waste time diagnosing a wiring issue.
I understand you meant well, but this absolutely solved my problem. Anyone else with this same issue (P1519 code after replacing head gasket or removing vanos) should read this post and take this advice under consideration. Or not trust me at all since this is my 10th post in this forum. Thanks guys. btw I love my E46s.