Visual Studio 11 缺少程序集引用
在尝试在 Visual Studio 中构建最简单的 Metro 应用程序时,我收到了十几个有关缺少程序集引用的错误(错误 WMC1003)。我刚刚从这里安装了 VS 11: http://www .microsoft.com/download/en/details.aspx?displaylang=en&id=27543
感谢任何及所有帮助! 以下是构建输出的一部分,其中指定了错误:
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.Foundation'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Controls'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Markup'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Media'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Media.Animation'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Media.Imaging'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Data'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Documents'
Upon trying to build even the simplest Metro application in Visual Studio, I get a dozen or so errors regarding missing assembly references (error WMC1003). I just installed VS 11 from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27543
Any and all help is appreciated!
Below is the part of the output of the build which specifies the errors:
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.Foundation'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Controls'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Markup'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Media'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Media.Animation'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Media.Imaging'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Data'
1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v1.0\Microsoft.Windows.UI.Xaml.Common.targets(95,9): XamlCompiler error WMC1003: Window Runtime Reference Assembly is missing: 'Windows.UI.Xaml.Documents'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只能在 Windows 8 上构建 Metro 应用程序。您使用这个吗?
如果没有,请下载安装了 VS 2011 的 Windows 8 开发者预览版。
http://dev.windows.com/
编辑:下载链接的注释
为了开发 Metro对于风格应用程序,Visual Studio 11 开发人员预览版必须安装在带有开发人员工具(英语,64 位)的 Windows 开发人员预览版上。不支持在 Windows 8 的其他预览版本上开发 Metro 风格应用程序。
注意 2:http://social.msdn.microsoft.com/Forums/en/toolsforwinapps/thread/12057f17-2f6c-422e-836e-47bcb1656a5d
开发 Windows Metro 风格应用程序
,构建唯一的平台开发 Windows Metro 风格的应用程序是使用开发人员工具的 Windows Developer Preview 英语,64 位 (x64) 的限制64位仅适用于Metro风格开发工具仅适用于BUILD。 32 位版本的 Visual Studio 将在未来的预发行版中支持 Metro 风格开发。
这包括 Visual Studio Express for Windows 和 Blend Developer
从周五开始,您可以预览并安装 Windows SDK
将有权访问 Visual Studio 11 开发者预览版,安装此
在带有开发工具的 Windows Developer Preview 上,英语,64 位
,
(x64) 构建 Metro 风格应用程序在任何其他平台上均不受支持
图片
注意:Visual Studio 11 Express for Windows 开发人员预览版
无法单独下载
You can only build Metro apps on Windows 8. Are you using this?
If not download the Windows 8 Developer preview with VS 2011 installed.
http://dev.windows.com/
Edit: Note from download link
In order to develop Metro style applications, the Visual Studio 11 Developer Preview must be installed on the Windows Developer Preview with developer tools English, 64-bit. Developing Metro style applications on other Preview versions of Windows 8 is not supported.
Note2: http://social.msdn.microsoft.com/Forums/en/toolsforwinapps/thread/12057f17-2f6c-422e-836e-47bcb1656a5d
Developing Windows Metro style Applications
At BUILD the only platform for developing Windows Metro style applications is the Windows Developer Preview with developer tools English, 64-bit (x64) The limitation of 64bit only for Metro style development tools is only for BUILD. 32 bit versions of Visual Studio will support Metro style development in future pre-releases.
this includes Visual Studio Express for Windows and Blend Developer
Previews as well as installing the Windows SDKs starting Friday, you
will have access to Visual Studio 11 Developer Preview, install this
on Windows Developer Preview with developer tools English, 64-bit
(x64) building Metro style applications is not supported on any other
image
Note: Visual Studio 11 Express for Windows Developer Preview
will not be available for download separately