1

我知道的Visual Studio 2017年不支持Windows嵌入式手持6.5,并且需要Visual Studio 2005或2008年。然而,最近有新的硬件仍然运行这个移动操作系统,但没有Visual Studio 2008的访问权限。并不是真的热衷于为一个我不想再开发的平台项目购买它。UI设计师异常嵌入式手持6.5项目在Visual Studio 2017年

我已经找到解决方法,在Windows 10打造为平台项目在Visual Studio 2017年,执行以下操作。并不是所有这些步骤都可能是必要的,因为我正在试验这个工作。

  1. 安装.NET Compact Framework 2.0 SP2.NET Compact Framework 3.5
  2. 用于Orca创建转换为Windows Mobile Developer Toolkit 6.5.3,除去在MSI + Visual Studio的先决检查删除安装失败
  3. 安装Power Toys for .NET Compact Framework v3.5那么对于任何错误某些组件抛出不能文件CompactFramework .targets文件,同时构建项目,将安装在C:\ windows \ microsoft.net \ Framework \ v3.5中的.targets文件复制到所需的文件夹中
  4. Dow nloaded Windows Compact Samples和建设这些与C:\ WINDOWS \ microsoft.net \框架\ v3.5版本\的MSBuild文件工作正常,输出EXE运行在移动设备精细
  5. 使用Visual Studio编辑的项目,我不得不删除{ 4D628B5B-2FBC-4AA6-8C16-197242AEB884}来自ProjectTypeGUID。一旦我将项目从.NET 2.0升级到.NET 3.5后,我现在可以在Visual Studio中构建项目,并且它在移动设备上正常工作。 (虽然我手动复制文件到设备当前)

的最后一个问题,这是不是一个真正的搅局者,但将是很好的解决,是设计师抛出错误

找不到类型'System.Windows.Forms.Form中'。请确保 包含此类型的程序集被引用。如果这种类型是开发项目的一部分 ,确保该项目已 您当前使用的平台设置成功建造或任何 CPU。

在这种情况下项目引用C:\ Program Files文件(x86)的\ Microsoft.NET \ SDK \ CompactFramework \ v3.5版本\ Windows CE的\ System.Windows.Forms.dll的

连接的WinDbg到Visual工作室得到以下信息:

