0

I have a project that is working correctly on Visual studio 2013 Ultimate. Now we have installed Visual studio 2017 Enterprise. When I compile and run my project on VS2017 , on several lines of code I receive a strange error message :

"Cannot obtain value of the local variable or argument because it is not
 available at this instruction pointer, possibly because it has been optimized away." 

What can I do , because on VS2013 I had no problems at all.

Thank you !

1 Answer 1

2

uncheck in the project "optimize code"

Also, set the debug info dropdown to full in the advanced options

go to Debug->Options or Tools->Options

and check Debugging->General->Suppress JIT optimization on module load (Managed only)

if you would like a technical reason, you need to post your code

Sign up to request clarification or add additional context in comments.

3 Comments

I can't find "Optimize code" on VS 2017.Where is it ?
right click the project and go to properties (not the solution), then click on the build tab
There's no Buld TAB on Project-Properties. ( I'm using VS 2017 Enterprise ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.