Setting platform target to x86 on my x64 laptop prevent some WPF types to load properly

前端 未结 2 1215
北荒
北荒 2021-01-06 23:19

I have a x64 machine running Windows 7 64 bits. It seems I have a very weird situation since the beginning of the week.

If I build and run a WPF application with pla

2条回答
  •  醉梦人生
    2021-01-06 23:56

    I have this configuration as well and have experienced no issues with building an x86 application that uses a Grid.

    I would uninstall the version of .NET Framework you are using (looks like .NET 4.0) and reinstall it. To be thorough, you might also uninstall Visual Studio 2010 and reinstall it (although that is probably overkill).

    The problem has to exist on only the machine you are working on ... otherwise there would be mobs and pitchforks and such ... headed towards Redmond, WA. :-) You might try creating a sample project on another machine ... just for your sanity. :-)

    Update

    I just wanted to add that System.Windows.Controls.Grid lives in the PresentationFramework assembly. It might be interesting to take a look at where this file is stored on your machine ... to see if you notice anything. The solution is still probably reinstalling ... but hey, more information is always better.

    For .NET 4.0, the PresentationFramework assembly lives at: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35

    For .NET 3.0/3.5, the PresentationFramework assembly lives at: C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0

提交回复
热议问题