:021> sxe -c "!pe;!clrstack" clr 
0:021> g 
(2504.3c8c): CLR exception - code e0434352 (first chance) 
Exception object: 29885a70 
Exception type: System.ComponentModel.Design.Serialization.CodeDomSerializerException 
Message:   Could not find type 'System.Windows.Forms.Form'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU. 
InnerException: <none> 
StackTrace (generated): 
<none> 
StackTraceString: <none> 
HResult: 80131501 
OS Thread Id: 0x3c8c (0) 
Child SP  IP Call Site 
00afe48c 7613b802 [HelperMethodFrame: 00afe48c] 
00afe53c 0b13e901 System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.String, System.String) 
00afe558 0b13c78d System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager, System.CodeDom.CodeTypeDeclaration) 
00afe63c 0b138058 System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(System.ComponentModel.Design.Serialization.IDesignerSerializationManager) 
00afe650 1950b386 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(System.ComponentModel.Design.Serialization.IDesignerSerializationManager) 
00afe680 0efb22e5 System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(System.ComponentModel.Design.Serialization.IDesignerLoaderHost) 
00afe6b4 0efb1f02 System.ComponentModel.Design.DesignerHost.BeginLoad(System.ComponentModel.Design.Serialization.DesignerLoader) 
00afe6e0 0efb1d51 System.ComponentModel.Design.DesignSurface.BeginLoad(System.ComponentModel.Design.Serialization.DesignerLoader) 
00afe6f0 19509608 Microsoft.VisualStudio.Design.DesignerService.Microsoft.VisualStudio.Designer.Interfaces.IVSMDDesignerService.CreateDesigner(System.Object, System.Object) 
00afe72c 77240423 Microsoft.VisualStudio.LanguageServices.Implementation.AbstractEditorFactory.CreateEditorInstance(UInt32, System.String, System.String, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy, UInt32, IntPtr, IntPtr ByRef, IntPtr ByRef, System.String ByRef, System.Guid ByRef, Int32 ByRef) 
00afe7a4 5b1be1ba DomainNeutralILStubClass.IL_STUB_COMtoCLR(Int32, IntPtr, IntPtr, IntPtr, Int32, Int32, IntPtr, IntPtr, IntPtr, IntPtr, IntPtr) 
00afe8a4 713ceec4 [ComMethodFrame: 00afe8a4] 
00afefe0 713ceec4 [InlinedCallFrame: 00afefe0] 
00afefdc 5b1d0174 DomainNeutralILStubClass.IL_STUB_CLRtoCOM(UInt32, System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr) 
00afefe0 5b3831d7 [InlinedCallFrame: 00afefe0] Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.ExecCommand(UInt32, System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr) 
00aff054 5b3831d7 Microsoft.Internal.VisualStudio.PlatformUI.HierarchyUtilities+c__DisplayClass35_0.b__1() 
00aff07c 5b35d1e0 Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(System.Func`1, Boolean, Boolean) 
00aff0a8 5b379063 Microsoft.Internal.VisualStudio.PlatformUI.HierarchyUtilities.ExecHierParentChain(Microsoft.VisualStudio.Shell.IVsHierarchyItemManager, Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy, Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy, UInt32, System.Guid ByRef, UInt32, UInt32, IntPtr, IntPtr) 
00aff0e8 15751277 Microsoft.VisualStudio.PlatformUI.HierarchyItem+HierarchyInvocationController.Invoke(System.Collections.Generic.IEnumerable`1, Microsoft.Internal.VisualStudio.PlatformUI.InputSource, Boolean) 
00aff114 292eb2bb Microsoft.Internal.VisualStudio.PlatformUI.InvocationController.Invoke(System.Collections.Generic.IEnumerable`1, Microsoft.Internal.VisualStudio.PlatformUI.InputSource, Boolean, System.Func`2) 
00aff178 292eb1a2 Microsoft.Internal.VisualStudio.PlatformUI.InvocationController.Invoke(System.Collections.Generic.IEnumerable`1, Microsoft.Internal.VisualStudio.PlatformUI.InputSource, Boolean) 
00aff1a0 292eab3a Microsoft.Internal.VisualStudio.PlatformUI.PivotTreeViewItem.InvokeItem(System.Windows.Input.InputDevice) 
00aff1d8 292ea13e Microsoft.Internal.VisualStudio.PlatformUI.PivotTreeViewItem.OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs) 
00aff1e8 5a41402c System.Windows.UIElement.OnMouseLeftButtonDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs) 
00aff1fc 5a4766ec System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object) 
00aff208 59ff969e System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) 
00aff22c 59ff962f System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs) 
00aff240 59ff92ee System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) 
00aff2ac 5a418765 System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent) 
00aff2ec 5a413d62 System.Windows.UIElement.OnMouseDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs) 
00aff2fc 5a4766ec System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object) 
00aff308 59ff969e System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) 
00aff32c 59ff962f System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs) 
00aff340 59ff92ee System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) 
00aff3ac 59ff8123 System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs) 
00aff3e8 5a00baa6 System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs) 
00aff414 59ff808a System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean) 
00aff424 5a008c43 System.Windows.Input.InputManager.ProcessStagingArea() 
00aff47c 5a008935 System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs) 
00aff48c 5a00889e System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport) 
00aff4a4 5a014a92 System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32) 
00aff4a8 5a798b01 [InlinedCallFrame: 00aff4a8] 
00aff53c 5a798b01 System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef) 
00aff5bc 59ff2aab System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 
00aff5e0 5ac7ee3b MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) 
00aff61c 5ac7ed8b MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) 
00aff62c 5ac7ec52 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) 
00aff64c 5ac7eb94 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) 
00aff690 5ac7d225 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) 
00aff6ec 5ac7e72e MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) 
First chance exceptions are reported before any exception handling. 
This exception may be expected and handled. 
eax=00afe378 ebx=00000005 ecx=00000005 edx=00000000 esi=00afe438 edi=00000001 
eip=7613b802 esp=00afe378 ebp=00afe3d0 iopl=0   nv up ei pl nz ac pe nc 
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b    efl=00000216 
KERNELBASE!RaiseException+0x62: 
7613b802 8b4c2454  mov  ecx,dword ptr [esp+54h] ss:002b:00afe3cc=8c7cfc55 
0:000> !DumpObj /d 29885a70 
Name:  System.ComponentModel.Design.Serialization.CodeDomSerializerException 
MethodTable: 0b1612a4 
EEClass:  1962f90c 
Size:  88(0x58) bytes 
File:  C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Design.dll 
Fields: 
     MT Field Offset     Type VT  Attr Value Name 
6fc91d64 400028e  4  System.String 0 instance 00000000 _className 
6fc90200 400028f  8 ...ection.MethodBase 0 instance 00000000 _exceptionMethod 
6fc91d64 4000290  c  System.String 0 instance 00000000 _exceptionMethodString 
6fc91d64 4000291  10  System.String 0 instance 2988581c _message 
6fca0864 4000292  14 ...tions.IDictionary 0 instance 00000000 _data 
6fc91eac 4000293  18  System.Exception 0 instance 00000000 _innerException 
6fc91d64 4000294  1c  System.String 0 instance 0a76e208 _helpURL 
6fc92104 4000295  20  System.Object 0 instance 00000000 _stackTrace 
6fc92104 4000296  24  System.Object 0 instance 00000000 _watsonBuckets 
6fc91d64 4000297  28  System.String 0 instance 00000000 _stackTraceString 
6fc91d64 4000298  2c  System.String 0 instance 00000000 _remoteStackTraceString 
6fc93c04 4000299  3c   System.Int32 1 instance  0 _remoteStackIndex 
6fc92104 400029a  30  System.Object 0 instance 00000000 _dynamicMethods 
6fc93c04 400029b  40   System.Int32 1 instance -2146233087 _HResult 
6fc91d64 400029c  34  System.String 0 instance 00000000 _source 
6fc910f8 400029d  44  System.IntPtr 1 instance  0 _xptrs 
6fc93c04 400029e  48   System.Int32 1 instance -532462766 _xcode 
6fc4b104 400029f  4c  System.UIntPtr 1 instance  0 _ipForWatsonBuckets 
6fc9a014 40002a0  38 ...ializationManager 0 instance 29885ac8 _safeSerializationManager 
6fc92104 400028d  5c  System.Object 0 shared static s_EDILock 
    >> Domain:Value 00e2ad28:0a91e320 << 
6ef4cc74 40009d8  50 ...om.CodeLinePragma 0 instance 00000000 linePragma 

不知道是否有可能被用来消除最后一个问题,或制定出更具体是什么设计师正在寻找的战略有什么建议?

回答

1

目前的解决方法,我发现作品:

  1. 创建新项目,并选择.NET Framework 3.5的,然后模板 - >的Visual C# - > Windows经典桌面 - > Windows窗体应用程序(.NET框架)
  2. 如所期望
  3. 生成应用& GUI界面。使此.csproj的文件的备份,我已经给它改名_design.csproj
  4. 打开。文本编辑中的csproj和为紧凑框架程序集添加提示路径,以及删除内置的.NET程序集引用,这些引用在紧凑框架中不存在。
<ItemGroup> 
    <Reference Include="System"> 
    <HintPath>C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.dll</HintPath> 
    <Reference Include="System.Core" /> 
    <HintPath>C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Core.dll</HintPath> 
    <Reference Include="System.Xml.Linq" /> 
    <HintPath>C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Xml.Linq.dll</HintPath> 
    <Reference Include="System.Data.DataSetExtensions" /> 
    <HintPath>C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Data.DataSetExtensions.dll</HintPath> 
    <Reference Include="System.Data" /> 
    <HintPath>C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Data.dll</HintPath> 
    <Reference Include="System.Drawing" /> 
    <HintPath>C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Drawing.dll</HintPath> 
    <Reference Include="System.Windows.Forms" /> 
    <HintPath>C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Windows.Forms.dll</HintPath> 
    <Reference Include="System.Xml" /> 
    <HintPath>zProgram Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Xml.dll</HintPath> 
    </ItemGroup> 
  • 生成项目并纠正不编译,因为它不存在于紧凑框架组件的任何代码。该项目被保存为_build.csproj
  • 现在使用设计师,我可以用_design.csproj但编译移动平台,我可以使用_build.csproj

    相关问题