Jump to content

Trying to compile a C# code.

Go to solution Solved by Mr_KoKa,

What target framework have you set in your Application settings of Project properties?

 

(Right click on project, select properties, and pick "Application" from left menu, there is target Framework, for Linq it should be at least 3.5).

Hi there! So I have this problem with my computer where, the window that I'm on will lose focus for a split second. I'm googling to try to get rid of this problem (even though it's a split second.. it gets really really obnoxious..) and came up to an old forum that had a c# code posted on it. According to the coder, what the code is suppose to do is get your process, and tell you which process turns on and off via color. I can't seem to compile this so I can get an .exe... could someone help me?

 

Here's the link to the website with the code. Just scroll down abit and you'll see it.

 

Thanks!

Link to comment
https://linustechtips.com/topic/667758-trying-to-compile-a-c-code/
Share on other sites

Link to post
Share on other sites

2 minutes ago, Mr_KoKa said:

try to change:


Console.WriteLine($" Hit exception {e}");

to


Console.WriteLine(string.Format(" Hit exception {0}", e));

 

Did it. Now I get this:

 

Untitled.png

Edited by Toasted_Toast
Wrong picture
Link to post
Share on other sites

What target framework have you set in your Application settings of Project properties?

 

(Right click on project, select properties, and pick "Application" from left menu, there is target Framework, for Linq it should be at least 3.5).

Link to post
Share on other sites

9 minutes ago, Mr_KoKa said:

What target framework have you set in your Application settings of Project properties?

 

(Right click on project, select properties, and pick "Application" from left menu, there is target Framework, for Linq it should be at least 3.5).

Excellent! Yup that's exactly it. I changed it to use 4.0 and it compiled. Thank you so much!

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×