我希望我知道我做了什麼,但我無法使用Visual Studio 2008 Designer和MVVMLight模板。我收到一個「無法創建類型‘ViewModelLocator’的一個實例。在我的任何XAML頁面。該應用程序生成並運行良好,但只爲設計師被打破了。在App.xaml中是不能使用Visual Studio 2008設計器和MVVMLight V3 SP1
<Application x:Class="ExcelReportGenerator.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:ExcelReportGenerator.ViewModel"
xmlns:res="clr-namespace:ExcelReportGenerator.Resources"
Startup="Application_Startup"
mc:Ignorable="d">
<Application.Resources>
<!--Global View Model Locator-->
<vm:ViewModelLocator x:Key="Locator"
d:IsDataSource="True" />
</Application.Resources>
當我創建一個全新的MVVMLight應用程序時,我甚至會收到錯誤信息,有趣的是,如果我使用VS2010的快速版本,我可以在設計器中查看,編輯和工作,只要我願意去VS2010 ,我現在還不能說服IT部門做出這樣的舉動。
其他系統信息:Windows 7(x64)prof,我也有dpack和coderush表達插件。
VS2010坐在虛擬PC中,不在主操作系統中,因此它們不會互相干擾。 – mcauthorn 2010-05-10 19:00:48