There is so much that can cause the Oracle 12560 error (including spurious SSL things), that it is often like searching for a needle in a haystack.
What in fact happened is that in a few of our .NET config files got empty ConnectionString attributes for Data Source, User Id and Password as this fragment shows:
connectionString=”Data Source=; User Id=; Password=;”
The cause was a parameter substitution step in our build process where we generate each config file based on templates. It failed on some of them as this simple grep query can reveal:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Note that 15.0 (in VS2017) no longer registers itself at this registry key location, so this trick won’t simply work. vswhere is now recommended to locate MSBuild 15,
I’ve seen this question coming up a few times, and bumped into this at a client recently: the UAC dialog coming up when debugging a 32-bit executable.
This is caused (more details below) by Installer Detection Technology introduced in Windows Vista (with UAC) and tightened in more modern Windows versions.
The solution is to either:
not include Installer, Patch, Update, Upgrade, Setup, … in your EXE name
provide a correct manifest to your EXE (getting this right can be hard)
Interesting. And I need to give some thought because when calling Assert.AreEqual<T1, T2>(T1 object1, T2 object2) where T1 does not equal T2 will map to Assert.AreEqual(object, object) without compile time warning.
var str =String.Join(", ",SupportedNotificationMethods.Select(s => s.ToString()));
You can read more about the String.Join method at MSDN. Older versions of String.Join don’t have an overload that takes an IEnumerable. In that case just call ToArray() after select.
If you just care about existence, you could use ContainsValue(0) or Any(p => p.Value == 0) instead? Searching by value is unusual for a Dictionary<,>; if you were searching by key, you could use TryGetValue.
One other approach:
var record = data.Where(p => p.Value==1).Select(p =>new{Key= p.Key,Value= p.Value}).FirstOrDefault();
This returns a class – so will be null if not found.
The trick is this portion:
p =>new{Key= p.Key,Value= p.Value}
It introduces an anonymous type with two fields: Key and Value. (Note you can introduce any anonymous type here). Since these are classes, FirstOrDefault will return null if nothing was found.
Had to investigate some Assembly Loading issues, so I wrote two batch files to enable and disable the .NET Fusion Log:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
lextm commented on Mar 9, 2017 •
vswhereis now recommended to locate MSBuild 15,https://github.com/Microsoft/vswhere
n9 commented on May 17, 2017
vswhere -products *to get standalone installation of BuildTools. (See Microsoft/vswhere#61.)