简体   繁体   English

系统参考未显示?

[英]System references not showing up?

So I have a solution with two projects inside. 所以我有一个内部有两个项目的解决方案。 One project was running CF 3.5 while another was running CF 2.0. 一个项目正在运行CF 3.5,而另一个项目正在运行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. 我尝试了多种通过程序更新2.0的方法,但均未成功,包括从解决方案中删除3.5项目。 I finally ended up manually opening the project file in notepad++ and changing the framework from 2.0 to 3.5 and saved it. 最后,我最终在notepad ++中手动打开了项目文件,并将框架从2.0更改为3.5,然后保存了该文件。 Since Then I have been having issues with System references and went from 0 errors to 360 errors such as the following picture shows. 从那时起,我一直遇到系统引用问题,并且从0错误变为360错误,如下图所示。 Any idea how to resolve these problems? 任何想法如何解决这些问题?

在此处输入图片说明

在此处输入图片说明

after cleaning and building again this is what happens. 清洁并重新构建后,会发生这种情况。 Errors jump to 360 mark.. 错误跳到360标志。 在此处输入图片说明

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. 更改框架版本的最安全方法是:1.右键单击项目2.单击“属性” 3.更改“目标框架”选项并保存。

If you change the version from 2.0 to an upper version there will be no problem. 如果将版本从2.0更改为较高版本,则不会有问题。 Visual Studio will update the versions of current referenced System assemblies. Visual Studio将更新当前引用的系统程序集的版本。

However you may be confused with the case that: System.Windows.Forms assembly does not have the version 3.5. 但是,您可能对以下情况感到困惑:System.Windows.Forms程序集没有版本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. 因此,如果将项目的目标框架设置为3.5,则System.Windows.Forms将自动设置为2.0版,因为该目标框架3.5的程序集的最新版本为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. 对于当前情况,请从notepad ++中删除您修改的参考系统程序集,然后通过右键单击“参考”和“添加参考”选项再次添加它们。

So apparently the Compact Framework does not support these properties that are having the issue. 因此,显然Compact Framework不支持出现问题的这些属性。 So I had to remove them from my project and it works fine. 所以我不得不将它们从我的项目中删除,并且工作正常。 Just the crazy awesome abilities of windows compact framework. 只是Windows Compact Framework的强大功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM