我想用FSXaml在F#中創建一個gui。編譯時出現以下錯誤。我也從FsXaml獲得了同樣的示例演示程序錯誤。提前感謝您的幫助。FsXaml加載錯誤
我得到的錯誤是:
FSC: error FS3031: The type provider 'C:\Dev\ATF\tp\FsXaml\Debug\FsXaml.Wpf.TypeProvider.dll' reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FsXaml.Wpf.TypeProvider' which cannot be loaded or doesn't exist. Could not load file or assembly 'file:///C:\Dev\ATF\tp\FsXaml\Debug\FsXaml.Wpf.TypeProvider.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
完整的錯誤是在這裏:
------ Build started: Project: atfgui, Configuration: Debug Any CPU ------ C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\fsc.exe -o:obj\Debug\atfgui.exe -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin\Debug\atfgui.XML --optimize- --tailcalls- --platform:x64 -r:C:\Dev\ATF\assembly\Debug\frameworkevents.dll -r:C:\Dev\ATF\tp\FsXaml\Debug\FsXaml.Wpf.dll -r:C:\Dev\ATF\tp\FsXaml\Debug\FsXaml.Wpf.TypeProvider.dll -r:C:\Dev\ATF\assembly\Debug\hostengine.dll -r:C:\Dev\ATF\assembly\Debug\mktdataservices.dll -r:C:\Dev\ATF\assembly\Debug\mktdatastructs.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\mscorlib.dll" -r:C:\Dev\ATF\assembly\Debug\persistence.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\PresentationCore.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\PresentationFramework.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Numerics.dll" -r:C:\Dev\ATF\tp\FsXaml\System.Windows.Interactivity.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xaml.dll" -r:C:\Dev\ATF\assembly\Debug\tradingclasses.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\WindowsBase.dll" --target:exe --warn:3 --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ --sqmsessionguid:ed3396d7-c111-4f7c-91a2-bf3691c7001c "c:\temp.NETFramework,Version=v4.5.AssemblyAttributes.fs" atfgui.fs FSC: error FS3031: The type provider 'C:\Dev\ATF\tp\FsXaml\Debug\FsXaml.Wpf.TypeProvider.dll' reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FsXaml.Wpf.TypeProvider' which cannot be loaded or doesn't exist. Could not load file or assembly 'file:///C:\Dev\ATF\tp\FsXaml\Debug\FsXaml.Wpf.TypeProvider.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. FSC: warning FS3005: Referenced assembly 'C:\Dev\ATF\tp\FsXaml\Debug\FsXaml.Wpf.TypeProvider.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found Done building project "atfgui.fsproj" -- FAILED.
如果您使用的是VS,使用模板可能更容易? –