0

So I have a solution with two projects inside. One project was running CF 3.5 while another was running CF 2.0. I tried many different ways to update the 2.0 through the program without success including removing the 3.5 project from the solution. I finally ended up manually opening the project file in notepad++ and changing the framework from 2.0 to 3.5 and saved it. Since Then I have been having issues with System references and went from 0 errors to 360 errors such as the following picture shows. Any idea how to resolve these problems?

enter image description here

enter image description here

after cleaning and building again this is what happens. Errors jump to 360 mark.. enter image description here

Tyler Buchanan
  • 311
  • 1
  • 4
  • 18
  • Have you tried closing/reopening or cleaning solution? – Sayse Aug 14 '13 at 14:38
  • Yes, If i do that it shows up with more errors. – Tyler Buchanan Aug 14 '13 at 14:40
  • Is the Accessibledefaultactiondescription even in CF 3.5 framework? Im trying to see the libraries and methods that come with the 3.5 framework to perhaps see if this class is even corresponding to the CF 3.5. any thoughts? http://msdn.microsoft.com/en-us/library/vstudio/system.windows.forms.control.accessibledefaultactiondescription%28v=vs.90%29.aspx – Tyler Buchanan Aug 14 '13 at 17:18

2 Answers2

1

The safest way to change the framework version is, 1. Right click on the project 2. Click Properties 3. Change the "Target Framework" option and Save.

If you change the version from 2.0 to an upper version there will be no problem. Visual Studio will update the versions of current referenced System assemblies.

However you may be confused with the case that: System.Windows.Forms assembly does not have the version 3.5. So if you set the project's Target Framework to 3.5, System.Windows.Forms will be set to version 2.0 automatically because the latest version of this assembly for the Target Framework 3.5 is the version 2.0.

For your current situation, remove the referenced system assemblies that you modified from notepad++ and add them again by right clicking the "References" and "Add Reference" option.

mehmet mecek
  • 2,615
  • 2
  • 21
  • 25
  • Yea I tried doing the "safest way" but it was grayed out since I had two projects with two different frameworks and even tried removing one project to use the "safest way" but it was still grayed out. – Tyler Buchanan Aug 14 '13 at 15:12
  • I didnt change the reference assemblies when i modified with notepad++... I changed the target Framework for the project. – Tyler Buchanan Aug 14 '13 at 15:21
  • When a project is unloaded from solution, it becomes grayed out. Try reloading the grayed out project. I tested your situation in my pc and I didn't see any problem. – mehmet mecek Aug 14 '13 at 15:22
  • I tried unloading and then reloading that project but it still shows under properties that the framework is grayed out. =/ – Tyler Buchanan Aug 14 '13 at 15:25
  • I removed the references in that project file with notepad++ and in the references file. then added them back in after clean/build and still get the same error. I guess my only option is to rebuild the project from scratch.. – Tyler Buchanan Aug 14 '13 at 15:56
0

So apparently the Compact Framework does not support these properties that are having the issue. So I had to remove them from my project and it works fine. Just the crazy awesome abilities of windows compact framework.

Tyler Buchanan
  • 311
  • 1
  • 4
  • 18