摘要:Load WF 后一开始运行的时候就发现 System.Xaml.XamlObjectWriterException: Cannot create unknown type '{clr-namespace:xx;assembly=xx}xx'. 比较了code, 怎么也找不到原因,finally.
阅读全文
随笔分类 - Debug
摘要:写了个Windows Service, 用Wix 写了个Installer,编译通过,生成了msi 安装文件,但是安装的时候总是提示: 参考如下,进行debug来获取详细的内容。 http://wixtoolset.org/documentation/manual/v3/howtos/general
阅读全文
摘要:修改了一些Xaml, 始终提示 Compiler error(s) encountered processing expression "deviceA.B".Type 'DeviceA' is not defined. 查看错误信息指向的 Line,并没有发现异常。 和编译成功的Xaml比较后发现
阅读全文
摘要:https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385(v=vs.85).aspx
阅读全文
摘要:Debug 模式下运行程序的时候,Output 窗口出来个错误“A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll”。 但是并没有直接throw错误。无法知道具体在哪一步发生了...
阅读全文
摘要:正常的情况话,直接加入project,然后选择"Source control" -> “Add selected projects to source control....". 即可。 在某些异常情况下,新添加的project 的source control 菜单里面没有“Add selected
阅读全文
摘要:家里的网络不是很稳定。今天突然发现 TFS 上所有的 mapping都突然没有了。尝试去remapping,在Source Control Explorer 中右击源文件,然后选择 Advanced -> Map to loacal folder. 然后出来了个对话框,说Workspace已经被ma...
阅读全文
摘要:1. Task manager, -> find the process for the program which crashed.2. Right click the process -> select "Create dump file".3. Dump file will be saved ...
阅读全文
摘要:Error139Assembly 'System.Activities.Core.Presentation' was not found. Verify that you are not missing an assembly reference. Also, verify that your pr...
阅读全文
摘要:if (!this.CanExecuteSubmitButton) { this.CanExecuteSubmitButton = true; CommandManager.Invalidat...
阅读全文
摘要:CSC : fatal error CS0042: Unexpected error creating debug information file 'xxxx.PDB' -- 'c:\Builds\xxxx.pdb: The process cannot access the file becau...
阅读全文
摘要:static void Main(string[] args) { StringBuilder sb = new StringBuilder(); string test = "124454664{0}89jnhb"; ...
阅读全文
(C#) System.BadImageFormatException: An attempt was made to load a program with an incorrect format.
摘要:ASP.NET: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. 修改build 的环境从 “Any CPU”, 改成 “x86". 主要原因是 调用的*.
阅读全文
摘要:一个Project 引用 另外 一个Project显示黄色叹号,后来发现 后一本Project的build设定为.Net4.5, 前一个为4.0, 将版本改为一致后,问题解决。
阅读全文
摘要:之前一直运行正常的xaml突然不能运行了,总是显示如下错误。The test caught an unhandled exception. Caught: System.Activities.InvalidWorkflowException: The following errors were en...
阅读全文
摘要:Debug -> Window -> Call Stack.
阅读全文
摘要:[SuppressMessage("Microsoft.StyleCop.CSharp.MaintainabilityRules", "SA1401:FieldsMustBePrivate", Justification = "Reviewed.")]很奇怪,前面增加Microsoft后,可以。
阅读全文
摘要:本地build的时候每次都是OK的,但是Shelveset到Server上build的时候,总是出错。果断google/bing了几个建议,无果。不得不重新仔细的看server上的building log,然后发现,Considered "..\ExternalDrops\DynamicDataDi...
阅读全文
摘要:foreach (var keyCode in unexpectedKeyCodesDetected) { string unexpected = expectedCapturedKeyCodes.Where(key => key == keyCode).First(); }空集合时,从First()处 Throw the exceptoins.修改: First() =>FirstOrDefault(),然后对返回String做null判断。
阅读全文
摘要:System.Diagnostics.Debug.WriteLine("Serial port. {0},{1}", this.GetType().FullName, new System.Diagnostics.StackTrace(true));
阅读全文