10 Replies - 415 Views - Last Post: 26 December 2012 - 12:36 PM Rate Topic: -----

#1 zaind  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 10-December 12

Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 05:00 AM

Hey All

So i have been on my school project for a while and its a music player. I started coding it on Visual Studio 2010 and then i started using VS 12. Yesterday I published my project for the first time and Visual Studio made me an .exe and installation file of it. When i opened it the first form opened well no such problems. But when i clicked on an label to open another form it gave me an error

This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Attached Image

And lots and lots of other things which i being a beginner do not understand.

So i have attached all the related files and a screen shot of the error
I have changed .Net Framework from 4.5 o 3.5 but it doesnt work.

I would really appreciate if you tell me an easy solution other wise it would be fine.
Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Assembly & .Net Framework in Visual Studio 12

#2 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,511
  • Joined: 16-March 11

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 10:17 AM

Have you gone into your projects properties and made sure your application contains all the necessary files including the .net framework(Properties > Publish > Prerequisites). Sounds to me like part of your application is running off of tools from a previous .Net framework version like 3.5 and the rest are on 4.0. That shouldn't be a problem as long as you install those frameworks on the target computer. So you need to make sure your application contains the necessary files to allow it to run. Setting up the prerequisites should make that relatively painless.
Was This Post Helpful? 0
  • +
  • -

#3 zaind  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 10-December 12

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 10:31 AM

View Posttrevster344, on 26 December 2012 - 10:17 AM, said:

Have you gone into your projects properties and made sure your application contains all the necessary files including the .net framework(Properties > Publish > Prerequisites). Sounds to me like part of your application is running off of tools from a previous .Net framework version like 3.5 and the rest are on 4.0. That shouldn't be a problem as long as you install those frameworks on the target computer. So you need to make sure your application contains the necessary files to allow it to run. Setting up the prerequisites should make that relatively painless.


hi
yeah i think some of the forms contain some components from 4.5 because when i click on the "Now Playing" Labe thats when the error show up. and when i change it back to 4.5 and run it on my computer it works fine. What Now! :D
Was This Post Helpful? 0
  • +
  • -

#4 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,511
  • Joined: 16-March 11

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 10:48 AM

Haha yea you'll need to set up the prereq's so that they can be installed on the client machine, or you can go download the new framework to work with.
Was This Post Helpful? 0
  • +
  • -

#5 zaind  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 10-December 12

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 10:52 AM

View Posttrevster344, on 26 December 2012 - 10:48 AM, said:

Haha yea you'll need to set up the prereq's so that they can be installed on the client machine, or you can go download the new framework to work with.

You Wont Believe this. It was the Cyan color in a form which was creating all the problem now i changed it and it is running fine.
Thanks :D
Was This Post Helpful? 0
  • +
  • -

#6 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,511
  • Joined: 16-March 11

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 10:55 AM

Glad to hear!
Was This Post Helpful? 0
  • +
  • -

#7 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2271
  • View blog
  • Posts: 9,499
  • Joined: 29-May 08

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 10:59 AM

I don't it was anything to do with the color cyan.
Was This Post Helpful? 0
  • +
  • -

#8 C.Andrews  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 14
  • View blog
  • Posts: 169
  • Joined: 18-October 12

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 11:02 AM

View PostAdamSpeight2008, on 26 December 2012 - 10:59 AM, said:

I don't it was anything to do with the color cyan.


You accidentally your verb.
Was This Post Helpful? 0
  • +
  • -

#9 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2271
  • View blog
  • Posts: 9,499
  • Joined: 29-May 08

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 11:12 AM

Should I doubt it was anything to do with the color cyan.
Was This Post Helpful? 0
  • +
  • -

#10 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1820
  • View blog
  • Posts: 4,627
  • Joined: 14-March 10

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 12:34 PM

View PostAdamSpeight2008, on 26 December 2012 - 11:57 PM, said:

Should I doubt it was anything to do with the color cyan.

I am with you Adam, I think it has nothing to do with the cyan color. Looks like there were some newer version .net components that were fixed after a rebuild with new .net settings.
But glad he has it working...
Was This Post Helpful? 0
  • +
  • -

#11 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,511
  • Joined: 16-March 11

Re: Assembly & .Net Framework in Visual Studio 12

Posted 26 December 2012 - 12:36 PM

I agree.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1